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

Modify the SNPObject to store LAI data at the SNP-level + add mehod to go from window-level to SNP-level in the WindowLevelAncestryObject #15

Merged
merged 12 commits into from
Dec 28, 2024

Conversation

miriambt
Copy link
Collaborator

SNPObject

  • Added calldata_lai and ancestry_map to SNPObject for ancestry representation at the SNP level.
  • Updated n_samples and n_snps to retrieve information from any available attribute.
  • Introduced n_ancestries to obtain the number of ancestries when calldata_lai is present.
  • Extended filter_samples and filter_snps to also filter calldata_lai if available.

LocalAncestryObject

  • Renamed LocalAncestryObject to WindowLevelAncestryObject.
  • Added convert_to_snp_level method to transform a WindowLevelAncestryObject into an SNP-level SNPObject. This method uniformly generates SNPs across genomic window boundaries and also supports assigning ancestry values to specified SNP coordinates.

MSPReader

  • Fixed a bug in MSPReader by ensuring chromosome values are converted to strings.

@miriambt miriambt requested review from salcc and davidbonet December 13, 2024 13:15
davidbonet
davidbonet previously approved these changes Dec 28, 2024
@salcc salcc merged commit 5462ae3 into main Dec 28, 2024
6 checks passed
@salcc salcc deleted the feature/PSW-86-develop-snp-level-local-ancestry-object branch December 28, 2024 18:06
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.

3 participants