Changing the default behavior of the IndelRealigner to run without Smith-Waterman. Changed around the integration tests accordingly.

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@6039 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
droazen 2011-06-22 22:53:58 +00:00
parent 751aa8bfa6
commit 0e057276ae
2 changed files with 19 additions and 18 deletions

View File

@ -98,8 +98,8 @@ public class IndelRealigner extends ReadWalker<Integer, Integer> {
protected ConstrainedMateFixingManager manager = null;
protected SAMFileWriter writerToUse = null;
@Argument(fullName = "consensusDeterminationModel", shortName = "model", doc = "How should we determine the possible alternate consenses? -- in the order of least permissive to most permissive there is KNOWNS_ONLY (use only indels from known indels provided in RODs), USE_READS (additionally use indels already present in the original alignments of the reads), and USE_SW (additionally use 'Smith-Waterman' to generate alternate consenses). The default is USE_SW", required = false)
public ConsensusDeterminationModel consensusModel = ConsensusDeterminationModel.USE_SW;
@Argument(fullName = "consensusDeterminationModel", shortName = "model", doc = "How should we determine the possible alternate consenses? -- in the order of least permissive to most permissive there is KNOWNS_ONLY (use only indels from known indels provided in RODs), USE_READS (additionally use indels already present in the original alignments of the reads), and USE_SW (additionally use 'Smith-Waterman' to generate alternate consenses). The default is USE_READS", required = false)
public ConsensusDeterminationModel consensusModel = ConsensusDeterminationModel.USE_READS;
// ADVANCED OPTIONS FOLLOW

View File

@ -15,7 +15,8 @@ public class IndelRealignerIntegrationTest extends WalkerTest {
private static final String knownIndels = validationDataLocation + "indelRealignerTest.pilot1.ceu.vcf";
private static final String baseCommandPrefix = "-T IndelRealigner -noPG -R " + b36KGReference + " -I " + mainTestBam + " -targetIntervals " + mainTestIntervals + " -compress 0 -L 20:49,500-55,500 ";
private static final String baseCommand = baseCommandPrefix + "-o %s ";
private static final String base_md5 = "d7c7acd346ee4c8d34f1e2499ff7c313";
private static final String base_md5 = "e041186bca9dccf360747c89be8417ad";
private static final String base_md5_with_SW_or_VCF = "d7c7acd346ee4c8d34f1e2499ff7c313";
@Test
public void testDefaults() {
@ -29,7 +30,7 @@ public class IndelRealignerIntegrationTest extends WalkerTest {
WalkerTestSpec spec2 = new WalkerTestSpec(
baseCommand + "-B:indels,vcf " + knownIndels,
1,
Arrays.asList(base_md5));
Arrays.asList(base_md5_with_SW_or_VCF));
executeTest("test realigner defaults with VCF", spec2);
WalkerTestSpec spec3 = new WalkerTestSpec(
@ -56,25 +57,25 @@ public class IndelRealignerIntegrationTest extends WalkerTest {
}
@Test
public void testReadsOnly() {
public void testUseSW() {
WalkerTestSpec spec1 = new WalkerTestSpec(
baseCommand + "--consensusDeterminationModel USE_READS -B:indels,vcf " + knownIndels,
baseCommand + "--consensusDeterminationModel USE_SW -B:indels,vcf " + knownIndels,
1,
Arrays.asList(base_md5));
executeTest("realigner known indels only from VCF", spec1);
Arrays.asList(base_md5_with_SW_or_VCF));
executeTest("realigner use SW from VCF", spec1);
WalkerTestSpec spec2 = new WalkerTestSpec(
baseCommand + "--consensusDeterminationModel USE_READS -D " + GATKDataLocation + "dbsnp_129_b36.rod",
baseCommand + "--consensusDeterminationModel USE_SW -D " + GATKDataLocation + "dbsnp_129_b36.rod",
1,
Arrays.asList("e041186bca9dccf360747c89be8417ad"));
executeTest("realigner known indels only from dbsnp", spec2);
Arrays.asList(base_md5_with_SW_or_VCF));
executeTest("realigner use SW from dbsnp", spec2);
}
@Test
public void testLods() {
HashMap<String, String> e = new HashMap<String, String>();
e.put( "-LOD 60", base_md5 );
e.put( "-LOD 1", "f158f18198cf48bbb3d4f1b7127928a3" );
e.put( "-LOD 1 --consensusDeterminationModel USE_SW", "f158f18198cf48bbb3d4f1b7127928a3" );
for ( Map.Entry<String, String> entry : e.entrySet() ) {
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
@ -90,14 +91,14 @@ public class IndelRealignerIntegrationTest extends WalkerTest {
WalkerTestSpec spec = new WalkerTestSpec(
"-T IndelRealigner -noPG -R " + b36KGReference + " -I " + validationDataLocation + "NA12878.chrom1.SLX.SRP000032.2009_06.bam -L 1:10,000,000-11,000,000 -targetIntervals " + validationDataLocation + "indelRealignerTest.NA12878.chrom1.intervals -compress 0 -o %s",
1,
Arrays.asList("be859f9a98d738becee0526887cae42e"));
Arrays.asList("fe39c007d287d372a8137d11c60fbc50"));
executeTest("realigner long run", spec);
}
@Test
public void testNoTags() {
WalkerTestSpec spec = new WalkerTestSpec(
baseCommand + "--noOriginalAlignmentTags",
baseCommand + "--noOriginalAlignmentTags --consensusDeterminationModel USE_SW",
1,
Arrays.asList("e77e59cc6363cf58f392ce5ea8d7e0b6"));
executeTest("realigner no output tags", spec);
@ -108,21 +109,21 @@ public class IndelRealignerIntegrationTest extends WalkerTest {
WalkerTestSpec spec1 = new WalkerTestSpec(
baseCommandPrefix + "-stats %s -o /dev/null",
1,
Arrays.asList("ed5a207ddf5bdda4bb76899fb3eae35c"));
Arrays.asList("7ed8d4eed635613fd031598a5c9ef5a3"));
executeTest("realigner stats", spec1);
WalkerTestSpec spec2 = new WalkerTestSpec(
baseCommandPrefix + "-LOD 60 -stats %s -o /dev/null",
1,
Arrays.asList("ffab7d9ca19daa8a21e0b8f0072d39e9"));
Arrays.asList("e8b02bfc5debec55fe936a38c59463cc"));
executeTest("realigner stats", spec2);
}
@Test
public void testMaxReadsInMemory() {
HashMap<String, String> e = new HashMap<String, String>();
e.put( "--maxReadsInMemory 10000", "d7c7acd346ee4c8d34f1e2499ff7c313" );
e.put( "--maxReadsInMemory 40000", base_md5 );
e.put( "--maxReadsInMemory 10000", base_md5 );
e.put( "--maxReadsInMemory 40000", base_md5 );
for ( Map.Entry<String, String> entry : e.entrySet() ) {
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(