-1
$\begingroup$

I have a variant list in VCF file for a particular disease, I want to filter these variants according to exonic regions in a BED file using a Perl script. How I do this?

$\endgroup$
  • 1
    $\begingroup$ Sounds more like a question for Stack Overflow to me. $\endgroup$ – rotaredom Apr 11 '18 at 13:47
  • $\begingroup$ I'm voting to close this question as off-topic because it is not a question about Biology. $\endgroup$ – Bryan Krause Jul 17 '18 at 17:40
0
$\begingroup$

Don't reinvent the wheel. Use BEDTools.

And no one on any Stack Exchange board wants to write you a perl script.

$\endgroup$
0
$\begingroup$

As a fuller explanation, use bedtools with the intersect command:

bedtools intersect -u -a variantList.vcf -b exonicRegions.bed > filteredVariants.vcf

While this should work, if your vcf version is giving you trouble use vcf2bed to convert the vcf to a bed file, then intersect directly.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.