From c9eb193c7f2d8fbe3f375236bd11cbe30f1729ec Mon Sep 17 00:00:00 2001 From: asivache Date: Mon, 31 Aug 2009 18:05:57 +0000 Subject: [PATCH] Now recognizes a special name for a bound rod track: snpmask. If a rod with this name is bound, then ONLY snps from that track will be used (to set alt reference bases to N's), but indels will be ignored. This helps when an alt. ref has to be created for a set of indel calls, and another rod (e.g. dbSNP) is used to put N's in (for sequenom). If dbSNP rod is not marked as "snpmask", the indels reported there will make their way into the alt. reference output and mess it up. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1492 348d0f76-0448-11de-a6fe-93d51630548a --- .../gatk/walkers/fasta/FastaAlternateReferenceWalker.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/src/org/broadinstitute/sting/playground/gatk/walkers/fasta/FastaAlternateReferenceWalker.java b/java/src/org/broadinstitute/sting/playground/gatk/walkers/fasta/FastaAlternateReferenceWalker.java index 35c8445e3..36d3753ad 100755 --- a/java/src/org/broadinstitute/sting/playground/gatk/walkers/fasta/FastaAlternateReferenceWalker.java +++ b/java/src/org/broadinstitute/sting/playground/gatk/walkers/fasta/FastaAlternateReferenceWalker.java @@ -56,14 +56,14 @@ public class FastaAlternateReferenceWalker extends FastaReferenceWalker { // if we have multiple variants at a locus, just take the first damn one we see for now AllelicVariant variant = (AllelicVariant)rod; - if ( variant.isDeletion() ) { + if ( ! rod.getName().equals("snpmask") && variant.isDeletion() ) { deletionBasesRemaining = variant.length(); basesSeen++; if ( indelsWriter != null ) indelsWriter.println(fasta.getCurrentID() + ":" + basesSeen + "-" + (basesSeen + variant.length())); // delete the next n bases, not this one return new Pair(context.getLocation(), (SEQUENOM ? refBase.concat("[") : refBase)); - } else if ( variant.isInsertion() ) { + } else if ( ! rod.getName().equals("snpmask") && variant.isInsertion() ) { basesSeen++; if ( indelsWriter != null ) indelsWriter.println(fasta.getCurrentID() + ":" + basesSeen + "-" + (basesSeen + variant.length()));