I have a vcf file that has imputed markers after being phased through BEAGLE. I wanted to filter those SNPs and samples that have the imputed flag. Through the header, I see the following:
##INFO=<ID=IMP,Number=0,Type=Flag,Description="Imputed marker"> #CHROM POS ID REF ALT QUAL FILTER INFO FORMAT 1 10177 rs367896724 A AC . PASS DR2=0.10;AF=0.3848;IMP;CSQ=C
I've trying the following commands:
$ bcftools view -i "INFO/IMP' myphased.vcf > Imputed_VCF.vcf
and it runs for a VERY long time without really outputting anything.
Trying it out as a head:
$ bcftools view -i 'INFO/IMP' myphased.vcf | head -10
Just gives the following:
##fileformat=VCFv4.2 ##FILTER=<ID=PASS,Description="All filters passed"> ##filedate=20220124 ##source="beagle.28Jun21.220.jar" ##INFO=<ID=AF,Number=A,Type=Float,Description="Estimated ALT Allele Frequencies"> ##INFO=<ID=DR2,Number=A,Type=Float,Description="Dosage R-Squared: estimated squared correlation between estimated REF dose [P(RA) + 2*P(RR)] and true REF dose"> ##INFO=<ID=IMP,Number=0,Type=Flag,Description="Imputed marker"> ##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype"> ##FORMAT=<ID=DS,Number=A,Type=Float,Description="estimated ALT dose [P(RA) + 2*P(AA)]"> ##contig=<ID=1>
The same output occurs if I try
$ bcftools view -i 'INFO/IMP=1' myphased.vcf | head -10
Running a "grep" expression for "IMP" does give me what I need, but not formatted correctly and I can't use bcftools on that file. Is there something I'm missing or doing wrong?