This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to compare variances with VCF file ?

Hi, Please check the problem and the solutoin I apply and tell me if it is correct or not.

The problem:
I have a few variances (chr,position,ref_base,alt_base,gene) and also 50 vcf files. I need to check that if my variances exist in any of VCF files.

The solution:
First I use Annovar program to convert vcf files to Annovar Input file (convert2annovar command) and second I user Annovar again (table_annovar command with refGene,esp6500siv2_all,1000g2014oct_all and snp138 protocols) to generate a tab delimited file which contain VCF variances and Lastly I user linux "cat" command and pipe in into "grep" command to check if any of my variaces exist in that annovar output file.

please tell that if this is a common way for searching a varince in a vcf file ?

vcf

i think with VCFtools you can define and filter indels...az koja bioinformatics yad gerefti kalak?

I use vcfinterset from vcflib to solve the problem. I also find that I can filter vcf files with vcftools program.

4-5 mahi hast khodam shoro kardam be yad gereftam.

eyval dadash, carry on

1 answer

You might take a look at tools like bedtools, bedops, vcftools, or VariantAnnotation/GenomicRanges (Bioconductor).

Yup, one or more of these programs will allow the OP to do exactly what they want.

Thanks Sean, I use vcfintersect from vcflib to check if my variances exists in vcf file.

vcfintersect -b MY_INPUT_VARIANCES.bed MY_VCF_FILE.vcf.gz

Log in to answer this question.