Question: variant filtering based on high quality reference - removing false positives
gravatar for vaibhash
12 days ago by
vaibhash0 wrote:

Hello Wonderful people !!!

I'm new to the world of bio-informatics and this is my first post, so please forgive me for any unintended mistake ...

The VCF file that I'm working on are missing ##INFO variables like QD, FS, SOR, MQ, MQRankSum, ReadPosRankSUm, InbreedingCoeff ... may be one can generate them first and then do the variant quality control ...

but at this stage I just want to do some basic quality control on the variants in my VCF files ... provides the high quality reference for variants calling ...

Is there a way by which I can select only the variants that are present in the reference VCF file?

I have used bcftools till now for normalization and to filter out samples from VCF file ..

may anyone please direct me on how to achieve the above task ? This help would be much appreciated ...

thanks team ...

ADD COMMENTlink modified 12 days ago • written 12 days ago by vaibhash0
gravatar for 4galaxy77
12 days ago by
United Kingdom
4galaxy77100 wrote:

Download the high quality reference and then print out all the SNPs.

bcftools view -v snps reference.vcf | bcftools query -f'%CHROM\t%POS\n'  > reference_positions.txt

Then extract these positions from the target vcf.

bcftools view -T reference_positions.txt target.vcf > target_filtered.vcf

If you also want to include indels, then you can add it into the -v argument under bcftools view on the first line.

ADD COMMENTlink written 12 days ago by 4galaxy77100
gravatar for vaibhash
12 days ago by
vaibhash0 wrote:

@4galaxy77 oh my wonderful friend ... much love and respect to you !!! may the force be with you ... forever and ever !!! I will try this approach and revert back if any further question .... much thanks !!!

ADD COMMENTlink written 12 days ago by vaibhash0
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1614 users visited in the last hour