Difference between revisions of "BamUtil: revert"

From Genome Analysis Wiki
Jump to: navigation, search
(Created page with 'revert Category:BAM Software Category:Software = Overview of the <code>revert</code> function of <code>bamUtil</code> = The <code>revert</code> opti…')
 
Line 11: Line 11:
  
 
Additional parameters allow for the removal of any other tags in order to cleanup the SAM/BAM file.
 
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.
  
 
= Parameters =
 
= Parameters =

Revision as of 13:17, 21 November 2011


Overview of the revert function of bamUtil

The 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.

The 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.

Parameters

	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


Usage

./bam revert --in <inputFile> --out <outputFile.sam/bam/ubam (ubam is uncompressed bam)> [--cigar] [--qual] [--keepTags] [--rmBQ] [--rmTags <Tag:Type[;Tag:Type]*>] [--noeof] [--params]

Return Value

Returns the SamStatus for the reads/writes.

Example Output


Number of records read = 10
Number of records written = 10