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