Temporary hack to disable index creation when target BAM is /dev/null. Tim

promises me that Picard will put in a real solution next week.


git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4220 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
hanna 2010-09-07 16:57:51 +00:00
parent 754c2c761e
commit 501f6a0e14
1 changed files with 5 additions and 0 deletions

View File

@ -58,6 +58,11 @@ public class SAMFileWriterStorage implements SAMFileWriter, Storage<SAMFileWrite
factory.setMaxRecordsInRam(stub.getMaxRecordsInRam());
if(stub.getSAMFile() != null) {
// HACK: Turn setCreateIndex off if the SAM file is null. Picard has pledged to fix this
// during the week of 14 Sept 2010. Eliminate this check when they do.
if(stub.getSAMFile().getPath().equals("/dev/null"))
factory.setCreateIndex(false);
if( stub.getCompressionLevel() != null )
this.writer = factory.makeBAMWriter( stub.getFileHeader(), stub.isPresorted(), file, stub.getCompressionLevel() );
else