Choose whether to keep program records based on Walker
* Add keepProgramRecords argument * Make removeProgramRecords / keepProgramRecords override default
This commit is contained in:
parent
e04989f76d
commit
524d7ea306
|
|
@ -797,6 +797,15 @@ public class GenomeAnalysisEngine {
|
||||||
if ( getWalkerBAQApplicationTime() == BAQ.ApplicationTime.FORBIDDEN && argCollection.BAQMode != BAQ.CalculationMode.OFF)
|
if ( getWalkerBAQApplicationTime() == BAQ.ApplicationTime.FORBIDDEN && argCollection.BAQMode != BAQ.CalculationMode.OFF)
|
||||||
throw new UserException.BadArgumentValue("baq", "Walker cannot accept BAQ'd base qualities, and yet BAQ mode " + argCollection.BAQMode + " was requested.");
|
throw new UserException.BadArgumentValue("baq", "Walker cannot accept BAQ'd base qualities, and yet BAQ mode " + argCollection.BAQMode + " was requested.");
|
||||||
|
|
||||||
|
if (argCollection.removeProgramRecords && argCollection.keepProgramRecords)
|
||||||
|
throw new UserException.BadArgumentValue("rpr / kpr", "Cannot enable both options");
|
||||||
|
|
||||||
|
// LocusWalkers don't use program records, so remove them by default to save memory
|
||||||
|
boolean removeProgramRecords = (this.walker instanceof LocusWalker) || argCollection.removeProgramRecords;
|
||||||
|
|
||||||
|
if (argCollection.keepProgramRecords)
|
||||||
|
removeProgramRecords = false;
|
||||||
|
|
||||||
return new SAMDataSource(
|
return new SAMDataSource(
|
||||||
samReaderIDs,
|
samReaderIDs,
|
||||||
threadAllocation,
|
threadAllocation,
|
||||||
|
|
@ -814,7 +823,7 @@ public class GenomeAnalysisEngine {
|
||||||
refReader,
|
refReader,
|
||||||
getBaseRecalibration(),
|
getBaseRecalibration(),
|
||||||
argCollection.defaultBaseQualities,
|
argCollection.defaultBaseQualities,
|
||||||
argCollection.removeProgramRecords);
|
removeProgramRecords);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -249,9 +249,12 @@ public class GATKArgumentCollection {
|
||||||
@Argument(fullName = "validation_strictness", shortName = "S", doc = "How strict should we be with validation", required = false)
|
@Argument(fullName = "validation_strictness", shortName = "S", doc = "How strict should we be with validation", required = false)
|
||||||
public SAMFileReader.ValidationStringency strictnessLevel = SAMFileReader.ValidationStringency.SILENT;
|
public SAMFileReader.ValidationStringency strictnessLevel = SAMFileReader.ValidationStringency.SILENT;
|
||||||
|
|
||||||
@Argument(fullName = "remove_program_records", shortName = "rpr", doc = "Should we remove program records from the SAM header", required = false)
|
@Argument(fullName = "remove_program_records", shortName = "rpr", doc = "Should we override the Walker's default and remove program records from the SAM header", required = false)
|
||||||
public boolean removeProgramRecords = false;
|
public boolean removeProgramRecords = false;
|
||||||
|
|
||||||
|
@Argument(fullName = "keep_program_records", shortName = "kpr", doc = "Should we override the Walker's default and keep program records from the SAM header", required = false)
|
||||||
|
public boolean keepProgramRecords = false;
|
||||||
|
|
||||||
@Argument(fullName = "unsafe", shortName = "U", doc = "If set, enables unsafe operations: nothing will be checked at runtime. For expert users only who know what they are doing. We do not support usage of this argument.", required = false)
|
@Argument(fullName = "unsafe", shortName = "U", doc = "If set, enables unsafe operations: nothing will be checked at runtime. For expert users only who know what they are doing. We do not support usage of this argument.", required = false)
|
||||||
public ValidationExclusion.TYPE unsafe;
|
public ValidationExclusion.TYPE unsafe;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue