Package picard.sam
Class RevertOriginalBaseQualitiesAndAddMateCigar
java.lang.Object
picard.cmdline.CommandLineProgram
picard.sam.RevertOriginalBaseQualitiesAndAddMateCigar
@DocumentedFeature
public class RevertOriginalBaseQualitiesAndAddMateCigar
extends CommandLineProgram
This tool reverts the original base qualities (if specified) and adds the mate cigar tag to mapped SAM, BAM or CRAM files.
If the file does not have OQs and already has mate cigar tags, nothing is done.
New BAM/BAI/MD5 files are created.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Used as a return for the canSkipSAMFile function. -
Field Summary
FieldsModifier and TypeFieldDescriptionint
boolean
htsjdk.samtools.SAMFileHeader.SortOrder
Fields inherited from class picard.cmdline.CommandLineProgram
COMPRESSION_LEVEL, CREATE_INDEX, CREATE_MD5_FILE, MAX_ALLOWABLE_ONE_LINE_SUMMARY_LENGTH, MAX_RECORDS_IN_RAM, QUIET, REFERENCE_SEQUENCE, referenceSequence, specialArgumentsCollection, SYNTAX_TRANSITION_URL, TMP_DIR, USE_JDK_DEFLATER, USE_JDK_INFLATER, VALIDATION_STRINGENCY, VERBOSITY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncanSkipSAMFile
(File inputFile, int maxRecordsToExamine, boolean revertOriginalBaseQualities, File referenceFasta) Checks if we can skip the SAM/BAM/CRAM file when reverting origin base qualities and adding mate cigars.int
doWork()
Do the work after command line has been parsed.Methods inherited from class picard.cmdline.CommandLineProgram
checkRInstallation, customCommandLineValidation, getCommandLine, getCommandLineParser, getCommandLineParserForArgs, getDefaultHeaders, getFaqLink, getMetricsFile, getPGRecord, getStandardUsagePreamble, getStandardUsagePreamble, getVersion, hasWebDocumentation, instanceMain, instanceMainWithExit, makeReferenceArgumentCollection, parseArgs, requiresReference, setDefaultHeaders, useLegacyParser
-
Field Details
-
INPUT
@Argument(shortName="I", doc="The input SAM/BAM/CRAM file to revert the state of.") public File INPUT -
OUTPUT
-
SORT_ORDER
@Argument(shortName="SO", doc="The sort order to create the reverted output file with.By default, the sort order will be the same as the input.", optional=true) public htsjdk.samtools.SAMFileHeader.SortOrder SORT_ORDER -
RESTORE_ORIGINAL_QUALITIES
@Argument(shortName="OQ", doc="True to restore original qualities from the OQ field to the QUAL field if available.") public boolean RESTORE_ORIGINAL_QUALITIES -
MAX_RECORDS_TO_EXAMINE
@Argument(doc="The maximum number of records to examine to determine if we can exit early and not output, given that there are a no original base qualities (if we are to restore) and mate cigars exist. Set to 0 to never skip the file.") public int MAX_RECORDS_TO_EXAMINE
-
-
Constructor Details
-
RevertOriginalBaseQualitiesAndAddMateCigar
public RevertOriginalBaseQualitiesAndAddMateCigar()
-
-
Method Details
-
doWork
public int doWork()Description copied from class:CommandLineProgram
Do the work after command line has been parsed. RuntimeException may be thrown by this method, and are reported appropriately.- Specified by:
doWork
in classCommandLineProgram
- Returns:
- program exit status.
-
canSkipSAMFile
public static RevertOriginalBaseQualitiesAndAddMateCigar.CanSkipSamFile canSkipSAMFile(File inputFile, int maxRecordsToExamine, boolean revertOriginalBaseQualities, File referenceFasta) Checks if we can skip the SAM/BAM/CRAM file when reverting origin base qualities and adding mate cigars.- Parameters:
inputFile
- the SAM/BAM/CRAM input filemaxRecordsToExamine
- the maximum number of records to examine before quittingrevertOriginalBaseQualities
- true if we are to revert original base qualities, false otherwise- Returns:
- whether we can skip or not, and the explanation why.
-