public class RevertSam extends CommandLineProgram
Modifier and Type | Field and Description |
---|---|
List<String> |
ATTRIBUTE_TO_CLEAR |
File |
INPUT |
String |
LIBRARY_NAME |
double |
MAX_DISCARD_FRACTION |
File |
OUTPUT |
boolean |
REMOVE_ALIGNMENT_INFORMATION |
boolean |
REMOVE_DUPLICATE_INFORMATION |
boolean |
RESTORE_ORIGINAL_QUALITIES |
String |
SAMPLE_ALIAS |
boolean |
SANITIZE |
SAMFileHeader.SortOrder |
SORT_ORDER |
COMPRESSION_LEVEL, CREATE_INDEX, CREATE_MD5_FILE, GA4GH_CLIENT_SECRETS, MAX_RECORDS_IN_RAM, QUIET, REFERENCE_SEQUENCE, TMP_DIR, VALIDATION_STRINGENCY, VERBOSITY
Constructor and Description |
---|
RevertSam() |
Modifier and Type | Method and Description |
---|---|
protected String[] |
customCommandLineValidation()
Enforce that output ordering is queryname when sanitization is turned on since it requires a queryname sort.
|
protected int |
doWork()
Do the work after command line has been parsed.
|
static void |
main(String[] args)
Default main method impl.
|
void |
revertSamRecord(SAMRecord rec)
Takes an individual SAMRecord and applies the set of changes/reversions to it that
have been requested by program level options.
|
getCommandLine, getCommandLineParser, getDefaultHeaders, getMetricsFile, getNestedOptions, getNestedOptionsForHelp, getStandardUsagePreamble, getVersion, instanceMain, instanceMainWithExit, parseArgs, setDefaultHeaders
@Option(shortName="I", doc="The input SAM/BAM file to revert the state of.") public File INPUT
@Option(shortName="SO", doc="The sort order to create the reverted output file with.") public SAMFileHeader.SortOrder SORT_ORDER
@Option(shortName="OQ", doc="True to restore original qualities from the OQ field to the QUAL field if available.") public boolean RESTORE_ORIGINAL_QUALITIES
@Option(doc="Remove duplicate read flags from all reads. Note that if this is true and REMOVE_ALIGNMENT_INFORMATION==false, the output may have the unusual but sometimes desirable trait of having unmapped reads that are marked as duplicates.") public boolean REMOVE_DUPLICATE_INFORMATION
@Option(doc="Remove all alignment information from the file.") public boolean REMOVE_ALIGNMENT_INFORMATION
@Option(doc="When removing alignment information, the set of optional tags to remove.") public List<String> ATTRIBUTE_TO_CLEAR
@Option(doc="WARNING: This option is potentially destructive. If enabled will discard reads in order to produce a consistent output BAM. Reads discarded include (but are not limited to) paired reads with missing mates, duplicated records, records with mismatches in length of bases and qualities. This option can only be enabled if the output sort order is queryname and will always cause sorting to occur.") public boolean SANITIZE
@Option(doc="If SANITIZE=true and higher than MAX_DISCARD_FRACTION reads are discarded due to sanitization thenthe program will exit with an Exception instead of exiting cleanly. Output BAM will still be valid.") public double MAX_DISCARD_FRACTION
@Option(doc="The sample alias to use in the reverted output file. This will override the existing sample alias in the file and is used only if all the read groups in the input file have the same sample alias ", shortName="ALIAS", optional=true) public String SAMPLE_ALIAS
public static void main(String[] args)
protected String[] customCommandLineValidation()
customCommandLineValidation
in class CommandLineProgram
protected int doWork()
CommandLineProgram
doWork
in class CommandLineProgram
public void revertSamRecord(SAMRecord rec)