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.
  • Field Details

    • INPUT

      @Argument(shortName="I", doc="The input SAM/BAM/CRAM file to revert the state of.") public File INPUT
    • OUTPUT

      @Argument(shortName="O", doc="The output SAM/BAM/CRAM 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
  • 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 class CommandLineProgram
      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 file
      maxRecordsToExamine - the maximum number of records to examine before quitting
      revertOriginalBaseQualities - true if we are to revert original base qualities, false otherwise
      Returns:
      whether we can skip or not, and the explanation why.