Filtering vcf file for variants - including non-selected variants
0
0
Entering edit mode
24 days ago

Hey everyone,

I have a list of variants of interest. I am using a .tsv file to filter both cohorts (reference cohort + patient cohort) using bcftools.

My main problem is, even when using a .tsv file, I know bcftools transforms it into an interval (CHROM POS-1 POS). Therefore, my final vcf contains both POS-1 and POS, while I just wanted POS.

bcftools view -R ListVariants.txt control.vcf.gz -O z > 02_finalVCF/control_final.vcf.gz
bcftools view -R ListVariants.txt patient.vcf.gz -O z > 02_finalVCF/patient_final.vcf.gz

I have also used a .bed file but, as I expect, the problem remains the same.

Is there any way to get only the positions for the variants and not additional positions?

Thanks in advance!

bedtools calling variant bcftools • 418 views
ADD COMMENT
0
Entering edit mode

may be you want bcftools isec

ADD REPLY
0
Entering edit mode

Hey Pierre Lindenbaum! Thanks for your answer.

Unfortunately, this does not seem to work as well...

I had to use the variant list with -T criteria but, still have ~ 180 additional variants that I am supposed to.

ADD REPLY

Login before adding your answer.

Traffic: 1796 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6