This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Filtering vcf file for variants - including non-selected variants

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

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.

0 answers

No answers yet.

Log in to answer this question.