Mercurial > repos > iuc > fastk_logex
comparison logex.xml @ 3:f1f6bc33ad2e draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/fastk commit 814017d155da225181f3b41c25f99f4c23f03835
| author | iuc |
|---|---|
| date | Sat, 10 May 2025 09:08:37 +0000 |
| parents | 52ae020a27eb |
| children | ee15b385e5d2 |
comparison
equal
deleted
inserted
replaced
| 2:52ae020a27eb | 3:f1f6bc33ad2e |
|---|---|
| 1 <tool id="fastk_logex" name="FastK Logex" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="24.2" license="MIT"> | 1 <tool id="fastk_logex" name="FastK Logex" version="@TOOL_VERSION@+galaxy3" profile="24.2" license="MIT"> |
| 2 <description>Performs binary operations on the generated Ktab files from FASTK suite</description> | 2 <description>Performs binary operations on the generated Ktab files from FASTK suite</description> |
| 3 <macros> | 3 <macros> |
| 4 <import>macros.xml</import> | 4 <import>macros.xml</import> |
| 5 </macros> | 5 </macros> |
| 6 <expand macro="xrefs"/> | 6 <expand macro="xrefs"/> |
| 7 <expand macro="requirements"/> | 7 <expand macro="requirements"/> |
| 8 <command detect_errors="exit_code"><![CDATA[ | 8 <command detect_errors="exit_code"><![CDATA[ |
| 9 mkdir -p logex_ktabs | 9 mkdir -p logex_ktabs && |
| 10 && mkdir -p input_files | 10 mkdir -p input_files && |
| 11 && cp '$input_ktab1' input_files/input1.ktab | 11 #if $input_type.input_type_selector != 'collection' |
| 12 && ln -s '$input_ktab1_tar' input1.tar | 12 cp '$input_ktab1' input_files/input1.ktab && |
| 13 && tar -xf input1.tar | 13 ln -s '$input_ktab1_tar' input1.tar && |
| 14 && mv ktabfiles ktabfiles_in1 | 14 tar -xf input1.tar && |
| 15 && mv "\$(find ktabfiles_in1 -type f -name '*.ktab.1')" "ktabfiles_in1/.input1.ktab.1" | 15 mv ktabfiles ktabfiles_in1 && |
| 16 && cp '$input_ktab2' input_files/input2.ktab | 16 mv "\$(find ktabfiles_in1 -type f -name '*.ktab.1')" "ktabfiles_in1/.input1.ktab.1" && |
| 17 && ln -s '$input_ktab2_tar' input2.tar | 17 cp '$input_ktab2' input_files/input2.ktab && |
| 18 && tar -xf input2.tar | 18 ln -s '$input_ktab2_tar' input2.tar && |
| 19 && mv ktabfiles ktabfiles_in2 | 19 tar -xf input2.tar && |
| 20 && mv "\$(find ktabfiles_in2 -type f -name '*.ktab.1')" "ktabfiles_in2/.input2.ktab.1" | 20 mv ktabfiles ktabfiles_in2 && |
| 21 && mv ktabfiles_in1/.input1.ktab.1 input_files/ | 21 mv "\$(find ktabfiles_in2 -type f -name '*.ktab.1')" "ktabfiles_in2/.input2.ktab.1" && |
| 22 && mv ktabfiles_in2/.input2.ktab.1 input_files/ && | 22 mv ktabfiles_in1/.input1.ktab.1 input_files/ && |
| 23 #if $operation_selector == 'and': | 23 mv ktabfiles_in2/.input2.ktab.1 input_files/ && |
| 24 Logex -T\${GALAXY_SLOTS:-8} -h 'out = A&.B' input_files/input1.ktab input_files/input2.ktab | 24 #if $input_type.operation_selector == 'and' |
| 25 #elif $operation_selector == 'or': | 25 Logex -T\${GALAXY_SLOTS:-8} -h 'out = A&.B' input_files/input1.ktab input_files/input2.ktab && |
| 26 Logex -T\${GALAXY_SLOTS:-8} -h 'out = A|.B' input_files/input1.ktab input_files/input2.ktab | 26 #elif $input_type.operation_selector == 'or' |
| 27 #elif $operation_selector == 'minus': | 27 Logex -T\${GALAXY_SLOTS:-8} -h 'out = A|.B' input_files/input1.ktab input_files/input2.ktab && |
| 28 Logex -T\${GALAXY_SLOTS:-8} -h 'out = A-B' input_files/input1.ktab input_files/input2.ktab | 28 #elif $input_type.operation_selector == 'minus' |
| 29 #elif $operation_selector == 'xor': | 29 Logex -T\${GALAXY_SLOTS:-8} -h 'out = A-B' input_files/input1.ktab input_files/input2.ktab && |
| 30 Logex -T\${GALAXY_SLOTS:-8} -h 'out = A^B' input_files/input1.ktab input_files/input2.ktab | 30 #elif $input_type.operation_selector == 'xor' |
| 31 #elif $operation_selector == 'unionsum': | 31 Logex -T\${GALAXY_SLOTS:-8} -h 'out = A^B' input_files/input1.ktab input_files/input2.ktab && |
| 32 Logex -T\${GALAXY_SLOTS:-8} -h 'out = A&+B' input_files/input1.ktab input_files/input2.ktab | 32 #elif $input_type.operation_selector == 'unionsum' |
| 33 Logex -T\${GALAXY_SLOTS:-8} -h 'out = A&+B' input_files/input1.ktab input_files/input2.ktab && | |
| 34 #end if | |
| 35 #else | |
| 36 #for $i, $j in enumerate($input_type.input_ktab_collection): | |
| 37 cp "$j" input_files/${i+1}.ktab && | |
| 38 #end for | |
| 39 #for $p, $q in enumerate($input_type.input_ktab_collection_tar): | |
| 40 ln -s "$q" input_files/input_ktab_${p+1}.tar && | |
| 41 tar -tf input_files/input_ktab_${p+1}.tar | grep '/\.[^/]*$' | tar --strip-components=1 -xf input_files/input_ktab_${p+1}.tar -C input_files/ -T - && | |
| 42 rm input_files/input_ktab_${p+1}.tar && | |
| 43 #end for | |
| 44 COUNT=\$(ls -1 input_files/*.ktab 2>/dev/null | wc -l) && | |
| 45 if [ "\$COUNT" -ge 2 ]; then | |
| 46 #if $input_type.operation_sel.operation_selector_collection == 'unionsum': | |
| 47 EXPRESSION="out=\$(seq -s '&+' 0 \$((COUNT-1)) | tr '0-9' 'A-Z')" && | |
| 48 #elif $input_type.operation_sel.operation_selector_collection == 'and': | |
| 49 EXPRESSION="out=\$(seq -s '&.' 0 \$((COUNT-1)) | tr '0-9' 'A-Z')" && | |
| 50 #elif $input_type.operation_sel.operation_selector_collection == 'minus': | |
| 51 EXPRESSION="out=\$(seq -s '-' 0 \$((COUNT-1)) | tr '0-9' 'A-Z')" && | |
| 52 #elif $input_type.operation_sel.operation_selector_collection == 'or': | |
| 53 EXPRESSION="out=\$(seq -s '|.' 0 \$((COUNT-1)) | tr '0-9' 'A-Z')" && | |
| 54 #elif $input_type.operation_sel.operation_selector_collection == 'xor': | |
| 55 EXPRESSION="out=\$(seq -s '^' 0 \$((COUNT-1)) | tr '0-9' 'A-Z')" && | |
| 56 #elif $input_type.operation_sel.operation_selector_collection == 'custom': | |
| 57 EXPRESSION="out=$input_type.operation_sel.custom_expression" && | |
| 58 #end if | |
| 59 Logex -T\${GALAXY_SLOTS:-8} -h "\$EXPRESSION" input_files/*.ktab; | |
| 60 else | |
| 61 echo "ERROR: Logex needs atleast 2 Ktab files" >&2 && exit 1; | |
| 62 fi && | |
| 33 #end if | 63 #end if |
| 34 && cp *.ktab logex_ktabs/ | 64 cp *.ktab logex_ktabs/ && |
| 35 && cp .*.ktab* logex_ktabs/ | 65 cp .*.ktab* logex_ktabs/ && |
| 36 && tar -cf logex_ktab.tar input_files/ logex_ktabs/ | 66 tar -cf logex_ktab.tar input_files/ logex_ktabs/ |
| 37 ]]></command> | 67 ]]></command> |
| 38 <inputs> | 68 <inputs> |
| 39 <param name="input_ktab1" type="data" format="fastk_ktab" label="Input FastK ktab file (first)"/> | 69 <conditional name="input_type"> |
| 40 <param name="input_ktab1_tar" type="data" format="fastk_ktab_tar" label="Associated FastK TAR file consisting of intermediate .ktab files"/> | 70 <param name="input_type_selector" type="select" label="Single Ktab file or Ktab Collection"> |
| 41 <param name="input_ktab2" type="data" format="fastk_ktab" label="Input FastK ktab file (second)"/> | 71 <option value="single">Single Ktab file</option> |
| 42 <param name="input_ktab2_tar" type="data" format="fastk_ktab_tar" label="Associated FastK TAR file consisting of intermediate .ktab files"/> | 72 <option value="collection">Ktab files Collection</option> |
| 43 <param name="operation_selector" type="select" label="Select Operation to Perform" help="Select the operation to be performed on the input ktab files."> | 73 </param> |
| 44 <option value="and">AND</option> | 74 <when value="single"> |
| 45 <option value="or">OR</option> | 75 <param name="input_ktab1" type="data" format="fastk_ktab" label="Input FastK ktab file (first)"/> |
| 46 <option value="minus">Minus</option> | 76 <param name="input_ktab1_tar" type="data" format="fastk_ktab_tar" label="Associated FastK TAR file consisting of intermediate .ktab files"/> |
| 47 <option value="unionsum">Unionsum</option> | 77 <param name="input_ktab2" type="data" format="fastk_ktab" label="Input FastK ktab file (second)"/> |
| 48 <option value="xor">XOR</option> | 78 <param name="input_ktab2_tar" type="data" format="fastk_ktab_tar" label="Associated FastK TAR file consisting of intermediate .ktab files"/> |
| 49 </param> | 79 <param name="operation_selector" type="select" label="Select Operation to Perform" help="Select the operation to be performed on the input ktab files."> |
| 80 <option value="and">AND</option> | |
| 81 <option value="or">OR</option> | |
| 82 <option value="minus">Minus</option> | |
| 83 <option value="unionsum">Unionsum</option> | |
| 84 <option value="xor">XOR</option> | |
| 85 </param> | |
| 86 </when> | |
| 87 <when value="collection"> | |
| 88 <param name="input_ktab_collection" type="data_collection" collection_type="list" format="fastk_ktab" label="Input FastK ktab Collection"/> | |
| 89 <param name="input_ktab_collection_tar" type="data_collection" format="fastk_ktab_tar" label="Associated FastK TAR file consisting of intermediate .ktab files"/> | |
| 90 <conditional name="operation_sel"> | |
| 91 <param name="operation_selector_collection" type="select" label="Select Operation to Perform" help="Select the operation to be performed on the input ktab files."> | |
| 92 <option value="and">AND</option> | |
| 93 <option value="or">OR</option> | |
| 94 <option value="minus">Minus</option> | |
| 95 <option value="unionsum">Unionsum</option> | |
| 96 <option value="xor">XOR</option> | |
| 97 <option value="custom">Custom Logical Expression</option> | |
| 98 </param> | |
| 99 <when value="and"/> | |
| 100 <when value="or"/> | |
| 101 <when value="minus"/> | |
| 102 <when value="unionsum"/> | |
| 103 <when value="xor"/> | |
| 104 <when value="custom"> | |
| 105 <param name="custom_expression" type="text" label="Custom Logical Expression" value="out=" help="Enter a custom logical expression based on number of your input ktab files. For Eg: For 3 Ktab files the expression can be out=(A^B)-C"> | |
| 106 <sanitizer invalid_char=""> | |
| 107 <valid> | |
| 108 <add value="+"/> | |
| 109 <add value="-"/> | |
| 110 <add value="|"/> | |
| 111 <add value="."/> | |
| 112 <add value="^"/> | |
| 113 <add value="="/> | |
| 114 <add value="&"/> | |
| 115 </valid> | |
| 116 </sanitizer> | |
| 117 </param> | |
| 118 </when> | |
| 119 </conditional> | |
| 120 </when> | |
| 121 </conditional> | |
| 50 </inputs> | 122 </inputs> |
| 51 <outputs> | 123 <outputs> |
| 52 <data name="fastk_hist_out" format="fastk_hist" from_work_dir="out.hist" label="${tool.name} on ${on_string}: Logex .hist file"/> | 124 <data name="fastk_hist_out" format="fastk_hist" from_work_dir="out.hist" label="${tool.name} on ${on_string}: Logex .hist file"/> |
| 53 <data name="fastk_ktab_out" format="fastk_ktab" from_work_dir="out.ktab" label="${tool.name} on ${on_string}: Logex .ktab file"/> | 125 <data name="fastk_ktab_out" format="fastk_ktab" from_work_dir="out.ktab" label="${tool.name} on ${on_string}: Logex .ktab file"/> |
| 54 <data name="fastk_ktab_files" format="fastk_ktab_tar" from_work_dir="logex_ktab.tar" label="${tool.name} on ${on_string}: FastK Logex ktab files"/> | 126 <data name="fastk_ktab_files" format="fastk_ktab_tar" from_work_dir="logex_ktab.tar" label="${tool.name} on ${on_string}: FastK Logex ktab files"/> |
| 55 </outputs> | 127 </outputs> |
| 56 <tests> | 128 <tests> |
| 57 <test expect_num_outputs="3"> | 129 <test expect_num_outputs="3"> |
| 58 <param name="input_ktab1" value="fastq1.ktab"/> | 130 <conditional name="input_type"> |
| 59 <param name="input_ktab1_tar" value="fastk_in1.tar"/> | 131 <param name="input_type_selector" value="single"/> |
| 60 <param name="input_ktab2" value="fastq2.ktab"/> | 132 <param name="input_ktab1" value="fastq1.ktab"/> |
| 61 <param name="input_ktab2_tar" value="fastk_in2.tar"/> | 133 <param name="input_ktab1_tar" value="fastk_in1.tar"/> |
| 62 <param name="operation_selector" value="AND"/> | 134 <param name="input_ktab2" value="fastq2.ktab"/> |
| 135 <param name="input_ktab2_tar" value="fastk_in2.tar"/> | |
| 136 <param name="operation_selector" value="and"/> | |
| 137 </conditional> | |
| 63 <output name="fastk_hist_out" ftype="fastk_hist"> | 138 <output name="fastk_hist_out" ftype="fastk_hist"> |
| 64 <assert_contents> | 139 <assert_contents> |
| 65 <has_size value="262164"/> | 140 <has_size value="262164"/> |
| 66 </assert_contents> | 141 </assert_contents> |
| 67 </output> | 142 </output> |
| 76 <has_archive_member path="logex_ktabs/.out.ktab.1"/> | 151 <has_archive_member path="logex_ktabs/.out.ktab.1"/> |
| 77 <has_archive_member path="input_files/input1.ktab"/> | 152 <has_archive_member path="input_files/input1.ktab"/> |
| 78 <has_archive_member path="input_files/.input1.ktab.1"/> | 153 <has_archive_member path="input_files/.input1.ktab.1"/> |
| 79 <has_archive_member path="input_files/input2.ktab"/> | 154 <has_archive_member path="input_files/input2.ktab"/> |
| 80 <has_archive_member path="input_files/.input2.ktab.1"/> | 155 <has_archive_member path="input_files/.input2.ktab.1"/> |
| 156 </assert_contents> | |
| 157 </output> | |
| 158 </test> | |
| 159 <test expect_num_outputs="3"> | |
| 160 <conditional name="input_type"> | |
| 161 <param name="input_type_selector" value="collection"/> | |
| 162 <param name="input_ktab_collection"> | |
| 163 <collection type="list"> | |
| 164 <element name="input1" value="fastq1.ktab"/> | |
| 165 <element name="input2" value="fastq2.ktab"/> | |
| 166 </collection> | |
| 167 </param> | |
| 168 <param name="input_ktab_collection_tar"> | |
| 169 <collection type="list"> | |
| 170 <element name="input1" value="fastk_in1.tar"/> | |
| 171 <element name="input2" value="fastk_in2.tar"/> | |
| 172 </collection> | |
| 173 </param> | |
| 174 <conditional name="operation_sel"> | |
| 175 <param name="operation_selector_collection" value="and"/> | |
| 176 </conditional> | |
| 177 </conditional> | |
| 178 <output name="fastk_hist_out" ftype="fastk_hist"> | |
| 179 <assert_contents> | |
| 180 <has_size value="262164"/> | |
| 181 </assert_contents> | |
| 182 </output> | |
| 183 <output name="fastk_ktab_out" ftype="fastk_ktab"> | |
| 184 <assert_contents> | |
| 185 <has_size value="2064"/> | |
| 186 </assert_contents> | |
| 187 </output> | |
| 188 <output name="fastk_ktab_files" ftype="fastk_ktab_tar"> | |
| 189 <assert_contents> | |
| 190 <has_archive_member path="logex_ktabs/out.ktab"/> | |
| 191 <has_archive_member path="logex_ktabs/.out.ktab.1"/> | |
| 192 <has_archive_member path="input_files/1.ktab"/> | |
| 193 <has_archive_member path="input_files/.1.ktab.1"/> | |
| 194 <has_archive_member path="input_files/2.ktab"/> | |
| 195 <has_archive_member path="input_files/.2.ktab.1"/> | |
| 196 </assert_contents> | |
| 197 </output> | |
| 198 </test> | |
| 199 <test expect_num_outputs="3"> | |
| 200 <conditional name="input_type"> | |
| 201 <param name="input_type_selector" value="collection"/> | |
| 202 <param name="input_ktab_collection"> | |
| 203 <collection type="list"> | |
| 204 <element name="input1" value="fastq1.ktab"/> | |
| 205 <element name="input2" value="fastq2.ktab"/> | |
| 206 </collection> | |
| 207 </param> | |
| 208 <param name="input_ktab_collection_tar"> | |
| 209 <collection type="list"> | |
| 210 <element name="input1" value="fastk_in1.tar"/> | |
| 211 <element name="input2" value="fastk_in2.tar"/> | |
| 212 </collection> | |
| 213 </param> | |
| 214 <conditional name="operation_sel"> | |
| 215 <param name="operation_selector_collection" value="unionsum"/> | |
| 216 </conditional> | |
| 217 </conditional> | |
| 218 <output name="fastk_hist_out" ftype="fastk_hist"> | |
| 219 <assert_contents> | |
| 220 <has_size value="262164"/> | |
| 221 </assert_contents> | |
| 222 </output> | |
| 223 <output name="fastk_ktab_out" ftype="fastk_ktab"> | |
| 224 <assert_contents> | |
| 225 <has_size value="2064"/> | |
| 226 </assert_contents> | |
| 227 </output> | |
| 228 <output name="fastk_ktab_files" ftype="fastk_ktab_tar"> | |
| 229 <assert_contents> | |
| 230 <has_archive_member path="logex_ktabs/out.ktab"/> | |
| 231 <has_archive_member path="logex_ktabs/.out.ktab.1"/> | |
| 232 <has_archive_member path="input_files/1.ktab"/> | |
| 233 <has_archive_member path="input_files/.1.ktab.1"/> | |
| 234 <has_archive_member path="input_files/2.ktab"/> | |
| 235 <has_archive_member path="input_files/.2.ktab.1"/> | |
| 236 </assert_contents> | |
| 237 </output> | |
| 238 </test> | |
| 239 <test expect_num_outputs="3"> | |
| 240 <conditional name="input_type"> | |
| 241 <param name="input_type_selector" value="collection"/> | |
| 242 <param name="input_ktab_collection"> | |
| 243 <collection type="list"> | |
| 244 <element name="input1" value="fastq1.ktab"/> | |
| 245 <element name="input2" value="fastq2.ktab"/> | |
| 246 </collection> | |
| 247 </param> | |
| 248 <param name="input_ktab_collection_tar"> | |
| 249 <collection type="list"> | |
| 250 <element name="input1" value="fastk_in1.tar"/> | |
| 251 <element name="input2" value="fastk_in2.tar"/> | |
| 252 </collection> | |
| 253 </param> | |
| 254 <conditional name="operation_sel"> | |
| 255 <param name="operation_selector_collection" value="custom"/> | |
| 256 <param name="custom_expression" value="A&.B"/> | |
| 257 </conditional> | |
| 258 </conditional> | |
| 259 <output name="fastk_hist_out" ftype="fastk_hist"> | |
| 260 <assert_contents> | |
| 261 <has_size value="262164"/> | |
| 262 </assert_contents> | |
| 263 </output> | |
| 264 <output name="fastk_ktab_out" ftype="fastk_ktab"> | |
| 265 <assert_contents> | |
| 266 <has_size value="2064"/> | |
| 267 </assert_contents> | |
| 268 </output> | |
| 269 <output name="fastk_ktab_files" ftype="fastk_ktab_tar"> | |
| 270 <assert_contents> | |
| 271 <has_archive_member path="logex_ktabs/out.ktab"/> | |
| 272 <has_archive_member path="logex_ktabs/.out.ktab.1"/> | |
| 273 <has_archive_member path="input_files/1.ktab"/> | |
| 274 <has_archive_member path="input_files/.1.ktab.1"/> | |
| 275 <has_archive_member path="input_files/2.ktab"/> | |
| 276 <has_archive_member path="input_files/.2.ktab.1"/> | |
| 81 </assert_contents> | 277 </assert_contents> |
| 82 </output> | 278 </output> |
| 83 </test> | 279 </test> |
| 84 </tests> | 280 </tests> |
| 85 <help><![CDATA[ | 281 <help><![CDATA[ |
| 86 | 282 |
| 87 Logex tool can perform operations such as AND, OR, XOR, Minus and Unionsum on the input given input Ktab files. | 283 Logex tool can perform operations such as AND, OR, XOR, Minus and Unionsum on the input given input Ktab files. |
| 88 | 284 |
| 89 The tool requires two input Ktab files and their associated files (Generated in the tarball of FASTK tool with .1 extension) as inputs to perform various binary operations. | 285 The tool requires two input Ktab files and their associated files (Generated in the tarball of FASTK tool with .1 extension) as inputs to perform various binary operations. |
| 286 | |
| 287 The tool also supports Ktab file collections as input. The user can select the operation to be performed on the input Ktab files. | |
| 90 | 288 |
| 91 ]]></help> | 289 ]]></help> |
| 92 <expand macro="citations"/> | 290 <expand macro="citations"/> |
| 93 </tool> | 291 </tool> |
