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

pixy doesnt handle masked haplotype data? #99

Open
jamesfifer opened this issue Mar 4, 2024 · 0 comments
Open

pixy doesnt handle masked haplotype data? #99

jamesfifer opened this issue Mar 4, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@jamesfifer
Copy link

Hello, thanks for making such a useful tool!

I am trying to run pixy to calculate pi on a masked vcf file that will often have one haplotype masked (i.e. marked as missing) while the other haplotype has genotype data (i.e. 1 or 0). I dont get any errors when running pixy but the output will always have "NA" because it thinks all pairwise comps contain missing data. Output will look like:

pop chromosome window_pos_1 window_pos_2 avg_pi no_sites count_diffs count_comparisons count_missing
Ngoye NC_035107.1 379329 399328 NA 0 0 0 8265
Angola NC_035107.1 379329 399328 NA 0 0 0 6175

I am running:
for chr in {1..3}; do
pixy --stats pi fst dxy
--vcf chr${chr}_Angola_Ngoye.2hap.vcf.gz
--populations Ngoye.Angola.samplemap
--n_cores 4
--bed_file chr${chr}_Angola_Ngoye.2hap_20k.bed
--output_prefix chr${chr}_Angola_Ngoye.2hap --bypass_invariant_check yes; done

my vcf file looks like:
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT Debug010_aegypti_Cuanda_Angola_02 Debug010_aegypti_Cuanda_Angola_05 Debug010_aegypti_Cuanda_Angola_06 Debug010_aegypti_Cuanda_Angola_08 Debug010_aegypti_Cuanda_Angola_09 Debug010_aegypti_Cuanda_Angola_10 Debug010_aegypti_Cuanda_Angola_11 Debug010_aegypti_Cuanda_Angola_12 Debug010_aegypti_Cuanda_Angola_14 Debug010_aegypti_Cuanda_Angola_16 Debug010_aegypti_Cuanda_Angola_17 Debug010_aegypti_Cuanda_Angola_19 Debug010_aegypti_Cuanda_Angola_20 Debug024_aegypti_Ngoye_Senegal_F_10 Debug024_aegypti_Ngoye_Senegal_F_11 Debug024_aegypti_Ngoye_Senegal_F_12 Debug024_aegypti_Ngoye_Senegal_F_16 Debug024_aegypti_Ngoye_Senegal_F_1 Debug024_aegypti_Ngoye_Senegal_F_20 Debug024_aegypti_Ngoye_Senegal_F_3 Debug024_aegypti_Ngoye_Senegal_F_8 Debug024_aegypti_Ngoye_Senegal_M_13 Debug024_aegypti_Ngoye_Senegal_M_14 Debug024_aegypti_Ngoye_Senegal_M_15 Debug024_aegypti_Ngoye_Senegal_M_17 Debug024_aegypti_Ngoye_Senegal_M_18 Debug024_aegypti_Ngoye_Senegal_M_6 Debug024_aegypti_Ngoye_Senegal_M_9
NC_035107.1 379329 . C T . . AF=0.0706806;CM=0.209779;AN=23;AC=13 GT ./. ./. ./. 1/. ./. ./. 0/. ./. ./../. ./. 0/. ./. 0|1 1/. 0|1 1|1 1|0 .|1 ./. 1|1 ./. ./. 0|1 1|0 0|0 1|0 ./.

Bed file:
NC_035107.1 379329 399328

Pops file:
Debug024_aegypti_Ngoye_Senegal_F_10 Ngoye
Debug024_aegypti_Ngoye_Senegal_F_11 Ngoye
Debug024_aegypti_Ngoye_Senegal_F_12 Ngoye
Debug024_aegypti_Ngoye_Senegal_F_16 Ngoye
Debug024_aegypti_Ngoye_Senegal_F_1 Ngoye
Debug024_aegypti_Ngoye_Senegal_F_20 Ngoye
Debug024_aegypti_Ngoye_Senegal_F_3 Ngoye
Debug024_aegypti_Ngoye_Senegal_F_8 Ngoye
Debug024_aegypti_Ngoye_Senegal_M_13 Ngoye
Debug024_aegypti_Ngoye_Senegal_M_14 Ngoye
Debug024_aegypti_Ngoye_Senegal_M_15 Ngoye
Debug024_aegypti_Ngoye_Senegal_M_17 Ngoye
Debug024_aegypti_Ngoye_Senegal_M_18 Ngoye
Debug024_aegypti_Ngoye_Senegal_M_6 Ngoye
Debug024_aegypti_Ngoye_Senegal_M_9 Ngoye
Debug010_aegypti_Cuanda_Angola_02 Angola
Debug010_aegypti_Cuanda_Angola_05 Angola
Debug010_aegypti_Cuanda_Angola_06 Angola
Debug010_aegypti_Cuanda_Angola_08 Angola
Debug010_aegypti_Cuanda_Angola_09 Angola
Debug010_aegypti_Cuanda_Angola_10 Angola
Debug010_aegypti_Cuanda_Angola_11 Angola
Debug010_aegypti_Cuanda_Angola_12 Angola
Debug010_aegypti_Cuanda_Angola_14 Angola
Debug010_aegypti_Cuanda_Angola_16 Angola
Debug010_aegypti_Cuanda_Angola_17 Angola
Debug010_aegypti_Cuanda_Angola_19 Angola
Debug010_aegypti_Cuanda_Angola_20 Angola

@jamesfifer jamesfifer added the bug Something isn't working label Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant