Mercurial > repos > galaxyp > msconvert
comparison msconvert_macros.xml @ 13:9337a492ebab draft default tip
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msconvert commit 73cce4134ad971568ac8e557df97bab93ff24d4d
| author | galaxyp |
|---|---|
| date | Fri, 25 Apr 2025 10:03:13 +0000 |
| parents | 5e94d5403baf |
| children |
comparison
equal
deleted
inserted
replaced
| 12:5e94d5403baf | 13:9337a492ebab |
|---|---|
| 1 <macros> | 1 <macros> |
| 2 <token name="@VERSION@">3.0.20287</token> | 2 <token name="@VERSION@">3.0.20287</token> |
| 3 <token name="@FULL_VERSION@">@VERSION@-769529fa4</token> | 3 <token name="@FULL_VERSION@">@VERSION@-769529fa4</token> |
| 4 <token name="@PROFILE_VERSION@">24.2</token> | 4 <token name="@PROFILE_VERSION@">23.2</token> |
| 5 <xml name="msconvertCommand"> | 5 <xml name="msconvertCommand"> |
| 6 <command detect_errors="exit_code"> | 6 <command detect_errors="exit_code"> |
| 7 <![CDATA[ | 7 <![CDATA[ |
| 8 #import re | 8 #import re |
| 9 #set $ext = $input.ext | 9 #set $ext = $input.ext |
| 37 #set input_ident_name = ".".join((os.path.splitext($basename)[0], $data_processing.precursor_refinement.input_ident.ext)) | 37 #set input_ident_name = ".".join((os.path.splitext($basename)[0], $data_processing.precursor_refinement.input_ident.ext)) |
| 38 #set output_refinement_name = os.path.splitext($basename)[0] + '.mzRefinement.tsv' | 38 #set output_refinement_name = os.path.splitext($basename)[0] + '.mzRefinement.tsv' |
| 39 ln -s '$data_processing.precursor_refinement.input_ident' '$input_ident_name' && | 39 ln -s '$data_processing.precursor_refinement.input_ident' '$input_ident_name' && |
| 40 #end if | 40 #end if |
| 41 | 41 |
| 42 CAN_SUDO=\$(sudo -n -l > /dev/null 2> /dev/null; echo $?) && | 42 ## CAN_SUDO is "" if successful and "1" otherwise |
| 43 if [ "\$CAN_SUDO" -eq "0" ]; then | 43 CAN_SUDO=\$(sudo -n -l > /dev/null 2> /dev/null || echo \$?) && |
| 44 echo "CAN SUDO \$CAN_SUDO" && | |
| 45 if [ -z "\$CAN_SUDO" ]; then | |
| 44 uid=`id -u` && | 46 uid=`id -u` && |
| 45 gid=`id -g` && | 47 gid=`id -g` && |
| 46 WINE="wine64_anyuser"; | 48 WINE="wine64_anyuser"; |
| 47 else | 49 else |
| 48 WINE="wine64" && | 50 WINE="wine64" && |
| 49 ## create a writable copy of wine prefix (since copying fails for some html | 51 ## create a writable copy of wine prefix (since copying fails for some html |
| 50 ## stderr and exit code is swallowed) | 52 ## stderr and exit code is swallowed) |
| 213 | 215 |
| 214 #if $general_options.multi_run_output.do_multi_run_output == 'false': | 216 #if $general_options.multi_run_output.do_multi_run_output == 'false': |
| 215 --outfile '${os.path.splitext($basename)[0]}' | 217 --outfile '${os.path.splitext($basename)[0]}' |
| 216 #end if | 218 #end if |
| 217 && | 219 && |
| 218 if [ "\$CAN_SUDO" -eq "0" ]; then | 220 if [ -z "\$CAN_SUDO" ]; then |
| 219 sudo chown -R \$uid:\$gid './'; | 221 sudo chown -R \$uid:\$gid './'; |
| 220 fi | 222 fi |
| 221 #if $general_options.multi_run_output.do_multi_run_output == 'false': | 223 #if $general_options.multi_run_output.do_multi_run_output == 'false': |
| 222 && mv 'outputs/${os.path.splitext($basename)[0]}.${output_type}' '${output}' | 224 && mv 'outputs/${os.path.splitext($basename)[0]}.${output_type}' '${output}' |
| 223 #else | 225 #else |
| 224 ## make mzML and mzXML extensions lower case (the Galaxy data type is ) otherwise detetion of the file | 226 ## make mzML and mzXML extensions lower case (the Galaxy data type is ) otherwise detetion of the file |
| 225 ## this won't be necessay from Galaxy 21.01 https://github.com/galaxyproject/galaxy/pull/10803 | 227 ## this won't be necessay from Galaxy 25.0 https://github.com/galaxyproject/galaxy/pull/19954 |
| 226 #if $output_type == 'mzML' or $output_type == 'mzXML' | 228 #if $output_type == 'mzML' or $output_type == 'mzXML' |
| 227 && find outputs/ -name "*.$output_type" | xargs -I "FILE" sh -c 'mv FILE outputs/\$(basename FILE .$output_type).#echo str($output_type).lower() | 229 && find outputs/ -name "*.$output_type" | xargs -I "FILE" sh -c 'mv FILE outputs/\$(basename FILE .$output_type).#echo str($output_type).lower() |
| 228 ## a newline is needed after `#echo ...` therefore the `;'` on the next line | 230 ## a newline is needed after `#echo ...` therefore the `;'` on the next line |
| 229 ;' | 231 ;' |
| 230 #end if | 232 #end if |
| 427 </when> | 429 </when> |
| 428 <when value="false" /> | 430 <when value="false" /> |
| 429 </conditional> | 431 </conditional> |
| 430 | 432 |
| 431 </section> | 433 </section> |
| 432 | |
| 433 | 434 |
| 434 <section name="filtering" title="Scan Inclusion/Exclusion Filters"> | 435 <section name="filtering" title="Scan Inclusion/Exclusion Filters"> |
| 435 | 436 |
| 436 <param name="activation" type="select" label="Filter by Activation"> | 437 <param name="activation" type="select" label="Filter by Activation"> |
| 437 <option value="false" selected="true">no</option> | 438 <option value="false" selected="true">no</option> |
| 563 <data format="tsv" name="output_refinement" label="${($input.name[:-4] if $input.name.endswith('.tar') else $input.name).rsplit('.',1)[0]}.mzRefinement.tsv"> | 564 <data format="tsv" name="output_refinement" label="${($input.name[:-4] if $input.name.endswith('.tar') else $input.name).rsplit('.',1)[0]}.mzRefinement.tsv"> |
| 564 <filter>data_processing['precursor_refinement']['use_mzrefinement'] == "true"</filter> | 565 <filter>data_processing['precursor_refinement']['use_mzrefinement'] == "true"</filter> |
| 565 </data> | 566 </data> |
| 566 <collection name="multi_run_output_list" type="list" label="${($input.name[:-4] if $input.name.endswith('.tar') else $input.name).rsplit('.',1)[0]}.${output_type} collection"> | 567 <collection name="multi_run_output_list" type="list" label="${($input.name[:-4] if $input.name.endswith('.tar') else $input.name).rsplit('.',1)[0]}.${output_type} collection"> |
| 567 <filter>general_options['multi_run_output']['do_multi_run_output'] == "true"</filter> | 568 <filter>general_options['multi_run_output']['do_multi_run_output'] == "true"</filter> |
| 568 <discover_datasets pattern="__name_and_ext__" directory="outputs" /> | 569 <discover_datasets pattern="__name_and_ext__" directory="outputs" sort_by="designation" /> |
| 569 </collection> | 570 </collection> |
| 570 </outputs> | 571 </outputs> |
| 571 </xml> | 572 </xml> |
| 572 | 573 |
| 573 | 574 |
