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
This commit is contained in:
asivache 2009-08-31 18:05:57 +00:00
parent dab7b6e825
commit c9eb193c7f
1 changed files with 2 additions and 2 deletions

View File

@ -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<GenomeLoc, String>(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()));