snps-only filter: how can I suppress diploid/biallelic output?

64 views
Skip to first unread message

AUser

unread,
Aug 15, 2024, 5:57:12 PM8/15/24
to plink2-users
Hello, I want eventually to generate a phylip file from my VCF for phylogenetic analysis, and I was able to do this with plink2 using a toy input vcf file (as I am waiting for my real file to generate) and your export phylip option.  Besides filtering for --snps-only, I filtered for variant and call frequencies and everything worked fine.  However, I would also like to generate an intermediate snps-only vcf for the purpose of experimenting with different frequency filters.  When I filter --snp-only and export to vcf, the output is biallelic (i.e., "1/1", "./.", etc.) by default.  All calls in my input VCF are haploid (the input sequences were haploid), and I would like to retain that format in the export file.  I have looked through the lists of flags and I cannot find one that obviously suppresses this conversion to the biallelic format.  I do not have much experience with variant calling and I am probably not understanding everything I read in the documentation.  Is there as way to suppress the "1/1", "./." output and just get "1", "." etc?

Thanks very much.

Christopher Chang

unread,
Aug 16, 2024, 2:01:44 AM8/16/24
to plink2-users
From the --chr-set documentation: "The first parameter specifies the number of diploid autosome pairs if positive, or haploid chromosomes if negative."

AUser

unread,
Aug 16, 2024, 10:20:30 AM8/16/24
to plink2-users
Thanks!
Reply all
Reply to author
Forward
0 new messages