package org.broadinstitute.sting.gatk.walkers.recalibration;

import org.broadinstitute.sting.WalkerTest;
import org.junit.Test;

import java.util.ArrayList;


public class RecalibrationWalkersPerformanceTest extends WalkerTest {

    private void testCountCovariatesWholeGenomeRunner(String moreArgs) {
        WalkerTestSpec spec = new WalkerTestSpec(
                "-R " + hg18Reference +
                        " -T CountCovariates" +
                        " -I " + evaluationDataLocation + "NA12878.GAII.chr1.50MB.bam" +
                        " -L chr1:1-50,000,000" +
                        " -standard" +
                        " -OQ" +
                        " -recalFile /dev/null" + moreArgs,
                0,
                new ArrayList<String>(0));
        executeTest("testCountCovariatesWholeGenome", spec);
    }

    private  void testCountCovariatesWholeExomeRunner(String moreArgs) {
        WalkerTestSpec spec = new WalkerTestSpec(
                "-R " + hg18Reference +
                        " -T CountCovariates" +
                        " -I " + evaluationDataLocation + "NA12878.ESP.WEx.chr1.bam" +
                        " -L " + evaluationDataLocation + "whole_exome_agilent_designed_120.targets.chr1.interval_list" +
                        " -standard" +
                        " -OQ" +
                        " -recalFile /dev/null" + moreArgs,
                0,
                new ArrayList<String>(0));
        executeTest("testCountCovariatesWholeExome", spec);
    }

    @Test
    public void testCountCovariatesWholeGenome() { testCountCovariatesWholeGenomeRunner(""); }
    @Test
    public void testCountCovariatesWholeGenomeParallel() { testCountCovariatesWholeGenomeRunner(" -nt 4"); }

    @Test
    public void testCountCovariatesWholeExome() { testCountCovariatesWholeExomeRunner(""); }
    @Test
    public void testCountCovariatesWholeExomeParallel() { testCountCovariatesWholeExomeRunner(" -nt 4"); }

    @Test
    public void testTableRecalibratorWholeGenome() {
        WalkerTestSpec spec = new WalkerTestSpec(
                "-R " + hg18Reference +
                        " -T TableRecalibration" +
                        " -I " + evaluationDataLocation + "NA12878.GAII.chr1.50MB.bam" +
                        " -L chr1:1-50,000,000" +
                        " -OQ" +
                        " -recalFile " + evaluationDataLocation + "NA12878.GAII.chr1.50MB.recal.csv" +
                        " -outputBam /dev/null",
                0,
                new ArrayList<String>(0));
        executeTest("testTableRecalibratorWholeGenome", spec);
    }

    @Test
    public void testTableRecalibratorWholeExome() {
        WalkerTestSpec spec = new WalkerTestSpec(
                "-R " + hg18Reference +
                        " -T TableRecalibration" +
                        " -I " + evaluationDataLocation + "NA12878.ESP.WEx.chr1.bam" +
                        " -L " + evaluationDataLocation + "whole_exome_agilent_designed_120.targets.chr1.interval_list" +
                        " -OQ" +
                        " -recalFile " + evaluationDataLocation + "NA12878.ESP.WEx.chr1.recal.csv" +
                        " -outputBam /dev/null",
                0,
                new ArrayList<String>(0));
        executeTest("testTableRecalibratorWholeExome", spec);
    }
}
@@ -2466,32 +2466,24 @@
         %22 -o
-utputBam
  /dev/null%22,
@@ -3193,16 +3193,8 @@
 %22 -o
-utputBam
  /de

Fix busted performance test (-outputBam has been deprecated in the BQ recalibrator in favor of -o)