Advanced Filtering of SNPS

yfarjounyfarjoun Broad InstituteDev ✭✭✭


I'm looking for pairs of nearby SNPs with the following properties:

  1. of two given samples, one is HOM_REF at the locus while the other is HOM_VAR
  2. the locus is close to another with property 1. (say 50bp, but should be configuarable)

Any ideas how I could filter a VCF to obtain such a reduced subset? (I could write a walker, but was hoping to get some of the work done by an existing one)



Best Answers


  • yfarjounyfarjoun Broad InstituteDev ✭✭✭

    ok. it would seem that two annotators could do this if run in series, one that finds the HOM_REF / HOM_VAR combination and the other that finds nearby SNPS....does either of these exist?

  • Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

    Not in the public toolbox, I think, but you're welcome to check the docs to make sure... And check private too just in case there's something experimental we haven't released yet.

  • yfarjounyfarjoun Broad InstituteDev ✭✭✭

    Thanks for reminding me of JEXL expressions. I'll give it a try.

    I'm not sure I understand how your suggestions for step 2 would work. Assuming I have a .vcf with only 3 sites, two which are within 50bp and a third that is far, how does -L help me? after all, all three sites are already in the VCF!

  • pdexheimerpdexheimer Member ✭✭✭✭

    The idea for -L is to only consider certain sites. So you'd only look at the Step 1 sites with -L, and then use -ip to expand it to nearby regions. It's the VCF equivalent of subsetting a BAM

Sign In or Register to comment.