Automatically write BAM file indices for coordinate-sorted BAMs.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4209 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
529eecd4dc
commit
da11efa1a2
|
|
@ -50,6 +50,10 @@ public class SAMFileWriterStorage implements SAMFileWriter, Storage<SAMFileWrite
|
|||
public SAMFileWriterStorage( SAMFileWriterStub stub, File file ) {
|
||||
this.file = file;
|
||||
SAMFileWriterFactory factory = new SAMFileWriterFactory();
|
||||
// Enable automatic index creation for pre-sorted BAMs.
|
||||
if (stub.getFileHeader().getSortOrder().equals(SAMFileHeader.SortOrder.coordinate))
|
||||
factory.setCreateIndex(true);
|
||||
// Adjust max records in RAM.
|
||||
if(stub.getMaxRecordsInRam() != null)
|
||||
factory.setMaxRecordsInRam(stub.getMaxRecordsInRam());
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue