public class RevertSam extends CommandLineProgram
Modifier and Type | Field and Description |
---|---|
java.util.List<java.lang.String> |
ATTRIBUTE_TO_CLEAR |
java.io.File |
INPUT |
java.lang.String |
LIBRARY_NAME |
double |
MAX_DISCARD_FRACTION |
java.io.File |
OUTPUT |
boolean |
OUTPUT_BY_READGROUP |
java.io.File |
OUTPUT_MAP |
boolean |
REMOVE_ALIGNMENT_INFORMATION |
boolean |
REMOVE_DUPLICATE_INFORMATION |
boolean |
RESTORE_ORIGINAL_QUALITIES |
java.lang.String |
SAMPLE_ALIAS |
boolean |
SANITIZE |
htsjdk.samtools.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 java.lang.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(java.lang.String[] args)
Default main method impl.
|
void |
revertSamRecord(htsjdk.samtools.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 java.io.File INPUT
@Option(mutex="OUTPUT_MAP", shortName="O", doc="The output SAM/BAM file to create, or an output directory if OUTPUT_BY_READGROUP is true.") public java.io.File OUTPUT
@Option(mutex="OUTPUT", shortName="OM", doc="Tab separated file with two columns, READ_GROUP_ID and OUTPUT, providing file mapping only used if OUTPUT_BY_READGROUP is true.") public java.io.File OUTPUT_MAP
@Option(shortName="OBR", doc="When true, outputs each read group in a separate file.") public boolean OUTPUT_BY_READGROUP
@Option(shortName="SO", doc="The sort order to create the reverted output file with.") public htsjdk.samtools.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 java.util.List<java.lang.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 java.lang.String SAMPLE_ALIAS
public static void main(java.lang.String[] args)
protected java.lang.String[] customCommandLineValidation()
customCommandLineValidation
in class CommandLineProgram
protected int doWork()
CommandLineProgram
doWork
in class CommandLineProgram
public void revertSamRecord(htsjdk.samtools.SAMRecord rec)