Overview of the
revert function of
revert option on the bamUtil executable reverts the specified SAM/BAM by replacing the specified fields with their previous values (if known) and removes specified tags.
Currently there are options to revert the CIGAR and POS to the original values that are stored in the OC & OP fields and to revert the quality to its original value found in the OQ tag.
keepTags parameter is used to indicate not to remove the tags used for reverting.
Additional parameters allow for the removal of any other tags in order to cleanup the SAM/BAM file.
NOTE: Does not reorder the BAM file after modifying the position, so the resulting file may not be sorted by coordinate.
Required Parameters: --in : the SAM/BAM file to be read --out : the SAM/BAM file to be written Optional Parameters: --cigar : update the cigar and the position based on the OC & OP tags. --qual : update the quality based on the OQ tag. --keepTags : keep the tags that are used to update the record. Default is to remove them. --rmBQ : Remove the BQ Tag. --rmTags : Remove the specified Tags formatted as Tag:Type;Tag:Type;Tag:Type... --noeof : do not expect an EOF block on a bam file. --params : print the parameter settings
./bam revert --in <inputFile> --out <outputFile.sam/bam/ubam (ubam is uncompressed bam)> [--cigar] [--qual] [--keepTags] [--rmBQ] [--rmTags <Tag:Type[;Tag:Type]*>] [--noeof] [--params]
Returns the SamStatus for the reads/writes.
Number of records read = 10 Number of records written = 10