[Tue Aug 16 04:12:04 CDT 2016] picard.sam.RevertSam INPUT=testdata/picard/sam/revert_sam_basic.sam OUTPUT=/tmp/jli/picardRevertSamTest2779889200752467317 OUTPUT_BY_READGROUP=true RESTORE_ORIGINAL_QUALITIES=true REMOVE_DUPLICATE_INFORMATION=true REMOVE_ALIGNMENT_INFORMATION=true SORT_ORDER=queryname ATTRIBUTE_TO_CLEAR=[NM, UQ, PG, MD, MQ, SA, MC, AS] SANITIZE=false MAX_DISCARD_FRACTION=0.01 VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=3098916 CREATE_INDEX=false CREATE_MD5_FILE=false GA4GH_CLIENT_SECRETS=client_secrets.json
[Tue Aug 16 04:12:04 CDT 2016] Executing as jli@corona on Linux 3.19.0-61-generic amd64; Java HotSpot(TM) 64-Bit Server VM 1.8.0_91-b14; Picard version: null
[Tue Aug 16 04:12:04 CDT 2016] picard.sam.RevertSam done. Elapsed time: 0.00 minutes.
Runtime.totalMemory()=1757413376
[Tue Aug 16 04:12:04 CDT 2016] picard.sam.RevertSam INPUT=testdata/picard/sam/revert_sam_basic.sam OUTPUT=/tmp/reverted5540930402973821251.sam SORT_ORDER=queryname RESTORE_ORIGINAL_QUALITIES=true REMOVE_DUPLICATE_INFORMATION=true REMOVE_ALIGNMENT_INFORMATION=true ATTRIBUTE_TO_CLEAR=[NM, UQ, PG, MD, MQ, SA, MC, AS, XT] SAMPLE_ALIAS=Hey,Dad! OUTPUT_BY_READGROUP=false SANITIZE=false MAX_DISCARD_FRACTION=0.01 VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=3098916 CREATE_INDEX=false CREATE_MD5_FILE=false GA4GH_CLIENT_SECRETS=client_secrets.json
[Tue Aug 16 04:12:04 CDT 2016] Executing as jli@corona on Linux 3.19.0-61-generic amd64; Java HotSpot(TM) 64-Bit Server VM 1.8.0_91-b14; Picard version: null
[Tue Aug 16 04:12:04 CDT 2016] picard.sam.RevertSam done. Elapsed time: 0.00 minutes.
Runtime.totalMemory()=1757413376
[Tue Aug 16 04:12:04 CDT 2016] picard.sam.RevertSam INPUT=testdata/picard/sam/revert_sam_basic.sam OUTPUT=/tmp/reverted3340688252834667151.sam RESTORE_ORIGINAL_QUALITIES=false REMOVE_DUPLICATE_INFORMATION=false REMOVE_ALIGNMENT_INFORMATION=true ATTRIBUTE_TO_CLEAR=[NM, UQ, PG, MD, MQ, SA, MC, AS, XT] SAMPLE_ALIAS=Hey,Dad! LIBRARY_NAME=NewLibraryName OUTPUT_BY_READGROUP=false SORT_ORDER=queryname SANITIZE=false MAX_DISCARD_FRACTION=0.01 VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=3098916 CREATE_INDEX=false CREATE_MD5_FILE=false GA4GH_CLIENT_SECRETS=client_secrets.json
[Tue Aug 16 04:12:04 CDT 2016] Executing as jli@corona on Linux 3.19.0-61-generic amd64; Java HotSpot(TM) 64-Bit Server VM 1.8.0_91-b14; Picard version: null
[Tue Aug 16 04:12:04 CDT 2016] picard.sam.RevertSam done. Elapsed time: 0.00 minutes.
Runtime.totalMemory()=1762131968
[Tue Aug 16 04:12:04 CDT 2016] picard.sam.RevertSam INPUT=testdata/picard/sam/revert_sam_basic.sam OUTPUT=/tmp/reverted8926189360936004487.sam RESTORE_ORIGINAL_QUALITIES=false REMOVE_DUPLICATE_INFORMATION=false REMOVE_ALIGNMENT_INFORMATION=false OUTPUT_BY_READGROUP=false SORT_ORDER=queryname ATTRIBUTE_TO_CLEAR=[NM, UQ, PG, MD, MQ, SA, MC, AS] SANITIZE=false MAX_DISCARD_FRACTION=0.01 VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=3098916 CREATE_INDEX=false CREATE_MD5_FILE=false GA4GH_CLIENT_SECRETS=client_secrets.json
[Tue Aug 16 04:12:04 CDT 2016] Executing as jli@corona on Linux 3.19.0-61-generic amd64; Java HotSpot(TM) 64-Bit Server VM 1.8.0_91-b14; Picard version: null
[Tue Aug 16 04:12:04 CDT 2016] picard.sam.RevertSam done. Elapsed time: 0.00 minutes.
Runtime.totalMemory()=1762131968
ERROR: Option 'OUTPUT' cannot be used in conjunction with option(s) OUTPUT_MAP
USAGE: RevertSam [options]
Documentation: http://broadinstitute.github.io/picard/command-line-overview.html#RevertSam
Reverts SAM or BAM files to a previous state. This tool removes or restores certain properties of the SAM records, including alignment information, which can be used to produce an unmapped BAM (uBAM) from a previously aligned BAM. It is also capable of restoring the original quality scores of a BAM file that has already undergone base quality score recalibration (BQSR) if theoriginal qualities were retained.
Example with single output:
java -jar picard.jar RevertSam \
I=input.bam \
O=reverted.bam
Output format is BAM by default, or SAM or CRAM if the input path ends with '.sam' or '.cram', respectively.
Example outputting by read group with output map:
java -jar picard.jar RevertSam \
I=input.bam \
OUTPUT_BY_READGROUP=true \
OUTPUT_MAP=reverted_bam_paths.tsv
Will output a BAM/SAM file per read group. By default, all outputs will be in BAM format. However, a SAM file will be produced instead for any read group mapped in OUTPUT_MAP to a path ending with '.sam'. A CRAM file will be produced for any read group mapped to a path ending with '.cram'.
Example outputting by read group without output map:
java -jar picard.jar RevertSam \
I=input.bam \
OUTPUT_BY_READGROUP=true \
O=/write/reverted/read/group/bams/in/this/dir
Will output a BAM/SAM file per read group. By default, all outputs will be in BAM format. However, outputs will be in SAM format if the input path ends with '.sam', or CRAM format if it ends with '.cram'.
Version: null
Options:
--help
-h Displays options specific to this tool.
--stdhelp
-H Displays options specific to this tool AND options common to all Picard command line
tools.
--version Displays program version.
INPUT=File
I=File The input SAM/BAM file to revert the state of. Required.
OUTPUT=File
O=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
OM=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
OBR=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}
SORT_ORDER=SortOrder
SO=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
OQ=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
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
LIB=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.
[Tue Aug 16 04:12:04 CDT 2016] picard.sam.RevertSam INPUT=testdata/picard/sam/revert_sam_basic.sam OUTPUT_MAP=/tmp/jli/picardRevertSamTestOutputMap6245646672451937863.txt OUTPUT_BY_READGROUP=true SORT_ORDER=queryname RESTORE_ORIGINAL_QUALITIES=true REMOVE_DUPLICATE_INFORMATION=true REMOVE_ALIGNMENT_INFORMATION=true ATTRIBUTE_TO_CLEAR=[NM, UQ, PG, MD, MQ, SA, MC, AS, NM] SAMPLE_ALIAS=test_sample_1 LIBRARY_NAME=test_library_1 REFERENCE_SEQUENCE=testdata/picard/reference/test.fasta SANITIZE=false MAX_DISCARD_FRACTION=0.01 VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=3098916 CREATE_INDEX=false CREATE_MD5_FILE=false GA4GH_CLIENT_SECRETS=client_secrets.json
[Tue Aug 16 04:12:04 CDT 2016] Executing as jli@corona on Linux 3.19.0-61-generic amd64; Java HotSpot(TM) 64-Bit Server VM 1.8.0_91-b14; Picard version: null
[Tue Aug 16 04:12:04 CDT 2016] picard.sam.RevertSam done. Elapsed time: 0.01 minutes.
Runtime.totalMemory()=1762131968
[Tue Aug 16 04:12:04 CDT 2016] picard.sam.RevertSam INPUT=testdata/picard/sam/revert_sam_sample_library_override.sam OUTPUT=/tmp/bad525322022106210533.sam SAMPLE_ALIAS=NewSample OUTPUT_BY_READGROUP=false SORT_ORDER=queryname RESTORE_ORIGINAL_QUALITIES=true REMOVE_DUPLICATE_INFORMATION=true REMOVE_ALIGNMENT_INFORMATION=true ATTRIBUTE_TO_CLEAR=[NM, UQ, PG, MD, MQ, SA, MC, AS] SANITIZE=false MAX_DISCARD_FRACTION=0.01 VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=3098916 CREATE_INDEX=false CREATE_MD5_FILE=false GA4GH_CLIENT_SECRETS=client_secrets.json
[Tue Aug 16 04:12:04 CDT 2016] Executing as jli@corona on Linux 3.19.0-61-generic amd64; Java HotSpot(TM) 64-Bit Server VM 1.8.0_91-b14; Picard version: null
[Tue Aug 16 04:12:04 CDT 2016] picard.sam.RevertSam done. Elapsed time: 0.00 minutes.
Runtime.totalMemory()=1762131968
To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp
[Tue Aug 16 04:12:04 CDT 2016] picard.sam.RevertSam INPUT=testdata/picard/sam/revert_sam_sample_library_override.sam OUTPUT=/tmp/bad7989051509247461928.sam LIBRARY_NAME=NewLibrary OUTPUT_BY_READGROUP=false SORT_ORDER=queryname RESTORE_ORIGINAL_QUALITIES=true REMOVE_DUPLICATE_INFORMATION=true REMOVE_ALIGNMENT_INFORMATION=true ATTRIBUTE_TO_CLEAR=[NM, UQ, PG, MD, MQ, SA, MC, AS] SANITIZE=false MAX_DISCARD_FRACTION=0.01 VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=3098916 CREATE_INDEX=false CREATE_MD5_FILE=false GA4GH_CLIENT_SECRETS=client_secrets.json
[Tue Aug 16 04:12:04 CDT 2016] Executing as jli@corona on Linux 3.19.0-61-generic amd64; Java HotSpot(TM) 64-Bit Server VM 1.8.0_91-b14; Picard version: null
[Tue Aug 16 04:12:04 CDT 2016] picard.sam.RevertSam done. Elapsed time: 0.00 minutes.
Runtime.totalMemory()=1762131968
To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp
[Tue Aug 16 04:12:04 CDT 2016] picard.sam.RevertSam INPUT=testdata/picard/sam/revert_sam_sample_library_override.sam OUTPUT=/tmp/bad1642814703056428428.sam SAMPLE_ALIAS=NewSample LIBRARY_NAME=NewLibrary OUTPUT_BY_READGROUP=false SORT_ORDER=queryname RESTORE_ORIGINAL_QUALITIES=true REMOVE_DUPLICATE_INFORMATION=true REMOVE_ALIGNMENT_INFORMATION=true ATTRIBUTE_TO_CLEAR=[NM, UQ, PG, MD, MQ, SA, MC, AS] SANITIZE=false MAX_DISCARD_FRACTION=0.01 VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=3098916 CREATE_INDEX=false CREATE_MD5_FILE=false GA4GH_CLIENT_SECRETS=client_secrets.json
[Tue Aug 16 04:12:04 CDT 2016] Executing as jli@corona on Linux 3.19.0-61-generic amd64; Java HotSpot(TM) 64-Bit Server VM 1.8.0_91-b14; Picard version: null
[Tue Aug 16 04:12:04 CDT 2016] picard.sam.RevertSam done. Elapsed time: 0.00 minutes.
Runtime.totalMemory()=1762131968
To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp
[Tue Aug 16 04:12:04 CDT 2016] picard.sam.RevertSam INPUT=testdata/picard/sam/revert_sam_single_end.sam OUTPUT=/tmp/single_end_reverted5093827884032861155.sam OUTPUT_BY_READGROUP=false SORT_ORDER=queryname RESTORE_ORIGINAL_QUALITIES=true REMOVE_DUPLICATE_INFORMATION=true REMOVE_ALIGNMENT_INFORMATION=true ATTRIBUTE_TO_CLEAR=[NM, UQ, PG, MD, MQ, SA, MC, AS] SANITIZE=false MAX_DISCARD_FRACTION=0.01 VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=3098916 CREATE_INDEX=false CREATE_MD5_FILE=false GA4GH_CLIENT_SECRETS=client_secrets.json
[Tue Aug 16 04:12:04 CDT 2016] Executing as jli@corona on Linux 3.19.0-61-generic amd64; Java HotSpot(TM) 64-Bit Server VM 1.8.0_91-b14; Picard version: null
[Tue Aug 16 04:12:04 CDT 2016] picard.sam.RevertSam done. Elapsed time: 0.00 minutes.
Runtime.totalMemory()=1762131968