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

pi value is large #87

Closed
chen1238 opened this issue Nov 16, 2022 · 10 comments
Closed

pi value is large #87

chen1238 opened this issue Nov 16, 2022 · 10 comments

Comments

@chen1238
Copy link

The results of vcftools calculating pi values are different compared to popgenWindows.py, which calculates very large pi, I don't quite understand what is the reason for this, is it because of the different calculation methods used?

@simonhmartin
Copy link
Owner

Note that this script needs to have the invariant sites present in order to accurately compute pi, otherwise the value will be inflated.
This is because, unlike vcftools, missing sites are not just assumed to be invariant.
There are problems with making this assumption. These are described well in this paper:
https://doi.org/10.1111/1755-0998.13326

@chen1238
Copy link
Author

Thank you for your reply and i understand what you mean.

@simonhmartin
Copy link
Owner

Great. You're welcome.

@chen1238
Copy link
Author

Excuse me,dxy also needs invariant sites, right?

@simonhmartin
Copy link
Owner

Yes, unfortunately. I know this makes the files very large, but it is the only way to get an accurate value with these scripts.

@jiazhongguo2019
Copy link

Excuse me,dxy also needs invariant sites, right?

@jiazhongguo2019
Copy link

Could you tell me how do you get invariant sites for the missing sites

Excuse me,dxy also needs invariant sites, right?

Could you tell me how do you get invariant sites for the missing sites? Thanks a lot

@simonhmartin
Copy link
Owner

Sorry I never responded to this. I don't understand the question. Many genotyping tools such as GATK, bcftools and Freebayes can export invariants if requested.
Simon

@jiazhongguo2019
Copy link

jiazhongguo2019 commented May 14, 2023 via email

@simonhmartin
Copy link
Owner

Invariant sites are those where all individuals have the same genotype or ./. in the vcf. So they can all be 0/0 or 1/1, but not both at the same site.
Many genoypers will not output the sites where all individuals are 0/0 by default, but usually they can do this if he option is specified.

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

No branches or pull requests

3 participants