For Sendu: add a hidden option to allow bams to come out unsorted. We've agreed to let him deal with sorting these puppies on his own.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4767 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
3afa841a6a
commit
7caf666f48
|
|
@ -56,7 +56,6 @@ import org.broadinstitute.sting.utils.collections.Pair;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileWriter;
|
import java.io.FileWriter;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.FileReader;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -83,10 +82,6 @@ public class IndelRealigner extends ReadWalker<Integer, Integer> {
|
||||||
@Output(required=false, doc="Output bam")
|
@Output(required=false, doc="Output bam")
|
||||||
protected StingSAMFileWriter writer = null;
|
protected StingSAMFileWriter writer = null;
|
||||||
|
|
||||||
@Argument(fullName="output",shortName="O",doc="Please use --out instead")
|
|
||||||
@Deprecated
|
|
||||||
protected String oldOArg;
|
|
||||||
|
|
||||||
@Argument(fullName="useOnlyKnownIndels", shortName="knownsOnly", required=false, doc="Don't run 'Smith-Waterman' to generate alternate consenses; use only known indels provided as RODs for constructing the alternate references.")
|
@Argument(fullName="useOnlyKnownIndels", shortName="knownsOnly", required=false, doc="Don't run 'Smith-Waterman' to generate alternate consenses; use only known indels provided as RODs for constructing the alternate references.")
|
||||||
protected boolean USE_KNOWN_INDELS_ONLY = false;
|
protected boolean USE_KNOWN_INDELS_ONLY = false;
|
||||||
|
|
||||||
|
|
@ -106,6 +101,11 @@ public class IndelRealigner extends ReadWalker<Integer, Integer> {
|
||||||
"if this value is exceeded, realignment is not attempted and the reads are passed to the output file(s) as-is", required=false)
|
"if this value is exceeded, realignment is not attempted and the reads are passed to the output file(s) as-is", required=false)
|
||||||
protected int MAX_READS = 20000;
|
protected int MAX_READS = 20000;
|
||||||
|
|
||||||
|
@Hidden
|
||||||
|
@Argument(fullName="doNotSortEvenThoughItIsHighlyUnsafe", required=false,
|
||||||
|
doc="Should we not sort the final bam at all?")
|
||||||
|
protected boolean DO_NOT_SORT = false;
|
||||||
|
|
||||||
@Argument(fullName="sortInCoordinateOrderEvenThoughItIsHighlyUnsafe", required=false,
|
@Argument(fullName="sortInCoordinateOrderEvenThoughItIsHighlyUnsafe", required=false,
|
||||||
doc="Should we sort the final bam in coordinate order even though it will be malformed because "+
|
doc="Should we sort the final bam in coordinate order even though it will be malformed because "+
|
||||||
"mate pairs of realigned reads will contain inaccurate information?")
|
"mate pairs of realigned reads will contain inaccurate information?")
|
||||||
|
|
@ -334,18 +334,17 @@ public class IndelRealigner extends ReadWalker<Integer, Integer> {
|
||||||
}
|
}
|
||||||
|
|
||||||
private SAMFileHeader setupHeader(SAMFileHeader header) {
|
private SAMFileHeader setupHeader(SAMFileHeader header) {
|
||||||
if ( SORT_IN_COORDINATE_ORDER )
|
if ( DO_NOT_SORT )
|
||||||
header.setSortOrder(SAMFileHeader.SortOrder.coordinate);
|
header.setSortOrder(SAMFileHeader.SortOrder.unsorted);
|
||||||
else
|
else if ( SORT_IN_COORDINATE_ORDER )
|
||||||
header.setSortOrder(SAMFileHeader.SortOrder.queryname);
|
|
||||||
return header;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setupWriter(SAMFileHeader header) {
|
|
||||||
if ( SORT_IN_COORDINATE_ORDER )
|
|
||||||
header.setSortOrder(SAMFileHeader.SortOrder.coordinate);
|
header.setSortOrder(SAMFileHeader.SortOrder.coordinate);
|
||||||
else
|
else
|
||||||
header.setSortOrder(SAMFileHeader.SortOrder.queryname);
|
header.setSortOrder(SAMFileHeader.SortOrder.queryname);
|
||||||
|
return header;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setupWriter(SAMFileHeader header) {
|
||||||
|
header = setupHeader(header);
|
||||||
|
|
||||||
if ( !NO_PG_TAG ) {
|
if ( !NO_PG_TAG ) {
|
||||||
final SAMProgramRecord programRecord = new SAMProgramRecord(PROGRAM_RECORD_NAME);
|
final SAMProgramRecord programRecord = new SAMProgramRecord(PROGRAM_RECORD_NAME);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue