Bringing Indel Realigner up to speed with the new rod binding syntax; now use -known to specify the known indels track.
This commit is contained in:
parent
b8f572b571
commit
bc2d4f554d
|
|
@ -30,10 +30,7 @@ import net.sf.samtools.*;
|
|||
import net.sf.samtools.util.RuntimeIOException;
|
||||
import net.sf.samtools.util.SequenceUtil;
|
||||
import net.sf.samtools.util.StringUtil;
|
||||
import org.broadinstitute.sting.commandline.Argument;
|
||||
import org.broadinstitute.sting.commandline.Hidden;
|
||||
import org.broadinstitute.sting.commandline.Input;
|
||||
import org.broadinstitute.sting.commandline.Output;
|
||||
import org.broadinstitute.sting.commandline.*;
|
||||
import org.broadinstitute.sting.gatk.GenomeAnalysisEngine;
|
||||
import org.broadinstitute.sting.gatk.arguments.ValidationExclusion;
|
||||
import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
|
||||
|
|
@ -86,6 +83,9 @@ public class IndelRealigner extends ReadWalker<Integer, Integer> {
|
|||
USE_SW
|
||||
}
|
||||
|
||||
@Input(fullName="known", shortName = "known", doc="Input VCF file with known indels", required=false)
|
||||
public RodBinding<VariantContext> known = RodBinding.makeUnbound(VariantContext.class);
|
||||
|
||||
@Input(fullName="targetIntervals", shortName="targetIntervals", doc="intervals file output from RealignerTargetCreator", required=true)
|
||||
protected String intervalsFile = null;
|
||||
|
||||
|
|
@ -558,8 +558,8 @@ public class IndelRealigner extends ReadWalker<Integer, Integer> {
|
|||
if ( indelRodsSeen.contains(rod) )
|
||||
continue;
|
||||
indelRodsSeen.add(rod);
|
||||
if ( VariantContextAdaptors.canBeConvertedToVariantContext(rod))
|
||||
knownIndelsToTry.add(VariantContextAdaptors.toVariantContext("", rod, ref));
|
||||
if ( rod instanceof VariantContext )
|
||||
knownIndelsToTry.add((VariantContext)rod);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public class IndelRealignerIntegrationTest extends WalkerTest {
|
|||
executeTest("test realigner defaults", spec1);
|
||||
|
||||
WalkerTestSpec spec2 = new WalkerTestSpec(
|
||||
baseCommand + "-B:indels,vcf " + knownIndels,
|
||||
baseCommand + "-known " + knownIndels,
|
||||
1,
|
||||
Arrays.asList(base_md5_with_SW_or_VCF));
|
||||
executeTest("test realigner defaults with VCF", spec2);
|
||||
|
|
@ -37,7 +37,7 @@ public class IndelRealignerIntegrationTest extends WalkerTest {
|
|||
@Test
|
||||
public void testKnownsOnly() {
|
||||
WalkerTestSpec spec1 = new WalkerTestSpec(
|
||||
baseCommand + "--consensusDeterminationModel KNOWNS_ONLY -B:indels,vcf " + knownIndels,
|
||||
baseCommand + "--consensusDeterminationModel KNOWNS_ONLY -known " + knownIndels,
|
||||
1,
|
||||
Arrays.asList("3dd5d2c9931b375455af0bff1a2c4888"));
|
||||
executeTest("realigner known indels only from VCF", spec1);
|
||||
|
|
@ -46,7 +46,7 @@ public class IndelRealignerIntegrationTest extends WalkerTest {
|
|||
@Test
|
||||
public void testUseSW() {
|
||||
WalkerTestSpec spec1 = new WalkerTestSpec(
|
||||
baseCommand + "--consensusDeterminationModel USE_SW -B:indels,vcf " + knownIndels,
|
||||
baseCommand + "--consensusDeterminationModel USE_SW -known " + knownIndels,
|
||||
1,
|
||||
Arrays.asList(base_md5_with_SW_or_VCF));
|
||||
executeTest("realigner use SW from VCF", spec1);
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public class IndelRealignerPerformanceTest extends WalkerTest {
|
|||
" -LOD 5" +
|
||||
" -maxConsensuses 100" +
|
||||
" -greedy 100" +
|
||||
" -dbsnp:vcf " + GATKDataLocation + "dbsnp_132.hg18.vcf" +
|
||||
" -known " + GATKDataLocation + "dbsnp_132.hg18.vcf" +
|
||||
" -o /dev/null" +
|
||||
" -I " + evaluationDataLocation + "NA12878.GAII.chr1.50MB.bam" +
|
||||
" -L chr1:1-5,650,000" +
|
||||
|
|
@ -45,7 +45,7 @@ public class IndelRealignerPerformanceTest extends WalkerTest {
|
|||
" -LOD 5" +
|
||||
" -maxConsensuses 100" +
|
||||
" -greedy 100" +
|
||||
" -dbsnp:vcf " + GATKDataLocation + "dbsnp_132.hg18.vcf" +
|
||||
" -known " + GATKDataLocation + "dbsnp_132.hg18.vcf" +
|
||||
" -o /dev/null" +
|
||||
" -I " + evaluationDataLocation + "NA12878.ESP.WEx.chr1.bam" +
|
||||
" -L chr1:1-150,000,000" +
|
||||
|
|
|
|||
Loading…
Reference in New Issue