Category

Sam/Bam Manipulation


Usage

java -jar picard.jar RevertSam I=input.bamO=reverted.bam


Manual

INPUT (File)    The input SAM/BAM file to revert the state of. Required.
OUTPUT (File)    The output SAM/BAM file to create, or an output directory if OUTPUT_BY_READGROUP is true. Required. Cannot be used in conjuction with option(s) OUTPUT_MAP (OM)
OUTPUT_MAP (File)    Tab separated file with two columns, READ_GROUP_ID and OUTPUT, providing file mapping only used if OUTPUT_BY_READGROUP is true. Required. Cannot be used in conjuction with option(s) OUTPUT (O)
OUTPUT_BY_READGROUP (Boolean)    When true, outputs each read group in a separate file. Default value: false. This option can be set to 'null' to clear the default value. Possible values: {true, false}
OUTPUT_BY_READGROUP_FILE_FORMAT (FileType)    When using OUTPUT_BY_READGROUP, the output file format can be set to a certain format. Default value: dynamic. This option can be set to 'null' to clear the default value. Possible values: {sam, bam, cram, dynamic}
SORT_ORDER (SortOrder)    The sort order to create the reverted output file with. Default value: queryname. This option can be set to 'null' to clear the default value. Possible values: {unsorted, queryname, coordinate, duplicate}
RESTORE_ORIGINAL_QUALITIES (Boolean)    True to restore original qualities from the OQ field to the QUAL field if available. Default value: true. This option can be set to 'null' to clear the default value. Possible values: {true, false}
REMOVE_DUPLICATE_INFORMATION (Boolean)    Remove duplicate read flags from all reads. Note that if this is true and REMOVE_ALIGNMENT_INFORMATION==false, the output may have the unusual but sometimes desirable trait of having unmapped reads that are marked as duplicates. Default value: true. This option can be set to 'null' to clear the default value. Possible values: {true, false}
REMOVE_ALIGNMENT_INFORMATION (Boolean)    Remove all alignment information from the file. Default value: true. This option can be set to 'null' to clear the default value. Possible values: {true, false}
ATTRIBUTE_TO_CLEAR (String)    When removing alignment information, the set of optional tags to remove. Default value: [NM, UQ, PG, MD, MQ, SA, MC, AS]. This option can be set to 'null' to clear the default value. This option may be specified 0 or more times. This option can be set to 'null' to clear the default list.
SANITIZE (Boolean)    WARNING: This option is potentially destructive. If enabled will discard reads in order to produce a consistent output BAM. Reads discarded include (but are not limited to) paired reads with missing mates, duplicated records, records with mismatches in length of bases and qualities. This option can only be enabled if the output sort order is queryname and will always cause sorting to occur. Default value: false. This option can be set to 'null' to clear the default value. Possible values: {true, false}
MAX_DISCARD_FRACTION (Double)    If SANITIZE=true and higher than MAX_DISCARD_FRACTION reads are discarded due to sanitization thenthe program will exit with an Exception instead of exiting cleanly. Output BAM will still be valid. Default value: 0.01. This option can be set to 'null' to clear the default value.
SAMPLE_ALIAS (String)    The sample alias to use in the reverted output file. This will override the existing sample alias in the file and is used only if all the read groups in the input file have the same sample alias Default value: null.
LIBRARY_NAME (String)    The library name to use in the reverted output file. This will override the existing sample alias in the file and is used only if all the read groups in the input file have the same library name Default value: null.


Share your experience or ask a question