From c9c6ff49c2d73e87ea442e0cb0f5cf36f51e38e4 Mon Sep 17 00:00:00 2001 From: ebanks Date: Mon, 23 Aug 2010 18:09:24 +0000 Subject: [PATCH] Deprecated 'O' in favor of 'o' in the cleaner git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4085 348d0f76-0448-11de-a6fe-93d51630548a --- .../walkers/genotyper/UnifiedGenotyper.java | 2 +- .../gatk/walkers/indels/IndelRealigner.java | 25 ++++++++----------- .../indels/IndelRealignerIntegrationTest.java | 6 ++--- 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyper.java b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyper.java index 27400d6d3..165ce2949 100755 --- a/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyper.java +++ b/java/src/org/broadinstitute/sting/gatk/walkers/genotyper/UnifiedGenotyper.java @@ -56,7 +56,7 @@ public class UnifiedGenotyper extends LocusWalker { @Argument(fullName="entropyThreshold", shortName="entropy", doc="percentage of mismatches at a locus to be considered having high entropy", required=false) protected double MISMATCH_THRESHOLD = 0.15; - @Output - protected PrintStream out; - - @Output(fullName = "err", shortName = "e", doc = "An error output file presented to the walker. Will overwrite contents if file exists.", required = false) - protected PrintStream err; - - @Output(fullName="output", shortName="O", required=false, doc="Output bam") + @Output(required=false, doc="Output bam") protected String writerFilename = null; + @Argument(fullName="output",shortName="O",doc="Please use --out instead",required=false) + @Deprecated + protected String oldOArg; + @Argument(fullName="bam_compression", shortName="compress", required=false, doc="Compression level to use for output bams [default:5]") protected Integer compressionLevel = 5; @@ -203,8 +200,8 @@ public class IndelRealigner extends ReadWalker { try { indelOutput = new FileWriter(new File(OUT_INDELS)); } catch (Exception e) { - logger.warn("Failed to create output file "+ OUT_INDELS+". Indel output will be suppressed"); - err.println(e.getMessage()); + logger.error("Failed to create output file "+ OUT_INDELS+". Indel output will be suppressed"); + logger.error(e.getMessage()); indelOutput = null; } } @@ -212,8 +209,8 @@ public class IndelRealigner extends ReadWalker { try { statsOutput = new FileWriter(new File(OUT_STATS)); } catch (Exception e) { - logger.warn("Failed to create output file "+ OUT_STATS+". Cleaning stats output will be suppressed"); - err.println(e.getMessage()); + logger.error("Failed to create output file "+ OUT_STATS+". Cleaning stats output will be suppressed"); + logger.error(e.getMessage()); statsOutput = null; } } @@ -221,8 +218,8 @@ public class IndelRealigner extends ReadWalker { try { snpsOutput = new FileWriter(new File(OUT_SNPS)); } catch (Exception e) { - logger.warn("Failed to create output file "+ OUT_SNPS+". Cleaning snps output will be suppressed"); - err.println(e.getMessage()); + logger.error("Failed to create output file "+ OUT_SNPS+". Cleaning snps output will be suppressed"); + logger.error(e.getMessage()); snpsOutput = null; } } diff --git a/java/test/org/broadinstitute/sting/gatk/walkers/indels/IndelRealignerIntegrationTest.java b/java/test/org/broadinstitute/sting/gatk/walkers/indels/IndelRealignerIntegrationTest.java index 8458e55c5..299155d6c 100755 --- a/java/test/org/broadinstitute/sting/gatk/walkers/indels/IndelRealignerIntegrationTest.java +++ b/java/test/org/broadinstitute/sting/gatk/walkers/indels/IndelRealignerIntegrationTest.java @@ -11,7 +11,7 @@ public class IndelRealignerIntegrationTest extends WalkerTest { public void testRealignerLod5() { String[] md5s = {"9247b1437ec3b9bc96590524f245220c", "c4ef635f2597b12b93a73199f07e509b"}; WalkerTestSpec spec = new WalkerTestSpec( - "-T IndelRealigner -noPG -LOD 5 -maxConsensuses 100 -greedy 100 -R " + b36KGReference + " -I " + validationDataLocation + "NA12878.chrom1.SLX.SRP000032.2009_06.bam -L 1:10023000-10030000 -compress 1 -targetIntervals " + validationDataLocation + "cleaner.test.intervals -O %s -stats %s --sortInCoordinateOrderEvenThoughItIsHighlyUnsafe", + "-T IndelRealigner -noPG -LOD 5 -maxConsensuses 100 -greedy 100 -R " + b36KGReference + " -I " + validationDataLocation + "NA12878.chrom1.SLX.SRP000032.2009_06.bam -L 1:10023000-10030000 -compress 1 -targetIntervals " + validationDataLocation + "cleaner.test.intervals -o %s -stats %s --sortInCoordinateOrderEvenThoughItIsHighlyUnsafe", 2, Arrays.asList(md5s)); executeTest("test realigner lod5", spec); @@ -21,7 +21,7 @@ public class IndelRealignerIntegrationTest extends WalkerTest { public void testRealignerLod50() { String[] md5s = {"9247b1437ec3b9bc96590524f245220c", "3735a510513b6fa4161d92155e026283"}; WalkerTestSpec spec = new WalkerTestSpec( - "-T IndelRealigner -noPG -LOD 50 -maxConsensuses 100 -greedy 100 -R " + b36KGReference + " -I " + validationDataLocation + "NA12878.chrom1.SLX.SRP000032.2009_06.bam -L 1:10023000-10030000 -compress 1 -targetIntervals " + validationDataLocation + "cleaner.test.intervals -O %s -stats %s --sortInCoordinateOrderEvenThoughItIsHighlyUnsafe", + "-T IndelRealigner -noPG -LOD 50 -maxConsensuses 100 -greedy 100 -R " + b36KGReference + " -I " + validationDataLocation + "NA12878.chrom1.SLX.SRP000032.2009_06.bam -L 1:10023000-10030000 -compress 1 -targetIntervals " + validationDataLocation + "cleaner.test.intervals -o %s -stats %s --sortInCoordinateOrderEvenThoughItIsHighlyUnsafe", 2, Arrays.asList(md5s)); executeTest("test realigner lod50", spec); @@ -31,7 +31,7 @@ public class IndelRealignerIntegrationTest extends WalkerTest { public void testRealignerKnownsOnly() { String[] md5s = {"7084d4e543bc756730ab306768028530", "74652bd8240291293ec921f8ecfa1622"}; WalkerTestSpec spec = new WalkerTestSpec( - "-T IndelRealigner -noPG -LOD 1.0 -R " + b36KGReference + " -I " + validationDataLocation + "NA12878.chrom1.SLX.SRP000032.2009_06.bam -L 1:10023000-10076000 -compress 1 -targetIntervals " + validationDataLocation + "NA12878.indels.intervals -B knownIndels,VCF," + validationDataLocation + "NA12878.indels.vcf4 -O %s -stats %s --sortInCoordinateOrderEvenThoughItIsHighlyUnsafe -knownsOnly", + "-T IndelRealigner -noPG -LOD 1.0 -R " + b36KGReference + " -I " + validationDataLocation + "NA12878.chrom1.SLX.SRP000032.2009_06.bam -L 1:10023000-10076000 -compress 1 -targetIntervals " + validationDataLocation + "NA12878.indels.intervals -B knownIndels,VCF," + validationDataLocation + "NA12878.indels.vcf4 -o %s -stats %s --sortInCoordinateOrderEvenThoughItIsHighlyUnsafe -knownsOnly", 2, Arrays.asList(md5s)); executeTest("test realigner known indels only", spec);