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

Invariant sites not included in no_sites #124

Open
gfwalker opened this issue Jan 24, 2025 · 3 comments
Open

Invariant sites not included in no_sites #124

gfwalker opened this issue Jan 24, 2025 · 3 comments
Labels
bug Something isn't working help wanted Extra attention is needed todo This issue will be addressed in a future update

Comments

@gfwalker
Copy link

Hello,

I am trying to use pixy on data generated using a reduced representation RAD protocol. I assembled loci using the Stacks program (Catchen et al. 2013) and generated a vcf including both variant and invariant sites (data_subset.vcf.gz) with the Stacks Populations module. However, when I run pixy on the dataset, the results indicate that only the variant loci are considered valid and used for calculating pi. In the attached data and output, chromosome (RAD locus) 4 contains 303 total sites, 7 of which are variant. However, in the pixy_pi_subset.txt output file, you can see that no_sites = 7, suggesting that only 7 sites "have at least one valid genotype", according to the Pixy documentation. What is causing my invariant sites be considered invalid genotypes?

Code used to run Pixy:
pixy --stats pi fst dxy --vcf data_subset.vcf.gz --populations popmap.txt --window_size 10000 --n_cores 4

data_subset.vcf.gz (note: needs to be indexed prior to running as .tbi file would not attach)
popmap.txt
pixy_pi.txt

Thank you,
Geoffrey

@gfwalker gfwalker added the help wanted Extra attention is needed label Jan 24, 2025
@ksamuk
Copy link
Owner

ksamuk commented Jan 24, 2025

Hi there, can you try rerunning this with version 1.2.5? You can install it by: conda install -c conda-forge pixy=1.2.5

@gfwalker
Copy link
Author

Yes, thank you, that worked! I had seen that fix on some other threads, but it seemed to apply to a different issue. Thank you!

For anyone else who runs into the same issue, I am on an Apple Silicon Mac, so I needed to create a conda environment with --platform osx64 to install the older Pixy v1.2.5.

@ksamuk
Copy link
Owner

ksamuk commented Jan 24, 2025

Good stuff! I think this was related to the workaround for the new GATK missing specification (that has now been reverted by the GATK team due to overwhelming opposition). Either way, its a bug and we should have a fix in the new major update, but the numbers will be the same.

@ksamuk ksamuk reopened this Jan 24, 2025
@ksamuk ksamuk added bug Something isn't working todo This issue will be addressed in a future update labels Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed todo This issue will be addressed in a future update
Projects
None yet
Development

No branches or pull requests

2 participants