5
|
1 <tool name="RevertSam" id="picard_RevertSam" version="1.126.0">
|
|
2 <description>revert SAM/BAM datasets to a previous state</description>
|
|
3 <requirements>
|
|
4 <requirement type="package" version="1.126.0">picard</requirement>
|
|
5 </requirements>
|
|
6
|
|
7 <macros>
|
|
8 <import>picard_macros.xml</import>
|
|
9 </macros>
|
|
10
|
|
11 <command>
|
|
12 @java_options@
|
|
13
|
|
14 java -jar \$JAVA_JAR_PATH/picard.jar
|
|
15 RevertSam
|
|
16
|
|
17 INPUT="${inputFile}"
|
|
18 OUTPUT="${outFile}"
|
|
19
|
|
20 RESTORE_ORIGINAL_QUALITIES="${restore_original_qualities}"
|
|
21 REMOVE_DUPLICATE_INFORMATION="${remove_duplicate_information}"
|
|
22 REMOVE_ALIGNMENT_INFORMATION="${remove_alignment_information}"
|
|
23
|
|
24 #for $attribute_to_clear in $attributes_to_clear:
|
|
25 ATTRIBUTE_TO_CLEAR="${attribute_to_clear.attribute}"
|
|
26 #end for
|
|
27
|
|
28 SANITIZE="${sanitize}"
|
|
29 MAX_DISCARD_FRACTION="${max_discard_fraction}"
|
|
30 SAMPLE_ALIAS="${sample_alias}"
|
|
31 LIBRARY_NAME="${library_name}"
|
|
32
|
|
33 SORT_ORDER="${sort_order}"
|
|
34 VALIDATION_STRINGENCY="${validation_stringency}"
|
|
35 QUIET=true
|
|
36 VERBOSITY=ERROR
|
|
37
|
|
38 </command>
|
|
39 <inputs>
|
|
40 <param format="sam,bam" name="inputFile" type="data" multiple="True" label="Select SAM/BAM dataset or dataset collection" help="If empty, upload or import a SAM/BAM dataset"/>
|
|
41 <param name="restore_original_qualities" type="boolean" checked="True" label="Restore original qualities from the OQ field to the QUAL field if available" help="RESTORE_ORIGINAL_QUALITIES; default=True"/>
|
|
42 <param name="remove_duplicate_information" type="boolean" checked="True" label="Remove duplicate read flags from all reads" help="REMOVE_DUPLICATE_INFORMATION; Note that if this is true and REMOVE_ALIGNMENT_INFORMATION is set to False, the output may have the unusual but sometimes desirable trait of having unmapped reads that are marked as duplicates; default=True"/>
|
|
43 <param name="remove_alignment_information" type="boolean" checked="True" label="Remove all alignment information from the file" help="REMOVE_ALIGNMENT_INFORMATION; default=True"/>
|
|
44 <repeat name="attributes_to_clear" title="Clear attribute" min="0" help="You can provide multiple attributes">
|
|
45 <param name="attribute" type="text" size="10" label="When removing alignment information, specify optional tags to remove (e.g., XM)" help="ATTRIBUTE_TO_CLEAR"/>
|
|
46 </repeat>
|
|
47 <param name="sanitize" type="boolean" label="Discard reads in order to produce a consistent output BAM" help="SANITIZE; WARNING: This option is potentially destructive. 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=False"/>
|
|
48 <param name="max_discard_fraction" value="0.01" type="float" min="0.0" max="1.0" label="If SANITIZE=true and higher than MAX_DISCARD_FRACTION reads are discarded due to sanitization then the program will exit with an Exception instead of exiting cleanly" help="MAX_DISCARD_FRACTION; default=0.01"/>
|
|
49 <param name="sample_alias" type="text" size="40" value="null" label="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" help="SAMPLE_ALIAS; default=Null"/>
|
|
50 <param name="library_name" type="text" size="40" value="null" label="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 sample alias" help="LIBRARY_NAME; default=Null"/>
|
|
51 <param name="sort_order" type="select" label="The sort order to create the reverted output file with" help="SORT_ORDER; Picard default=queryname; Galaxy default=coordinate">
|
|
52 <option value="coordinate" selected="True">Coordinate</option>
|
|
53 <option value="queryname">Queryname</option>
|
|
54 <option value="unsorted">Unsorted</option>
|
|
55 </param>
|
|
56 <expand macro="VS" />
|
|
57
|
|
58 </inputs>
|
|
59
|
|
60 <outputs>
|
|
61 <data format="bam" name="outFile" label="${tool.name} on ${on_string}: Reverted BAM dataset"/>
|
|
62 </outputs>
|
|
63
|
|
64 <tests>
|
|
65 <test>
|
|
66 <param name="inputFile" value="picard_RevertSam.bam" ftype="bam"/>
|
|
67 <param name="restore_original_qualities" value="True"/>
|
|
68 <param name="remove_duplicate_information" value="True"/>
|
|
69 <param name="remove_alignment_information" value="True"/>
|
|
70 <param name="attribute" value="XM"/>
|
|
71 <param name="sanitize" value="False"/>
|
|
72 <param name="max_discard_fraction" value="0.01"/>
|
|
73 <param name="sample_alias" value="null"/>
|
|
74 <param name="library_name" value="null"/>
|
|
75 <param name="sort_order" value="coordinate"/>
|
|
76 <param name="validation_stringency" value="LENIENT"/>
|
|
77 <output name="outFile" file="picard_RevertSam_test1.bam" ftype="bam" lines_diff="2"/>
|
|
78 </test>
|
|
79 </tests>
|
|
80
|
|
81 <stdio>
|
|
82 <exit_code range="1:" level="fatal"/>
|
|
83 </stdio>
|
|
84
|
|
85 <help>
|
|
86
|
|
87 **Purpose**
|
|
88
|
|
89 Reverts SAM or BAM files to a previous state by removing certain types of information and/or substituting in the original quality scores when available.
|
|
90
|
|
91 @dataset_collections@
|
|
92
|
|
93 @description@
|
|
94
|
|
95 SORT_ORDER=SortOrder
|
|
96 SO=SortOrder The sort order to create the reverted output file with. Default value: queryname.
|
|
97 Possible values: {unsorted, queryname, coordinate}
|
|
98
|
|
99 RESTORE_ORIGINAL_QUALITIES=Boolean
|
|
100 OQ=Boolean True to restore original qualities from the OQ field to the QUAL field if available.
|
|
101 Default value: true. Possible values: {true, false}
|
|
102
|
|
103 REMOVE_DUPLICATE_INFORMATION=Boolean
|
|
104 Remove duplicate read flags from all reads. Note that if this is true and
|
|
105 REMOVE_ALIGNMENT_INFORMATION==false, the output may have the unusual but sometimes
|
|
106 desirable trait of having unmapped reads that are marked as duplicates. Default value:
|
|
107 true. Possible values: {true, false}
|
|
108
|
|
109 REMOVE_ALIGNMENT_INFORMATION=Boolean
|
|
110 Remove all alignment information from the file. Default value: true. TPossible values: {true, false}
|
|
111
|
|
112 ATTRIBUTE_TO_CLEAR=String When removing alignment information, the set of optional tags to remove. This option may
|
|
113 be specified 0 or more times.
|
|
114
|
|
115 SANITIZE=Boolean WARNING: This option is potentially destructive. If enabled will discard reads in order
|
|
116 to produce a consistent output BAM. Reads discarded include (but are not limited to)
|
|
117 paired reads with missing mates, duplicated records, records with mismatches in length of
|
|
118 bases and qualities. This option can only be enabled if the output sort order is
|
|
119 queryname and will always cause sorting to occur. Possible values: {true, false}
|
|
120
|
|
121 MAX_DISCARD_FRACTION=Double If SANITIZE=true and higher than MAX_DISCARD_FRACTION reads are discarded due to
|
|
122 sanitization thenthe program will exit with an Exception instead of exiting cleanly.
|
|
123 Output BAM will still be valid. Default value: 0.01.
|
|
124
|
|
125 SAMPLE_ALIAS=String
|
|
126 ALIAS=String The sample alias to use in the reverted output file. This will override the existing
|
|
127 sample alias in the file and is used only if all the read groups in the input file have
|
|
128 the same sample alias Default value: null.
|
|
129
|
|
130 LIBRARY_NAME=String
|
|
131 LIB=String The library name to use in the reverted output file. This will override the existing
|
|
132 sample alias in the file and is used only if all the read groups in the input file have
|
|
133 the same sample alias Default value: null.
|
|
134
|
|
135 @more_info@
|
|
136
|
|
137 </help>
|
|
138 </tool>
|
|
139
|
|
140
|