comparison moff.xml @ 3:226287d75d96 draft

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/moFF commit c593ff2b871b95505064ee87dff7792165d67d97
author galaxyp
date Wed, 26 Sep 2018 07:15:36 -0400
parents 28b65ce1a091
children 7af419c90f5f
comparison
equal deleted inserted replaced
2:28b65ce1a091 3:226287d75d96
1 <tool id="proteomics_moff" name="moFF" version="@VERSION@.1"> 1 <tool id="proteomics_moff" name="moFF" version="@VERSION@.2">
2 <description>extracts MS1 intensities from spectrum files</description> 2 <description>extracts MS1 intensities from spectrum files</description>
3 <macros> 3 <macros>
4 <token name="@VERSION@">1.2.1</token> 4 <token name="@VERSION@">1.2.1</token>
5 <!-- xml macros, used for shared Galaxy parameter inputs --> 5 <!-- xml macros, used for shared Galaxy parameter inputs -->
6 <xml name="ident_input_macro" token_allow_multiple="true" token_input_type="data"> 6 <xml name="ident_input_macro" token_allow_multiple="true" token_input_type="data">
61 <param argument="--inputraw" type="@INPUT_TYPE@" multiple="@ALLOW_MULTIPLE@" format="mzml" label="mzML file(s)"/> 61 <param argument="--inputraw" type="@INPUT_TYPE@" multiple="@ALLOW_MULTIPLE@" format="mzml" label="mzML file(s)"/>
62 </when> 62 </when>
63 </conditional> 63 </conditional>
64 </xml> 64 </xml>
65 <!-- tokens (code snippets used in <command>) --> 65 <!-- tokens (code snippets used in <command>) -->
66 <token name="@FORMAT@"><![CDATA[
67 #if $task.task_selector != 'mbr'
68 #if $task.msms_input.input_type_selector == "raw":
69 #set $format = '.raw'
70 #else
71 #set $format = '.mzml'
72 #end if
73 #else:
74 #set $format = '.tabular'
75 #end if
76 ]]></token>
66 <token name="@IDENT_INPUT_ARG_MULTIPLE@"><![CDATA[ 77 <token name="@IDENT_INPUT_ARG_MULTIPLE@"><![CDATA[
67 ## this is where the ident input gets passed to moff/moff_all/moff_mbr 78 ## this is where the ident input gets passed to moff/moff_all/moff_mbr
68 --inputtsv 79 --inputtsv
69 #for $key in $task.ident_input.ident_input_file.keys(): 80 #for $value in $task.ident_input.ident_input_file:
70 './ident_inputs/${task.ident_input.ident_input_file[$key].display_name}' 81 './ident_inputs/$value.element_identifier$format'
71 #end for 82 #end for
72 ]]></token> 83 ]]></token>
73 <token name="@IDENT_INPUT_ARG_SINGLE@"><![CDATA[ 84 <token name="@IDENT_INPUT_ARG_SINGLE@"><![CDATA[
74 ## this is where the ident input gets passed to moff/moff_all/moff_mbr 85 ## this is where the ident input gets passed to moff/moff_all/moff_mbr
75 --inputtsv './ident_inputs/${task.ident_input.ident_input_file.display_name}' 86 --inputtsv './ident_inputs/${task.ident_input.ident_input_file.element_identifier}$format'
76 ]]></token> 87 ]]></token>
77 <token name="@WRANGLE_IDENT_INPUT_SINGLE@"><![CDATA[ 88 <token name="@WRANGLE_IDENT_INPUT_SINGLE@"><![CDATA[
78 mkdir ./ident_inputs && 89 mkdir ./ident_inputs &&
79 #if $task.ident_input.input_type_selector == "ps": 90 #if $task.ident_input.input_type_selector == "ps":
80 cp '$task.ident_input.ident_input_file' './ident_inputs/$task.ident_input.ident_input_file.display_name' && 91 cp '$task.ident_input.ident_input_file' './ident_inputs/$task.ident_input.ident_input_file.element_identifier$format' &&
81 #else 92 #else
82 cp '$task.ident_input.ident_input_file' ./tempfile1.tab && 93 cp '$task.ident_input.ident_input_file' ./tempfile1.tab &&
83 ## optionally remove first line 94 ## optionally remove first line
84 #if $task.ident_input.remove_header: 95 #if $task.ident_input.remove_header:
85 sed -i '1d' ./tempfile1.tab && 96 sed -i '1d' ./tempfile1.tab &&
86 #end if 97 #end if
87 ## header row with correct names: "peptide", "prot", "mod_peptide", "rt", "mz", "mass", and "charge" 98 ## header row with correct names: "peptide", "prot", "mod_peptide", "rt", "mz", "mass", and "charge"
88 echo -e "peptide\tprot\tmod_peptide\trt\tmz\tmass\tcharge" > ./tempfile2.tab && 99 echo -e "peptide\tprot\tmod_peptide\trt\tmz\tmass\tcharge" > ./tempfile2.tab &&
89 awk 'BEGIN{OFS="\t"; FS="\t"}{print \$pep,\$prot,\$mod,\$rt,\$mz,\$mass,\$charge}' pep="${task.ident_input.peptide}" prot="$task.ident_input.prot" mod="$task.ident_input.mod_peptide" rt="$task.ident_input.rt" mz="$task.ident_input.mz" mass="$task.ident_input.mass" charge="$task.ident_input.charge" ./tempfile1.tab >> ./tempfile2.tab && 100 awk 'BEGIN{OFS="\t"; FS="\t"}{print \$pep,\$prot,\$mod,\$rt,\$mz,\$mass,\$charge}' pep="${task.ident_input.peptide}" prot="$task.ident_input.prot" mod="$task.ident_input.mod_peptide" rt="$task.ident_input.rt" mz="$task.ident_input.mz" mass="$task.ident_input.mass" charge="$task.ident_input.charge" ./tempfile1.tab >> ./tempfile2.tab &&
90 mv ./tempfile2.tab './ident_inputs/$task.ident_input.ident_input_file.display_name' && 101 mv ./tempfile2.tab './ident_inputs/$task.ident_input.ident_input_file.element_identifier$format' &&
91 #end if 102 #end if
92 ]]></token> 103 ]]></token>
93 <token name="@WRANGLE_IDENT_INPUT_MULTIPLE@"><![CDATA[ 104 <token name="@WRANGLE_IDENT_INPUT_MULTIPLE@"><![CDATA[
94 mkdir ./ident_inputs && 105 mkdir ./ident_inputs &&
95 #if $task.ident_input.input_type_selector == "ps": 106 #if $task.ident_input.input_type_selector == "ps":
96 #for $key in $task.ident_input.ident_input_file.keys(): 107 #for $value in $task.ident_input.ident_input_file:
97 cp '${task.ident_input.ident_input_file[$key]}' './ident_inputs/${task.ident_input.ident_input_file[$key].display_name}' && 108 cp '${value}' './ident_inputs/${value.element_identifier}$format' &&
98 #end for 109 #end for
99 #else 110 #else
100 #for $key in $task.ident_input.ident_input_file.keys(): 111 #for $i, $value in enumerate($task.ident_input.ident_input_file):
101 cp '${task.ident_input.ident_input_file[$key]}' './tempfile${key}_1.tab' && 112 cp '${value}' './tempfile${i}_1.tab' &&
102 ## optionally remove first line 113 ## optionally remove first line
103 #if $task.ident_input.remove_header: 114 #if $task.ident_input.remove_header:
104 sed -i '1d' './tempfile${key}_1.tab' && 115 sed -i '1d' './tempfile${i}_1.tab' &&
105 #end if 116 #end if
106 ## header row with correct names: "peptide", "prot", "mod_peptide", "rt", "mz", "mass", and "charge" 117 ## header row with correct names: "peptide", "prot", "mod_peptide", "rt", "mz", "mass", and "charge"
107 echo -e "peptide\tprot\tmod_peptide\trt\tmz\tmass\tcharge" > './tempfile${key}_2.tab' && 118 echo -e "peptide\tprot\tmod_peptide\trt\tmz\tmass\tcharge" > './tempfile${i}_2.tab' &&
108 awk 'BEGIN{OFS="\t"; FS="\t"}{print \$pep,\$prot,\$mod,\$rt,\$mz,\$mass,\$charge}' pep="${task.ident_input.peptide}" prot="$task.ident_input.prot" mod="$task.ident_input.mod_peptide" rt="$task.ident_input.rt" mz="$task.ident_input.mz" mass="$task.ident_input.mass" charge="$task.ident_input.charge" './tempfile${key}_1.tab' >> './tempfile${key}_2.tab' && 119 awk 'BEGIN{OFS="\t"; FS="\t"}{print \$pep,\$prot,\$mod,\$rt,\$mz,\$mass,\$charge}' pep="${task.ident_input.peptide}" prot="$task.ident_input.prot" mod="$task.ident_input.mod_peptide" rt="$task.ident_input.rt" mz="$task.ident_input.mz" mass="$task.ident_input.mass" charge="$task.ident_input.charge" './tempfile${i}_1.tab' >> './tempfile${i}_2.tab' &&
109 mv './tempfile${key}_2.tab' './ident_inputs/$task.ident_input.ident_input_file[$key].display_name' && 120 mv './tempfile${i}_2.tab' './ident_inputs/${value.element_identifier}$format' &&
110 #end for 121 #end for
111 #end if 122 #end if
112 ]]></token> 123 ]]></token>
113 <token name="@RAW_INPUT_ARG_SINGLE@"><![CDATA[ 124 <token name="@RAW_INPUT_ARG_SINGLE@"><![CDATA[
114 --inputraw './raws/$task.msms_input.inputraw.display_name' 125 --inputraw './raws/$task.msms_input.inputraw.element_identifier$format'
115 ]]></token> 126 ]]></token>
116 <token name="@RAW_INPUT_ARG_MULTIPLE@"><![CDATA[ 127 <token name="@RAW_INPUT_ARG_MULTIPLE@"><![CDATA[
117 --inputraw 128 --inputraw
118 #for $key in $task.msms_input.inputraw.keys(): 129 #for $value in $task.msms_input.inputraw:
119 './raws/$task.msms_input.inputraw[$key].display_name' 130 './raws/$value.element_identifier$format'
120 #end for 131 #end for
121 ]]></token> 132 ]]></token>
122 <token name="@WRANGLE_RAW_INPUT_SINGLE@"><![CDATA[ 133 <token name="@WRANGLE_RAW_INPUT_SINGLE@"><![CDATA[
123 mkdir ./raws && 134 mkdir ./raws &&
124 ## for files, need to softlink the display name to the history item 135 ## for files, need to softlink the name to the history item
125 ln -s '$task.msms_input.inputraw' './raws/$task.msms_input.inputraw.display_name' && 136 ln -s '$task.msms_input.inputraw' './raws/$task.msms_input.inputraw.element_identifier$format' &&
126 ]]></token> 137 ]]></token>
127 <token name="@WRANGLE_RAW_INPUT_MULTIPLE@"><![CDATA[ 138 <token name="@WRANGLE_RAW_INPUT_MULTIPLE@"><![CDATA[
128 mkdir ./raws && 139 mkdir ./raws &&
129 ## for files, need to softlink the display name to the history item 140 ## for files, need to softlink the name to the history item
130 #for $key in $task.msms_input.inputraw.keys(): 141 #for $value in $task.msms_input.inputraw:
131 ln -s '$task.msms_input.inputraw[$key]' './raws/$task.msms_input.inputraw[$key].display_name' && 142 ln -s '$value' './raws/$value.element_identifier$format' &&
132 #end for 143 #end for
133 ]]></token> 144 ]]></token>
134 </macros> 145 </macros>
135 <requirements> 146 <requirements>
136 <requirement type="package" version="@VERSION@">moff</requirement> 147 <requirement type="package" version="@VERSION@">moff</requirement>
137 </requirements> 148 </requirements>
138 <version_command>echo @VERSION@</version_command> 149 <version_command>echo @VERSION@</version_command>
139 <command detect_errors="aggressive"><![CDATA[ 150 <command detect_errors="aggressive"><![CDATA[
151 @FORMAT@
140 mkdir ./out && 152 mkdir ./out &&
141 #if $task.task_selector == "moff": 153 #if $task.task_selector == "moff":
142 @WRANGLE_IDENT_INPUT_SINGLE@ 154 @WRANGLE_IDENT_INPUT_SINGLE@
143 @WRANGLE_RAW_INPUT_SINGLE@ 155 @WRANGLE_RAW_INPUT_SINGLE@
144 moff.py 156 moff.py