Mercurial > repos > bebatut > extract_sequence_file
comparison extract_sequence_file.xml @ 0:14fd6f3b0898 draft
planemo upload for repository https://github.com/ASaiM/galaxytools/tree/master/tools/extract_sequence_file/ commit ffb68b2ddd94854a34a2533105f7bc08884c6e38-dirty
| author | bebatut |
|---|---|
| date | Wed, 27 Jan 2016 02:50:51 -0500 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:14fd6f3b0898 |
|---|---|
| 1 <tool id="extract_sequence_file" name="Extract" version="0.1.0"> | |
| 2 | |
| 3 <description>from sequence file</description> | |
| 4 | |
| 5 <macros> | |
| 6 <xml name="fasta_option"> | |
| 7 <option value="id">Identifiant</option> | |
| 8 <option value="length">Length</option> | |
| 9 <option value="description">Description</option> | |
| 10 </xml> | |
| 11 <xml name="fastq_option"> | |
| 12 <option value="id">Identifiant</option> | |
| 13 <option value="length">Length</option> | |
| 14 <option value="description">Description</option> | |
| 15 </xml> | |
| 16 <xml name="test_constrain_extraction"> | |
| 17 <param name='constrained_extraction' type='boolean' checked="false" | |
| 18 truevalue='true' falsevalue='false' label="Constrain extraction?" help=""/> | |
| 19 </xml> | |
| 20 <xml name="constrain_string"> | |
| 21 <conditional name="constraint_type"> | |
| 22 <param name="type" type="select" display="radio" label="Type of | |
| 23 constraint" help=""> | |
| 24 <option value="equal">Equal a value</option> | |
| 25 <option value="in">In a list</option> | |
| 26 <option value="not_in">Not in a list</option> | |
| 27 </param> | |
| 28 <when value="equal"> | |
| 29 <param name="value" type="text" size="200" label="Equal to" | |
| 30 help=""/> | |
| 31 <validator type="empty_field" message="Give a value"/> | |
| 32 </when> | |
| 33 <when value="in"> | |
| 34 <param format="txt" name="value" type="data" label="List of | |
| 35 constraint" help="Text file with a value per line and | |
| 36 nothing else"/> | |
| 37 <validator type="unspecified_build" message="Select a file"/> | |
| 38 </when> | |
| 39 <when value="not_in"> | |
| 40 <param format="txt" name="value" type="data" label="List of | |
| 41 constraint" help="Text file with a value per line and | |
| 42 nothing else"/> | |
| 43 <validator type="unspecified_build" message="Select a file"/> | |
| 44 </when> | |
| 45 </conditional> | |
| 46 </xml> | |
| 47 <xml name="constrain_number"> | |
| 48 <param name="type" type="select" label="Type of constraint" help=""> | |
| 49 <option value="equal">Equal to </option> | |
| 50 <option value="lower">Lower than </option> | |
| 51 <option value="strictly_lower">Strictly lower than </option> | |
| 52 <option value="greater">Greater than </option> | |
| 53 <option value="strictly_greater">Strictly greater than </option> | |
| 54 </param> | |
| 55 </xml> | |
| 56 <xml name="constraint_definitions"> | |
| 57 <conditional name="constraints"> | |
| 58 <expand macro="test_constrain_extraction" /> | |
| 59 <when value="true"> | |
| 60 <repeat name="constraint_definition" title="Constraints on | |
| 61 sequences" min="1"> | |
| 62 <conditional name="constrained_information"> | |
| 63 <param name="info_to_constrain" type="select" | |
| 64 label="Information to constrain" help=""> | |
| 65 <option value="id">Identifiant</option> | |
| 66 <option value="length">Length</option> | |
| 67 </param> | |
| 68 <when value="id"> | |
| 69 <expand macro="constrain_string" /> | |
| 70 </when> | |
| 71 <when value="length"> | |
| 72 <repeat name="constraint_definition" title="Constraint | |
| 73 on sequence length" min="1"> | |
| 74 <expand macro="constrain_number" /> | |
| 75 <param name="value" type="integer" min="0" | |
| 76 max="3000" value="100" label="Value" help=""/> | |
| 77 </repeat> | |
| 78 </when> | |
| 79 </conditional> | |
| 80 </repeat> | |
| 81 </when> | |
| 82 <when value="false" /> | |
| 83 </conditional> | |
| 84 </xml> | |
| 85 </macros> | |
| 86 | |
| 87 <requirements> | |
| 88 </requirements> | |
| 89 | |
| 90 <stdio> | |
| 91 </stdio> | |
| 92 | |
| 93 <version_command><![CDATA[python -version]]></version_command> | |
| 94 | |
| 95 <!--<command>--> | |
| 96 <command><![CDATA[ | |
| 97 python $__tool_directory__/extract_sequence_file.py | |
| 98 --input=$sequence_file_format.sequence_file | |
| 99 | |
| 100 --custom_extraction_type=$sequence_file_format.extraction.specific_extraction | |
| 101 #if $sequence_file_format.extraction.specific_extraction : | |
| 102 --to_extract="{$sequence_file_format.extraction.to_extract}" | |
| 103 --output_information=$information_file | |
| 104 #else if $sequence_file_format.format=="fastq": | |
| 105 --split=$sequence_file_format.extraction.split.split_test | |
| 106 #if $sequence_file_format.extraction.split.split_test : | |
| 107 --quality_format=$sequence_file_format.extraction.split.quality_format | |
| 108 --output_sequence=$fasta_sequence_file_from_fastq | |
| 109 --output_quality=$quality_file | |
| 110 #else: | |
| 111 --output_sequence=$fastq_sequence_file | |
| 112 #end if | |
| 113 #else: | |
| 114 --output_sequence=$fasta_sequence_file | |
| 115 #end if | |
| 116 | |
| 117 #if $constraints.constrained_extraction : | |
| 118 #for $i, $constrain in enumerate( $constraints.constraint_definition ) | |
| 119 #set info_to_constrain=$constrain.constrained_information['info_to_constrain'] | |
| 120 #if $info_to_constrain in ("id"): | |
| 121 --constraint="$info_to_constrain: | |
| 122 ${constrain.constrained_information.constraint_type.type}: | |
| 123 ${constrain.constrained_information.constraint_type.value}" | |
| 124 #else: | |
| 125 #for $j, $sub_constrain in enumerate( $constrain.constrained_information.constraint_definition ) | |
| 126 --constraint="$info_to_constrain: | |
| 127 ${sub_constrain.type}: | |
| 128 ${sub_constrain.value}" | |
| 129 #end for | |
| 130 #end if | |
| 131 #end for | |
| 132 #end if | |
| 133 | |
| 134 --report $report_filepath | |
| 135 --format=$sequence_file_format.format | |
| 136 ]]> | |
| 137 </command> | |
| 138 | |
| 139 <inputs> | |
| 140 <conditional name="sequence_file_format"> | |
| 141 <param name="format" type="select" display="radio" | |
| 142 label="Format of the sequence file" help=""> | |
| 143 <option value="fasta">Fasta</option> | |
| 144 <option value="fastq">FastQ</option> | |
| 145 </param> | |
| 146 <when value="fastq"> | |
| 147 <param name="sequence_file" type="data" format="fastq" | |
| 148 label="Sequence file" help=""/> | |
| 149 <conditional name="extraction"> | |
| 150 <param name='specific_extraction' type='boolean' | |
| 151 checked="false" truevalue='true' falsevalue='false' | |
| 152 label="Extract specific information?" | |
| 153 help="If no is selected, a sequence file is generated. | |
| 154 If yes, a text file containing the wanted information is | |
| 155 generated"/> | |
| 156 <when value="true"> | |
| 157 <param name="to_extract" type="select" display="checkboxes" | |
| 158 multiple="true" label="Information to extract" help=""> | |
| 159 <expand macro="fasta_option" /> | |
| 160 <validator type="no_options" message="Select at least | |
| 161 one information to extract"/> | |
| 162 </param> | |
| 163 </when> | |
| 164 <when value="false"> | |
| 165 <conditional name="split"> | |
| 166 <param name='split_test' type='boolean' checked="false" | |
| 167 truevalue='true' falsevalue='false' label="Split | |
| 168 file into sequence and quality files?" help="If | |
| 169 yes is selected, a fasta and a quality file are | |
| 170 generated. If no, a fastq file is generated"/> | |
| 171 <when value="true"> | |
| 172 <param name="quality_format" type="select" | |
| 173 display="radio" label="Coding of quality | |
| 174 scores?" help=""> | |
| 175 <option value="sanger" selected="true">Sanger (Phred+33)</option> | |
| 176 <option value="solexa">Solexa (Solexa+64) </option> | |
| 177 <option value="illumina_1_3">Illumina 1.3+ (Phred+64) </option> | |
| 178 <option value="illumina_1_5">Illumina 1.5+ (Phred+64) </option> | |
| 179 <option value="illumina_1_8">Illumina 1.8+ (Phred+33) </option> | |
| 180 </param> | |
| 181 </when> | |
| 182 <when value="false" /> | |
| 183 </conditional> | |
| 184 </when> | |
| 185 </conditional> | |
| 186 </when> | |
| 187 <when value="fasta"> | |
| 188 <param name="sequence_file" type="data" format="fasta" | |
| 189 label="Sequence file" help=""/> | |
| 190 <conditional name="extraction"> | |
| 191 <param name='specific_extraction' type='boolean' checked="false" | |
| 192 truevalue='true' falsevalue='false' label="Extract specific | |
| 193 information?" help="If no is selected, a sequence file is | |
| 194 generated. If yes, a text file containing the wanted | |
| 195 information is generated"/> | |
| 196 <when value="true"> | |
| 197 <param name="to_extract" type="select" display="checkboxes" | |
| 198 multiple="true" label="Information to extract" help=""> | |
| 199 <expand macro="fasta_option" /> | |
| 200 <validator type="no_options" message="Select at least | |
| 201 one information to extract"/> | |
| 202 </param> | |
| 203 </when> | |
| 204 <when value="false" /> | |
| 205 </conditional> | |
| 206 </when> | |
| 207 </conditional> | |
| 208 | |
| 209 <expand macro="constraint_definitions" /> | |
| 210 </inputs> | |
| 211 | |
| 212 <outputs> | |
| 213 <data format="txt" name="information_file" | |
| 214 label="${tool.name} on ${on_string}: Information"> | |
| 215 <filter>((sequence_file_format['extraction']['specific_extraction']))</filter> | |
| 216 </data> | |
| 217 | |
| 218 <data format="fasta" name="fasta_sequence_file" | |
| 219 label="${tool.name} on ${on_string}: Extracted sequences" > | |
| 220 <filter>((sequence_file_format['format'] == 'fasta' and | |
| 221 not sequence_file_format['extraction']['specific_extraction']))</filter> | |
| 222 </data> | |
| 223 | |
| 224 <data format="fastq" name="fastq_sequence_file" | |
| 225 label="${tool.name} on ${on_string}: Extracted sequences"> | |
| 226 <filter>((sequence_file_format['format'] == 'fastq' and | |
| 227 not sequence_file_format['extraction']['specific_extraction'] and | |
| 228 not sequence_file_format['extraction']['split']['split_test']))</filter> | |
| 229 </data> | |
| 230 | |
| 231 <data format="qual" name="quality_file" | |
| 232 label="${tool.name} on ${on_string}: Extracted quality"> | |
| 233 <filter>((sequence_file_format['format'] == 'fastq' and | |
| 234 not sequence_file_format['extraction']['specific_extraction'] and | |
| 235 sequence_file_format['extraction']['split']['split_test']))</filter> | |
| 236 </data> | |
| 237 | |
| 238 <data format="fasta" name="fasta_sequence_file_from_fastq" | |
| 239 label="${tool.name} on ${on_string}: Extracted sequences"> | |
| 240 <filter>((sequence_file_format['format'] == 'fastq' and | |
| 241 not sequence_file_format['extraction']['specific_extraction'] and | |
| 242 sequence_file_format['extraction']['split']['split_test']))</filter> | |
| 243 </data> | |
| 244 | |
| 245 <data format="txt" name="report_filepath" | |
| 246 label="${tool.name} on ${on_string}: Report"/> | |
| 247 </outputs> | |
| 248 | |
| 249 <tests> | |
| 250 <test> | |
| 251 <param name="sequence_file_format.sequence_file" | |
| 252 value="read_write_fasta_file/input_sequence_file.fasta"/> | |
| 253 <param name="sequence_file_format.extraction.specific_extraction" | |
| 254 value="false"/> | |
| 255 <param name="$sequence_file_format.format" value="fasta" /> | |
| 256 <output name="fasta_sequence_file" | |
| 257 file="read_write_fasta_file/input_sequence_file.fasta"/> | |
| 258 <output name="report_filepath" | |
| 259 file="read_write_fasta_file/expected_output_report.txt"/> | |
| 260 </test> | |
| 261 </tests> | |
| 262 | |
| 263 <help><![CDATA[ | |
| 264 | |
| 265 **What it does** | |
| 266 | |
| 267 This tool extracts information from sequence files. | |
| 268 | |
| 269 Some constraints could be added to extraction. For example, you choose | |
| 270 to extract only sequences for which the length is greater than 30 bp. | |
| 271 | |
| 272 More information on `ASaiM documentation <http://asaim.readthedocs.org/>`_... | |
| 273 | |
| 274 ----- | |
| 275 | |
| 276 **Input** | |
| 277 | |
| 278 The input is one file in fasta or fastq. | |
| 279 | |
| 280 ----- | |
| 281 | |
| 282 **Outputs** | |
| 283 | |
| 284 The tool generates different outputs given the choosen parameters: | |
| 285 | |
| 286 - a sequence file | |
| 287 - a text file | |
| 288 - a sequence file and a quality file | |
| 289 | |
| 290 ]]> | |
| 291 </help> | |
| 292 | |
| 293 <citations> | |
| 294 </citations> | |
| 295 </tool> | |
| 296 |
