Merge branch 'unstable' of github.com:broadinstitute/cmi-gatk into unstable
This commit is contained in:
commit
7e1657d243
|
|
@ -181,15 +181,6 @@ public class ReduceReads extends ReadWalker<LinkedList<GATKSAMRecord>, ReduceRea
|
|||
@Argument(fullName = "minimum_del_proportion_to_trigger_variant", shortName = "mindel", doc = "", required = false)
|
||||
private double minIndelProportionToTriggerVariant = 0.05;
|
||||
|
||||
/**
|
||||
* Minimum proportion of indels in a site to trigger a variant region. Anything below this will be
|
||||
* considered consensus.
|
||||
*/
|
||||
@Argument(fullName = "contigs", shortName = "ctg", doc = "", required = false)
|
||||
private int nContigs = 2;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Downsamples the coverage of a variable region approximately (guarantees the minimum to be equal to this).
|
||||
* A value of 0 turns downsampling off.
|
||||
|
|
@ -197,6 +188,14 @@ public class ReduceReads extends ReadWalker<LinkedList<GATKSAMRecord>, ReduceRea
|
|||
@Argument(fullName = "downsample_coverage", shortName = "ds", doc = "", required = false)
|
||||
private int downsampleCoverage = 250;
|
||||
|
||||
/**
|
||||
* Number of chromossomes in the sample (this is used for the polyploid consensus compression). Only
|
||||
* tested for humans (or organisms with n=2). Use at your own risk!
|
||||
*/
|
||||
@Hidden
|
||||
@Argument(fullName = "contigs", shortName = "ctg", doc = "", required = false)
|
||||
private int nContigs = 2;
|
||||
|
||||
@Hidden
|
||||
@Argument(fullName = "", shortName = "dl", doc = "", required = false)
|
||||
private int debugLevel = 0;
|
||||
|
|
|
|||
|
|
@ -124,32 +124,28 @@ public class SAMFileWriterArgumentTypeDescriptor extends ArgumentTypeDescriptor
|
|||
|
||||
// This parser has been passed a null filename and the GATK is not responsible for creating a type default for the object;
|
||||
// therefore, the user must have failed to specify a type default
|
||||
if(writerFileName == null) {
|
||||
if(!source.isRequired())
|
||||
throw new MissingArgumentValueException(bamArgumentDefinition);
|
||||
if(generateMD5)
|
||||
if(writerFileName == null && generateMD5)
|
||||
throw new ArgumentException("MD5 generation specified, but no output file specified. If md5 generation is desired, please specify a BAM output file and an md5 file will be written alongside.");
|
||||
}
|
||||
|
||||
// Create the stub and set parameters.
|
||||
SAMFileWriterStub stub;
|
||||
if ( writerFileName != null )
|
||||
SAMFileWriterStub stub = null; // stub = new SAMFileWriterStub(engine, defaultOutputStream);
|
||||
|
||||
if ( writerFileName != null ) {
|
||||
stub = new SAMFileWriterStub(engine, new File(writerFileName));
|
||||
else
|
||||
stub = new SAMFileWriterStub(engine, defaultOutputStream);
|
||||
|
||||
if ( compressionLevel != null )
|
||||
stub.setCompressionLevel(compressionLevel);
|
||||
if ( indexOnTheFly )
|
||||
stub.setIndexOnTheFly(indexOnTheFly);
|
||||
if ( generateMD5 )
|
||||
stub.setGenerateMD5(generateMD5);
|
||||
if ( simplifyBAM )
|
||||
stub.setSimplifyBAM(simplifyBAM);
|
||||
if ( compressionLevel != null )
|
||||
stub.setCompressionLevel(compressionLevel);
|
||||
if ( indexOnTheFly )
|
||||
stub.setIndexOnTheFly(indexOnTheFly);
|
||||
if ( generateMD5 )
|
||||
stub.setGenerateMD5(generateMD5);
|
||||
if ( simplifyBAM )
|
||||
stub.setSimplifyBAM(simplifyBAM);
|
||||
|
||||
// WARNING: Side effects required by engine!
|
||||
parsingEngine.addTags(stub,getArgumentTags(matches));
|
||||
engine.addOutput(stub);
|
||||
// WARNING: Side effects required by engine!
|
||||
parsingEngine.addTags(stub,getArgumentTags(matches));
|
||||
engine.addOutput(stub);
|
||||
}
|
||||
|
||||
return stub;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -370,8 +370,6 @@ public class IndelRealigner extends ReadWalker<Integer, Integer> {
|
|||
|
||||
currentInterval = intervals.hasNext() ? intervals.next() : null;
|
||||
|
||||
writerToUse = writer;
|
||||
|
||||
if ( N_WAY_OUT != null ) {
|
||||
boolean createIndex = true;
|
||||
|
||||
|
|
@ -383,9 +381,9 @@ public class IndelRealigner extends ReadWalker<Integer, Integer> {
|
|||
createIndex, generateMD5s,createProgramRecord(),KEEP_ALL_PG_RECORDS);
|
||||
}
|
||||
} else {
|
||||
|
||||
// set up the output writer
|
||||
setupWriter(getToolkit().getSAMFileHeader());
|
||||
writerToUse = writer;
|
||||
}
|
||||
manager = new ConstrainedMateFixingManager(writerToUse, getToolkit().getGenomeLocParser(), MAX_ISIZE_FOR_MOVEMENT, MAX_POS_MOVE_ALLOWED, MAX_RECORDS_IN_MEMORY);
|
||||
|
||||
|
|
|
|||
|
|
@ -113,4 +113,14 @@ public class IndelRealignerIntegrationTest extends WalkerTest {
|
|||
executeTest(String.format("realigner [%s]", entry.getKey()), spec);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNWayOut() {
|
||||
WalkerTestSpec spec1 = new WalkerTestSpec(
|
||||
baseCommandPrefix + " -nWayOut .clean.bam ",
|
||||
1,
|
||||
Arrays.asList("d41d8cd98f00b204e9800998ecf8427e"));
|
||||
executeTest("test realigner nWayOut", spec1);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue