Added emitOnlyMNPs flag

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4785 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
fromer 2010-12-03 20:34:17 +00:00
parent 6d4ec7f9e7
commit b12cec4302
1 changed files with 5 additions and 1 deletions

View File

@ -27,6 +27,7 @@ package org.broadinstitute.sting.gatk.walkers.phasing;
import org.broad.tribble.util.variantcontext.Allele;
import org.broad.tribble.util.variantcontext.VariantContext;
import org.broad.tribble.vcf.*;
import org.broadinstitute.sting.commandline.Argument;
import org.broadinstitute.sting.commandline.Output;
import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
@ -61,6 +62,9 @@ public class AnnotateMNPsWalker extends RodWalker<Integer, Integer> {
protected VCFWriter writer = null;
private ManualSortingVCFWriter sortingWriter = null;
@Argument(fullName = "emitOnlyMNPs", shortName = "emitOnlyMNPs", doc = "Only output MNP records; [default:false]", required = false)
protected boolean emitOnlyMNPs = false;
private LinkedList<String> rodNames = null;
private GenomeLocParser locParser = null;
private TreeMap<GenomeLoc, Set<GenomeLoc>> MNPstartToStops = null; // Must be TreeMap sorted by START sites!
@ -203,7 +207,7 @@ public class AnnotateMNPsWalker extends RodWalker<Integer, Integer> {
}
}
}
else if (atStartOfVc) {// only want to write other VariantContexts records once (where they start):
else if (atStartOfVc && !emitOnlyMNPs) {// only want to write other VariantContexts records once (where they start):
writeVCF(vc);
}
}