Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add in frequency based functionalities of NgsRelate (and add allele frequencies as a targeted output as a byproduct) #52

Merged
merged 10 commits into from
Oct 1, 2024

Conversation

zjnolen
Copy link
Owner

@zjnolen zjnolen commented Sep 30, 2024

Previously the inclusion of NgsRelate in the workflow largely was to offer a SNP based way to do the IBSrelate method. However, with allele frequencies it can also co-estimate inbreeding and relatedness. This PR will add the ability to choose between using the IBSrelate method in NgsRelate only, or also using the frequency based methods. This will utilize the same population level Beagle rules as ngsF-HMM, but will take the MAF files, requiring a bit more care in their generation, so they probably can be added as a targeted output afterwards.

Closes #49.

…r ngsrelate with ibsrelate method only.

This also pars down the output to only the usable columns with the frequency free method.
This adds in the ability to polarize population Beagles/MAFs to either their within pop major allele or the within dataset allele.
@zjnolen
Copy link
Owner Author

zjnolen commented Sep 30, 2024

Pruning before NgsRelate is removed in the previous commit. This is because, as per the ngsrelate v2 paper, the composite likelihood generated when including linked sites should still have consistent with the unlinked likelihood estimates, and so pruning shouldn't be needed generally. If at some point this is good to have it can be added back in.

As I was trying to add mafs as a targetable output, the way I handled polarization of major/minor seemed needlessy complicated. Instead, maf can just be done separately in a single rule or two and it cuts down on complexity a lot.
This time with less complicated maf calcs.
If this works, targeting mafs, and the subsequent
polarization requirements that has, will be added
in another PR.
@zjnolen zjnolen merged commit 74e53cc into develop Oct 1, 2024
2 checks passed
@zjnolen zjnolen deleted the ngsrelate-freqbased branch October 1, 2024 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant