Closed alimanfoo closed 8 months ago
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
356c1e7
) 97.51% compared to head (c83aa89
) 98.06%. Report is 2 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Going to merge but happy to follow up if any questions or suggestions.
Adds a new method
biallelic_snp_calls()
which builds a dataset of SNP calls at sites which are biallelic within the selected samples. Note these do not necessarily have to include the reference allele, i.e., sites are included if there are only two alleles observed, regardles of which alleles.Adds a new method
biallelic_diplotypes()
which computes alternate allele counts per genotype call, generating a 2-dimensional array suitable for use with PCA, neighbour-joining trees, admixture, etc.Refactors
pca()
to usebiallelic_diplotypes()
internally.N.B., because the set of input SNPs to PCA will be slightly different as a result of this change, I have bumped the results cache version number for the pca() function. Also the next release of malariagen_data should be a major version bump I would suggest - the API has not changed so code will still be backwards compatible, but analysis results could change slightly and so it would probably help to communicate that.