Entering edit mode
2.2 years ago
Vanish007
▴
50
Hi,
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?
Thanks!
it should work. what's wrong with the output ?
what's the size of the input
It's around 27GB compressed. I might try running it over a few hours and see if anything shows up. I waited about 2 hours to see something in the output file and nothing was there, but I can see if anything shows up. Thanks for confirming that the code is correct at least!
Unfortunately it did not work, all that occurred was that the complete header was outputted after the command ran for 5.5 hours.
works on my machine:
Interesting, so I tried this
and received this optimistic output
I will try and run
and see what that outputs into a file. Thanks again for the help!
what's the version of bcftools ?
Hi thanks for the response, I'm running the latest version