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 BAMs. 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 Classes Modifier and Type Class Description static class
RevertOriginalBaseQualitiesAndAddMateCigar.CanSkipSamFile
Used as a return for the canSkipSAMFile function.
-
Field Summary
Fields Modifier and Type Field Description File
INPUT
int
MAX_RECORDS_TO_EXAMINE
File
OUTPUT
boolean
RESTORE_ORIGINAL_QUALITIES
htsjdk.samtools.SAMFileHeader.SortOrder
SORT_ORDER
-
Fields inherited from class picard.cmdline.CommandLineProgram
COMPRESSION_LEVEL, CREATE_INDEX, CREATE_MD5_FILE, GA4GH_CLIENT_SECRETS, MAX_ALLOWABLE_ONE_LINE_SUMMARY_LENGTH, MAX_RECORDS_IN_RAM, QUIET, REFERENCE_SEQUENCE, referenceSequence, specialArgumentsCollection, TMP_DIR, USE_JDK_DEFLATER, USE_JDK_INFLATER, VALIDATION_STRINGENCY, VERBOSITY
-
-
Constructor Summary
Constructors Constructor Description RevertOriginalBaseQualitiesAndAddMateCigar()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RevertOriginalBaseQualitiesAndAddMateCigar.CanSkipSamFile
canSkipSAMFile(File inputFile, int maxRecordsToExamine, boolean revertOriginalBaseQualities, File referenceFasta)
Checks if we can skip the SAM/BAM 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
customCommandLineValidation, getCommandLine, getCommandLineParser, getCommandLineParserForArgs, getDefaultHeaders, getFaqLink, getMetricsFile, getPGRecord, getStandardUsagePreamble, getStandardUsagePreamble, getVersion, hasWebDocumentation, instanceMain, instanceMainWithExit, makeReferenceArgumentCollection, parseArgs, requiresReference, setDefaultHeaders, useLegacyParser
-
-
-
-
Field Detail
-
INPUT
@Argument(shortName="I", doc="The input SAM/BAM file to revert the state of.") public File INPUT
-
OUTPUT
@Argument(shortName="O", doc="The output SAM/BAM file to create.") public File 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
-
-
Method Detail
-
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 file when reverting origin base qualities and adding mate cigars.- Parameters:
inputFile
- the SAM/BAM 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.
-
-