Merge branch 'master' of ssh://gsa4.broadinstitute.org/humgen/gsa-scr1/gsa-engineering/git/unstable
This commit is contained in:
commit
0528337467
|
|
@ -130,12 +130,12 @@ public class CommandLineGATK extends CommandLineExecutable {
|
||||||
|
|
||||||
// can't close tribble index when writing
|
// can't close tribble index when writing
|
||||||
if ( message.indexOf("Unable to close index for") != -1 )
|
if ( message.indexOf("Unable to close index for") != -1 )
|
||||||
exitSystemWithUserError(new UserException(t.getCause().getMessage()));
|
exitSystemWithUserError(new UserException(t.getCause() == null ? message : t.getCause().getMessage()));
|
||||||
|
|
||||||
// disk is full
|
// disk is full
|
||||||
if ( message.indexOf("No space left on device") != -1 )
|
if ( message.indexOf("No space left on device") != -1 )
|
||||||
exitSystemWithUserError(new UserException(t.getMessage()));
|
exitSystemWithUserError(new UserException(t.getMessage()));
|
||||||
if ( t.getCause().getMessage().indexOf("No space left on device") != -1 )
|
if ( t.getCause() != null && t.getCause().getMessage().indexOf("No space left on device") != -1 )
|
||||||
exitSystemWithUserError(new UserException(t.getCause().getMessage()));
|
exitSystemWithUserError(new UserException(t.getCause().getMessage()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,7 @@ public class SAMFileWriterStorage implements SAMFileWriter, Storage<SAMFileWrite
|
||||||
if (stub.getGenerateMD5())
|
if (stub.getGenerateMD5())
|
||||||
factory.setCreateMd5File(true);
|
factory.setCreateMd5File(true);
|
||||||
// Adjust max records in RAM.
|
// Adjust max records in RAM.
|
||||||
|
// TODO -- this doesn't actually work because of a bug in Picard; do not use until fixed
|
||||||
if(stub.getMaxRecordsInRam() != null)
|
if(stub.getMaxRecordsInRam() != null)
|
||||||
factory.setMaxRecordsInRam(stub.getMaxRecordsInRam());
|
factory.setMaxRecordsInRam(stub.getMaxRecordsInRam());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -73,19 +73,7 @@ public class LeftAlignIndels extends ReadWalker<Integer, Integer> {
|
||||||
@Output(required=false, doc="Output bam")
|
@Output(required=false, doc="Output bam")
|
||||||
protected StingSAMFileWriter writer = null;
|
protected StingSAMFileWriter writer = null;
|
||||||
|
|
||||||
/**
|
public void initialize() {}
|
||||||
* If set too low, the tool may run out of system file descriptors needed to perform sorting; if too high, the tool
|
|
||||||
* may run out of memory. We recommend that you additionally tell Java to use a temp directory with plenty of available
|
|
||||||
* space (by setting java.io.tempdir on the command-line).
|
|
||||||
*/
|
|
||||||
@Argument(fullName="maxReadsInRam", shortName="maxInRam", doc="max reads allowed to be kept in memory at a time by the output writer", required=false)
|
|
||||||
protected int MAX_RECORDS_IN_RAM = 500000;
|
|
||||||
|
|
||||||
public void initialize() {
|
|
||||||
// set up the output writer
|
|
||||||
if ( writer != null )
|
|
||||||
writer.setMaxRecordsInRam(MAX_RECORDS_IN_RAM);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void emit(final SAMRecord read) {
|
private void emit(final SAMRecord read) {
|
||||||
if ( writer != null )
|
if ( writer != null )
|
||||||
|
|
|
||||||
|
|
@ -476,7 +476,6 @@ public class AlignmentUtils {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case D:
|
case D:
|
||||||
case N:
|
|
||||||
if (!isDeletion) {
|
if (!isDeletion) {
|
||||||
alignmentPos += elementLength;
|
alignmentPos += elementLength;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -498,6 +497,7 @@ public class AlignmentUtils {
|
||||||
break;
|
break;
|
||||||
case H:
|
case H:
|
||||||
case P:
|
case P:
|
||||||
|
case N:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new ReviewedStingException("Unsupported cigar operator: " + ce.getOperator());
|
throw new ReviewedStingException("Unsupported cigar operator: " + ce.getOperator());
|
||||||
|
|
@ -516,16 +516,13 @@ public class AlignmentUtils {
|
||||||
final int elementLength = ce.getLength();
|
final int elementLength = ce.getLength();
|
||||||
|
|
||||||
switch (ce.getOperator()) {
|
switch (ce.getOperator()) {
|
||||||
case I:
|
|
||||||
case S:
|
|
||||||
break;
|
|
||||||
case D:
|
case D:
|
||||||
case N:
|
case N:
|
||||||
alignmentLength += elementLength;
|
|
||||||
break;
|
|
||||||
case M:
|
case M:
|
||||||
alignmentLength += elementLength;
|
alignmentLength += elementLength;
|
||||||
break;
|
break;
|
||||||
|
case I:
|
||||||
|
case S:
|
||||||
case H:
|
case H:
|
||||||
case P:
|
case P:
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -373,7 +373,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest {
|
||||||
|
|
||||||
// --------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// testing SnpEff
|
// testing MinIndelFraction
|
||||||
//
|
//
|
||||||
// --------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
@ -403,4 +403,18 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest {
|
||||||
Arrays.asList("3f07efb768e08650a7ce333edd4f9a52"));
|
Arrays.asList("3f07efb768e08650a7ce333edd4f9a52"));
|
||||||
executeTest("test minIndelFraction 1.0", spec);
|
executeTest("test minIndelFraction 1.0", spec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// --------------------------------------------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// testing Ns in CIGAR
|
||||||
|
//
|
||||||
|
// --------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testNsInCigar() {
|
||||||
|
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
|
||||||
|
"-T UnifiedGenotyper -R " + b37KGReference + " -nosl --no_cmdline_in_header -I " + validationDataLocation + "testWithNs.bam -o %s -L 8:141799600-141814700", 1,
|
||||||
|
Arrays.asList("22c9fd65ce3298bd7fbf400c9c209f29"));
|
||||||
|
executeTest("test calling on reads with Ns in CIGAR", spec);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue