comparison picard_ValidateSamFile.xml @ 5:3d4f1fa26f0e draft

Uploaded
author devteam
date Tue, 16 Dec 2014 19:03:21 -0500
parents
children 379fdf4c41ac
comparison
equal deleted inserted replaced
4:ab1f60c26526 5:3d4f1fa26f0e
1 <tool name="ValidateSamFile" id="picard_ValidateSamFile" version="1.122.0">
2 <description>assess validity of SAM/BAM dataset</description>
3 <requirements>
4 <requirement type="package" version="1.122.0">picard</requirement>
5 </requirements>
6
7 <macros>
8 <import>picard_macros.xml</import>
9 </macros>
10
11 <command>
12
13 ##set the maximum number of open file to hard maximum or 4096 if on a mac (mac gives 'unlimited' as output of `ulimit -Hn` command
14
15 [ `ulimit -Hn` = unlimited ] &amp;&amp; ulimit -Sn 4096 || ulimit -Sn `ulimit -Hn`
16
17 &amp;&amp;
18
19 ##set up input files
20
21 #set $reference_fasta_filename = "localref.fa"
22
23 #if str( $reference_source.reference_source_selector ) == "history":
24 ln -s "${reference_source.ref_file}" "${reference_fasta_filename}" &amp;&amp;
25 #else:
26 #set $reference_fasta_filename = str( $reference_source.ref_file.fields.path )
27 #end if
28
29 @java_options@
30
31 java -jar \$JAVA_JAR_PATH/picard.jar
32 ValidateSamFile
33
34 INPUT="${inputFile}"
35 OUTPUT="${outFile}"
36 MODE="${mode}"
37
38 #if str( $ignore ) != "None":
39 #for $element in str( $ignore ).split(','): ## See trello card https://trello.com/c/9nW02Zhd
40 IGNORE="${element}"
41 #end for
42 #end if
43
44 MAX_OUTPUT="${max_output}"
45 REFERENCE_SEQUENCE="${reference_fasta_filename}"
46 IGNORE_WARNINGS="${ignore_warnings}"
47 IS_BISULFITE_SEQUENCED="${is_bisulfite_sequenced}"
48 MAX_OPEN_TEMP_FILES=`ulimit -Sn`
49
50 VERBOSITY=ERROR
51 QUIET=true
52
53 </command>
54 <inputs>
55 <param format="sam,bam" name="inputFile" type="data" label="SAM/BAM dataset or dataset collection" help="If empty, upload or import a SAM/BAM dataset." />
56 <conditional name="reference_source">
57 <param name="reference_source_selector" type="select" label="Load reference genome from">
58 <option value="cached">Local cache</option>
59 <option value="history">History</option>
60 </param>
61 <when value="cached">
62 <param name="ref_file" type="select" label="Use dictionary from the list" help="Select genome from the list">
63 <options from_data_table="picard_indexes">
64 <filter type="sort_by" column="2" />
65 <validator type="no_options" message="No indexes are available" />
66 </options>
67 <validator type="no_options" message="A built-in dictionary is not available for the build associated with the selected input file"/>
68 </param>
69 </when>
70 <when value="history">
71 <param name="ref_file" type="data" format="fasta" label="Use the following dataset to create dictionary" help="You can upload a FASTA sequence to the history from which Picard will automatically generate dictionary using CreateSequenceDictionary command" />
72 </when>
73 </conditional>
74
75 <param name="mode" type="select" label="Select output mode" help="MODE">
76 <option value="VERBOSE">Verbose</option>
77 <option value="SUMMARY">Summary</option>
78 </param>
79 <param name="ignore" type="select" multiple="true" display="checkboxes" label="Select validation error types to ignore" help="IGNORE">
80 <option value="INVALID_QUALITY_FORMAT">INVALID_QUALITY_FORMAT</option>
81 <option value="INVALID_FLAG_PROPER_PAIR">INVALID_FLAG_PROPER_PAIR</option>
82 <option value="INVALID_FLAG_MATE_UNMAPPED"/>
83 <option value="MISMATCH_FLAG_MATE_UNMAPPED"/>
84 <option value="INVALID_FLAG_MATE_NEG_STRAND"/>
85 <option value="MISMATCH_FLAG_MATE_NEG_STRAND"/>
86 <option value="INVALID_FLAG_FIRST_OF_PAIR"/>
87 <option value="INVALID_FLAG_SECOND_OF_PAIR"/>
88 <option value="PAIRED_READ_NOT_MARKED_AS_FIRST_OR_SECOND"/>
89 <option value="INVALID_FLAG_NOT_PRIM_ALIGNMENT"/>
90 <option value="INVALID_FLAG_SUPPLEMENTARY_ALIGNMENT"/>
91 <option value="INVALID_FLAG_READ_UNMAPPED"/>
92 <option value="INVALID_INSERT_SIZE"/>
93 <option value="INVALID_MAPPING_QUALITY"/>
94 <option value="INVALID_CIGAR"/>
95 <option value="ADJACENT_INDEL_IN_CIGAR"/>
96 <option value="INVALID_MATE_REF_INDEX"/>
97 <option value="MISMATCH_MATE_REF_INDEX"/>
98 <option value="INVALID_REFERENCE_INDEX"/>
99 <option value="INVALID_ALIGNMENT_START"/>
100 <option value="MISMATCH_MATE_ALIGNMENT_START"/>
101 <option value="MATE_FIELD_MISMATCH"/>
102 <option value="INVALID_TAG_NM"/>
103 <option value="MISSING_TAG_NM"/>
104 <option value="MISSING_HEADER"/>
105 <option value="MISSING_SEQUENCE_DICTIONARY"/>
106 <option value="MISSING_READ_GROUP"/>
107 <option value="RECORD_OUT_OF_ORDER"/>
108 <option value="READ_GROUP_NOT_FOUND"/>
109 <option value="RECORD_MISSING_READ_GROUP"/>
110 <option value="INVALID_INDEXING_BIN"/>
111 <option value="MISSING_VERSION_NUMBER"/>
112 <option value="INVALID_VERSION_NUMBER"/>
113 <option value="TRUNCATED_FILE"/>
114 <option value="MISMATCH_READ_LENGTH_AND_QUALS_LENGTH"/>
115 <option value="EMPTY_READ"/>
116 <option value="CIGAR_MAPS_OFF_REFERENCE"/>
117 <option value="MISMATCH_READ_LENGTH_AND_E2_LENGTH"/>
118 <option value="MISMATCH_READ_LENGTH_AND_U2_LENGTH"/>
119 <option value="E2_BASE_EQUALS_PRIMARY_BASE"/>
120 <option value="BAM_FILE_MISSING_TERMINATOR_BLOCK"/>
121 <option value="UNRECOGNIZED_HEADER_TYPE"/>
122 <option value="POORLY_FORMATTED_HEADER_TAG"/>
123 <option value="HEADER_TAG_MULTIPLY_DEFINED"/>
124 <option value="HEADER_RECORD_MISSING_REQUIRED_TAG"/>
125 <option value="INVALID_DATE_STRING"/>
126 <option value="TAG_VALUE_TOO_LARGE"/>
127 <option value="INVALID_INDEX_FILE_POINTER"/>
128 <option value="INVALID_PREDICTED_MEDIAN_INSERT_SIZE"/>
129 <option value="DUPLICATE_READ_GROUP_ID"/>
130 <option value="MISSING_PLATFORM_VALUE"/>
131 <option value="INVALID_PLATFORM_VALUE"/>
132 <option value="DUPLICATE_PROGRAM_GROUP_ID"/>
133 <option value="MATE_NOT_FOUND"/>
134 <option value="MATES_ARE_SAME_END"/>
135 <option value="MISMATCH_MATE_CIGAR_STRING"/>
136 <option value="MATE_CIGAR_STRING_INVALID_PRESENCE"/>
137 </param>
138 <param name="max_output" type="integer" value="100" label="The maximum number of lines output in verbose mode" help="MAX_OUTPUT; default=100"/>
139 <param name="ignore_warnings" type="boolean" label="If true, only report errors and ignore warnings" help="IGNORE_WARNINGS; default=False"/>
140 <param name="validate_index" type="boolean" checked="True" label="If true and input is a BAM file with an index file, also validates the index" help="VALIDATE_INDEX; default=True"/>
141 <param name="is_bisulfite_sequenced" type="boolean" label="Whether the SAM or BAM file consists of bisulfite sequenced reads" help="IS_BISULFITE_SEQUENCED; If so, C->T is not counted as an error in computing the value of the NM tag; default=False"/>
142
143 </inputs>
144
145 <outputs>
146 <data format="txt" name="outFile" label="${tool.name} on ${on_string}: BAM validation summary"/>
147 </outputs>
148
149 <tests>
150 <test>
151 <param name="inputFile" value="picard_ValidateSamFile.bam" ftype="bam"/>
152 <param name="reference_source_selector" value="history"/>
153 <param name="ref_file" value="picard_ValidateSamFile_ref.fa"/>
154 <param name="mode" value="VERBOSE"/>
155 <param name="ignore" value="INVALID_QUALITY_FORMAT,INVALID_FLAG_PROPER_PAIR"/>
156 <param name="max_output" value="100"/>
157 <param name="ignore_warnings" value="Fasle"/>
158 <param name="validate_index" value="True"/>
159 <param name="is_bisulfite_sequenced" value="False"/>
160 <output name="outFile" file="picard_ValidateSamFile_test1.txt" ftype="txt"/>
161 </test>
162 </tests>
163
164 <stdio>
165 <exit_code range="1:" level="warning"/>
166 </stdio>
167
168 <help>
169
170 **Purpose**
171
172 Reads a SAM/BAM dataset and report on its validity.
173
174 @dataset_collections@
175
176 @description@
177
178 MODE=Mode
179 M=Mode Mode of output Default value: VERBOSE. This option can be set to 'null' to clear the
180 default value. Possible values: {VERBOSE, SUMMARY}
181
182 IGNORE=Type List of validation error types to ignore. Possible values: {INVALID_QUALITY_FORMAT,
183 INVALID_FLAG_PROPER_PAIR, INVALID_FLAG_MATE_UNMAPPED, MISMATCH_FLAG_MATE_UNMAPPED,
184 INVALID_FLAG_MATE_NEG_STRAND, MISMATCH_FLAG_MATE_NEG_STRAND, INVALID_FLAG_FIRST_OF_PAIR,
185 INVALID_FLAG_SECOND_OF_PAIR, PAIRED_READ_NOT_MARKED_AS_FIRST_OR_SECOND,
186 INVALID_FLAG_NOT_PRIM_ALIGNMENT, INVALID_FLAG_SUPPLEMENTARY_ALIGNMENT,
187 INVALID_FLAG_READ_UNMAPPED, INVALID_INSERT_SIZE, INVALID_MAPPING_QUALITY, INVALID_CIGAR,
188 ADJACENT_INDEL_IN_CIGAR, INVALID_MATE_REF_INDEX, MISMATCH_MATE_REF_INDEX,
189 INVALID_REFERENCE_INDEX, INVALID_ALIGNMENT_START, MISMATCH_MATE_ALIGNMENT_START,
190 MATE_FIELD_MISMATCH, INVALID_TAG_NM, MISSING_TAG_NM, MISSING_HEADER,
191 MISSING_SEQUENCE_DICTIONARY, MISSING_READ_GROUP, RECORD_OUT_OF_ORDER,
192 READ_GROUP_NOT_FOUND, RECORD_MISSING_READ_GROUP, INVALID_INDEXING_BIN,
193 MISSING_VERSION_NUMBER, INVALID_VERSION_NUMBER, TRUNCATED_FILE,
194 MISMATCH_READ_LENGTH_AND_QUALS_LENGTH, EMPTY_READ, CIGAR_MAPS_OFF_REFERENCE,
195 MISMATCH_READ_LENGTH_AND_E2_LENGTH, MISMATCH_READ_LENGTH_AND_U2_LENGTH,
196 E2_BASE_EQUALS_PRIMARY_BASE, BAM_FILE_MISSING_TERMINATOR_BLOCK, UNRECOGNIZED_HEADER_TYPE,
197 POORLY_FORMATTED_HEADER_TAG, HEADER_TAG_MULTIPLY_DEFINED,
198 HEADER_RECORD_MISSING_REQUIRED_TAG, INVALID_DATE_STRING, TAG_VALUE_TOO_LARGE,
199 INVALID_INDEX_FILE_POINTER, INVALID_PREDICTED_MEDIAN_INSERT_SIZE,
200 DUPLICATE_READ_GROUP_ID, MISSING_PLATFORM_VALUE, INVALID_PLATFORM_VALUE,
201 DUPLICATE_PROGRAM_GROUP_ID, MATE_NOT_FOUND, MATES_ARE_SAME_END,
202 MISMATCH_MATE_CIGAR_STRING, MATE_CIGAR_STRING_INVALID_PRESENCE} This option may be
203 specified 0 or more times.
204
205 MAX_OUTPUT=Integer
206 MO=Integer The maximum number of lines output in verbose mode Default value: 100. This option can
207 be set to 'null' to clear the default value.
208
209 REFERENCE_SEQUENCE=File
210 R=File Reference sequence file, the NM tag check will be skipped if this is missing Default
211 value: null.
212
213 IGNORE_WARNINGS=Boolean If true, only report errors and ignore warnings. Default value: false. This option can
214 be set to 'null' to clear the default value. Possible values: {true, false}
215
216 VALIDATE_INDEX=Boolean If true and input is a BAM file with an index file, also validates the index. Default
217 value: true. This option can be set to 'null' to clear the default value. Possible
218 values: {true, false}
219
220 IS_BISULFITE_SEQUENCED=Boolean
221 BISULFITE=Boolean Whether the SAM or BAM file consists of bisulfite sequenced reads. If so, C->T is not
222 counted as an error in computing the value of the NM tag. Default value: false. This
223 option can be set to 'null' to clear the default value. Possible values: {true, false}
224
225 @more_info@
226
227 </help>
228 </tool>
229
230