Mercurial > repos > bernhardlutz > rest_tool
comparison rest_tool.xml @ 6:9ee84d9fd3a7 draft
Uploaded
| author | bernhardlutz |
|---|---|
| date | Thu, 03 Apr 2014 06:50:57 -0400 |
| parents | |
| children | 3c1e862e8cd6 |
comparison
equal
deleted
inserted
replaced
| 5:1ad356686717 | 6:9ee84d9fd3a7 |
|---|---|
| 1 <tool id="rest_tool" name="Fetch Data from pubchem" version="0.1.0"> | |
| 2 <description>Fetch pubchem data</description> | |
| 3 <version_command>echo "0.1.0"</version_command> | |
| 4 <requirements> | |
| 5 <requirement type="set_environment">REST_TOOL_SCRIPT_PATH</requirement> | |
| 6 </requirements> | |
| 7 <macros> | |
| 8 <import>rest_tool_macros.xml</import> | |
| 9 </macros> | |
| 10 <command interpreter="python"> | |
| 11 #if $choose_action.action == 'search': | |
| 12 rest_tool_search.py --type $choose_action.input_type_search --name $choose_action.search_name --outfile $output | |
| 13 | |
| 14 #elif $choose_action.action == 'specific_data': | |
| 15 rest_tool.py | |
| 16 #if $choose_action.field_or_file1.field_or_file1 == 'field': | |
| 17 --id $choose_action.field_or_file1.id1 | |
| 18 #else: | |
| 19 --id-file $choose_action.field_or_file1.file_ids_1 | |
| 20 #end if | |
| 21 --type $choose_action.choose_acs.input_type | |
| 22 | |
| 23 #if $choose_action.choose_acs.input_type == 'assay': | |
| 24 --operation $choose_action.choose_acs.operation_assay.operation_assay | |
| 25 #if $choose_action.choose_acs.operation_assay.operation_assay == 'property': | |
| 26 --property-value $choose_action.choose_acs.operation_assay.property_assay | |
| 27 #elif $choose_action.choose_acs.operation_assay.operation_assay == 'aids': | |
| 28 --id-type $choose_action.choose_acs.operation_assay.aids_type_assay | |
| 29 #elif $choose_action.choose_acs.operation_assay.operation_assay == 'cids': | |
| 30 --id-type $choose_action.choose_acs.operation_assay.cids_type_assay | |
| 31 #elif $choose_action.choose_acs.operation_assay.operation_assay == 'sids': | |
| 32 --id-type $choose_action.choose_acs.operation_assay.sids_type_assay | |
| 33 #end if | |
| 34 #elif $choose_action.choose_acs.input_type == 'compound': | |
| 35 --operation $choose_action.choose_acs.operation_compound.operation_compound | |
| 36 #if $choose_action.choose_acs.operation_compound.operation_compound == 'property': | |
| 37 --property-value $choose_action.choose_acs.operation_compound.property_compound | |
| 38 #elif $choose_action.choose_acs.operation_compound.operation_compound == 'aids': | |
| 39 --id-type $choose_action.choose_acs.operation_compound.aids_type_compound | |
| 40 #elif $choose_action.choose_acs.operation_compound.operation_compound == 'cids': | |
| 41 --id-type $choose_action.choose_acs.operation_compound.cids_type_compound | |
| 42 #elif $choose_action.choose_acs.operation_compound.operation_compound == 'sids': | |
| 43 --id-type $choose_action.choose_acs.operation_compound.sids_type_compound | |
| 44 #end if | |
| 45 #else: | |
| 46 --operation $choose_action.choose_acs.operation_substance.operation_substance | |
| 47 #if $choose_action.choose_acs.operation_substance.operation_substance == 'property': | |
| 48 --property-value $choose_action.choose_acs.operation_substance.property_substance | |
| 49 #elif $choose_action.choose_acs.operation_substance.operation_substance == 'aids': | |
| 50 --id-type $choose_action.choose_acs.operation_substance.aids_type_substance | |
| 51 #elif $choose_action.choose_acs.operation_substance.operation_substance == 'cids': | |
| 52 --id-type $choose_action.choose_acs.operation_substance.cids_type_substance | |
| 53 #elif $choose_action.choose_acs.operation_substance.operation_substance == 'sids': | |
| 54 --id-type $choose_action.choose_acs.operation_substance.sids_type_substance | |
| 55 #end if | |
| 56 #end if | |
| 57 --outfile $output | |
| 58 #elif $choose_action.action == 'compounds_for_assay': | |
| 59 rest_tool_comp_for_assay.py | |
| 60 #if $choose_action.field_or_file2.field_or_file2 == 'field': | |
| 61 --aid $choose_action.field_or_file2.id2 | |
| 62 #else: | |
| 63 --aid-file $choose_action.field_or_file2.file_ids_2 | |
| 64 #end if | |
| 65 --outfile $output | |
| 66 #elif $choose_action.action == 'assays_by_activity_or_target': | |
| 67 rest_tool_assay_by_activity_or_target.py | |
| 68 #if $choose_action.activity_or_target.activity_or_target == 'activity': | |
| 69 --activity $choose_action.activity_or_target.activity | |
| 70 #else: | |
| 71 --target $choose_action.activity_or_target.target_id | |
| 72 --target-type $choose_action.activity_or_target.target_identifier_type | |
| 73 #end if | |
| 74 --outfile $output | |
| 75 | |
| 76 #end if | |
| 77 </command> | |
| 78 | |
| 79 <inputs> | |
| 80 <conditional name="choose_action"> | |
| 81 <param name="action" multiple="false" type="select" label="Choose action"> | |
| 82 <option value="search">Search for Assay/Compound/Substance</option> | |
| 83 <option value="specific_data">Get Data for specific Assay/Compound/Substance</option> | |
| 84 <option value="compounds_for_assay">Get all compound IDs given BioAssay IDs</option> | |
| 85 <option value="assays_by_activity_or_target">Get BioAssay IDs given activity/target</option> | |
| 86 </param> | |
| 87 <when value="search"> | |
| 88 <param name="input_type_search" multiple="false" type="select" label="Search for"> | |
| 89 <option value="assay">BioAssay</option> | |
| 90 <option value="compound">Compound</option> | |
| 91 <option value="substance">Substance</option> | |
| 92 </param> | |
| 93 <param name="input_type" multiple="false" type="select" label="Search By"> | |
| 94 <option value="name">Name</option> | |
| 95 </param> | |
| 96 <param format="txt" name="search_name" type="text" label="Enter the Name" /> | |
| 97 </when> | |
| 98 <when value="specific_data"> | |
| 99 <conditional name="field_or_file1"> | |
| 100 <param name="field_or_file1" multiple="false" type="select" label="Specify the ID by"> | |
| 101 <option value="field" selected="True">Textfield</option> | |
| 102 <option value="file">File</option> | |
| 103 </param> | |
| 104 <when value="field"> | |
| 105 <param format="txt" name="id1" type="text" label="Enter the ID(s)" /> | |
| 106 </when> | |
| 107 <when value="file"> | |
| 108 <param format="txt,csv" name="file_ids_1" type="data" label="Give the file" /> | |
| 109 </when> | |
| 110 </conditional> | |
| 111 <conditional name="choose_acs"> | |
| 112 <param name="input_type" multiple="false" type="select" label="Input Type"> | |
| 113 <option value="assay">BioAssay</option> | |
| 114 <option value="compound">Compound</option> | |
| 115 <option value="substance">Substance</option> | |
| 116 </param> | |
| 117 | |
| 118 <when value="assay"> | |
| 119 <conditional name="operation_assay"> | |
| 120 <param name="operation_assay" type="select" multiple="false" label="Operation"> | |
| 121 <expand macro="aid_cid_sid" /> | |
| 122 <option value="record">Record</option> | |
| 123 <option value="classification">Classification</option> | |
| 124 <option value="property">Property</option> | |
| 125 <option value="description">Discription</option> | |
| 126 <option value="summary">Summary</option> | |
| 127 </param> | |
| 128 <when value="property"> | |
| 129 <param name="property_assay" label="Specify Property" type="text" /> | |
| 130 </when> | |
| 131 <when value="aids"> | |
| 132 <param name="aids_type_assay" multiple="false" type="select" label="AID Type"> | |
| 133 <expand macro="aids_when_options" /> | |
| 134 </param> | |
| 135 </when> | |
| 136 <when value="cids"> | |
| 137 <param name="cids_type_assay" multiple="false" type="select" label="CID Type"> | |
| 138 <expand macro="aids_when_options" /> | |
| 139 | |
| 140 </param> | |
| 141 </when> | |
| 142 <when value="sids"> | |
| 143 <param name="sids_type_assay" multiple="false" type="select" label="SID Type"> | |
| 144 <expand macro="aids_when_options" /> | |
| 145 <option value="doseresponse">doseresponse</option> | |
| 146 </param> | |
| 147 </when> | |
| 148 </conditional> | |
| 149 </when> | |
| 150 <when value="compound"> | |
| 151 <conditional name="operation_compound"> | |
| 152 <param name="operation_compound" type="select" multiple="false" label="Operation"> | |
| 153 <expand macro="aid_cid_sid" /> | |
| 154 <expand macro="option_compound_substance" /> | |
| 155 <option value="property">Property</option> | |
| 156 </param> | |
| 157 <when value="property"> | |
| 158 <param name="property_compound" label="Specify Property" type="text" /> | |
| 159 </when> | |
| 160 <when value="aids"> | |
| 161 <param name="aids_type_compound" multiple="false" type="select" label="AID Type"> | |
| 162 <expand macro="aids_when_options" /> | |
| 163 </param> | |
| 164 </when> | |
| 165 <when value="sids"> | |
| 166 <param name="sids_type_compound" multiple="false" type="select" label="SID Type"> | |
| 167 | |
| 168 <expand macro="cid_sid_type_options" /> | |
| 169 </param> | |
| 170 </when> | |
| 171 <when value="cids"> | |
| 172 <param name="cids_type_compound" multiple="false" type="select" label="CID Type"> | |
| 173 <expand macro="cid_cid_type_options" /> | |
| 174 </param> | |
| 175 </when> | |
| 176 </conditional> | |
| 177 </when> | |
| 178 <when value="substance"> | |
| 179 <conditional name="operation_substance"> | |
| 180 <param name="operation_substance" type="select" multiple="false" label="Operation"> | |
| 181 <expand macro="aid_cid_sid" /> | |
| 182 <expand macro="option_compound_substance" /> | |
| 183 </param> | |
| 184 <when value="property"> | |
| 185 <param name="property_substance" label="Specify Property" type="text" /> | |
| 186 </when> | |
| 187 <when value="aids"> | |
| 188 <param name="aids_type_substance" multiple="false" type="select" label="AID Type"> | |
| 189 <expand macro="aids_when_options" /> | |
| 190 </param> | |
| 191 </when> | |
| 192 <when value="cids"> | |
| 193 <param name="cids_type_substance" multiple="false" type="select" label="CID Type"> | |
| 194 <expand macro="sid_cid_type_options" /> | |
| 195 </param> | |
| 196 </when> | |
| 197 <when value="sids"> | |
| 198 <param name="sids_type_substance" multiple="false" type="select" label="SID Type"> | |
| 199 <expand macro="sid_sid_type_options" /> | |
| 200 </param> | |
| 201 </when> | |
| 202 | |
| 203 </conditional> | |
| 204 </when> | |
| 205 </conditional> | |
| 206 </when> | |
| 207 <!-- second option --> | |
| 208 <when value="compounds_for_assay"> | |
| 209 <conditional name="field_or_file2"> | |
| 210 <param name="field_or_file2" multiple="false" type="select" label="Specify the ID by"> | |
| 211 <option value="field">Textfield</option> | |
| 212 <option value="file">File</option> | |
| 213 </param> | |
| 214 <when value="field"> | |
| 215 <param format="txt" name="id2" type="text" label="Enter the ID(s)" /> | |
| 216 </when> | |
| 217 <when value="file"> | |
| 218 <param format="txt,csv" name="file_ids_2" type="data" label="Give the file" /> | |
| 219 </when> | |
| 220 </conditional> | |
| 221 </when> | |
| 222 <!-- third option --> | |
| 223 <when value="assays_by_activity_or_target"> | |
| 224 <conditional name="activity_or_target"> | |
| 225 <param name="activity_or_target" multiple="false" type="select" label="Look for"> | |
| 226 <option value="target">Target</option> | |
| 227 <option value="activity">Activity</option> | |
| 228 </param> | |
| 229 <when value="activity"> | |
| 230 <param format="txt" name="activity" type="text" label="Enter the activity" /> | |
| 231 </when> | |
| 232 | |
| 233 <when value="target"> | |
| 234 <param name="target_identifier_type" multiple="false" type="select" label="Choose target identifier"> | |
| 235 <option value="gi">GI</option> | |
| 236 <option value="geneid">Gene ID</option> | |
| 237 <option value="genesymbol">Gene Symbol</option> | |
| 238 </param> | |
| 239 <param format="txt" name="target_id" type="text" label="Enter the target" /> | |
| 240 </when> | |
| 241 </conditional> | |
| 242 </when> | |
| 243 | |
| 244 </conditional> | |
| 245 </inputs> | |
| 246 <outputs> | |
| 247 <data format="csv" name="output" /> | |
| 248 </outputs> | |
| 249 <tests> | |
| 250 </tests> | |
| 251 <help> | |
| 252 **What it does** | |
| 253 | |
| 254 This tool fetches data from pubchem | |
| 255 </help> | |
| 256 </tool> |
