Mercurial > repos > bernhardlutz > rest_tool
comparison rest_tool.xml @ 8:3c1e862e8cd6 draft
Uploaded
| author | bernhardlutz |
|---|---|
| date | Fri, 02 May 2014 05:40:28 -0400 |
| parents | 9ee84d9fd3a7 |
| children | 80bf0039c0dc |
comparison
equal
deleted
inserted
replaced
| 7:35b41070c20d | 8:3c1e862e8cd6 |
|---|---|
| 4 <requirements> | 4 <requirements> |
| 5 <requirement type="set_environment">REST_TOOL_SCRIPT_PATH</requirement> | 5 <requirement type="set_environment">REST_TOOL_SCRIPT_PATH</requirement> |
| 6 </requirements> | 6 </requirements> |
| 7 <macros> | 7 <macros> |
| 8 <import>rest_tool_macros.xml</import> | 8 <import>rest_tool_macros.xml</import> |
| 9 <import>rest_tool_macro_advanced.xml</import> | |
| 9 </macros> | 10 </macros> |
| 10 <command interpreter="python"> | 11 <command interpreter="python"> |
| 11 #if $choose_action.action == 'search': | 12 #if $choose_action.action == 'specific_data': |
| 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 | 13 rest_tool.py |
| 16 #if $choose_action.field_or_file1.field_or_file1 == 'field': | 14 #if $choose_action.field_or_file.field_or_file_select == 'field': |
| 17 --id $choose_action.field_or_file1.id1 | 15 --id $choose_action.field_or_file.id_value |
| 18 #else: | 16 #else: |
| 19 --id-file $choose_action.field_or_file1.file_ids_1 | 17 --id-file $choose_action.field_or_file.id_value |
| 20 #end if | 18 #end if |
| 21 --type $choose_action.choose_acs.input_type | 19 --type $choose_action.choose_acs.input_type |
| 22 | 20 |
| 23 #if $choose_action.choose_acs.input_type == 'assay': | 21 #if $choose_action.choose_acs.input_type == 'assay': |
| 24 --operation $choose_action.choose_acs.operation_assay.operation_assay | 22 --operation $choose_action.choose_acs.operation_assay.operation_assay |
| 25 #if $choose_action.choose_acs.operation_assay.operation_assay == 'property': | 23 #if $choose_action.choose_acs.operation_assay.operation_assay == 'property': |
| 26 --property-value $choose_action.choose_acs.operation_assay.property_assay | 24 --property-value $choose_action.choose_acs.operation_assay.property_assay |
| 27 #elif $choose_action.choose_acs.operation_assay.operation_assay == 'aids': | 25 #elif $choose_action.choose_acs.operation_assay.operation_assay == 'aids' or $choose_action.choose_acs.operation_assay.operation_assay == 'cids' or $choose_action.choose_acs.operation_assay.operation_assay == 'sids': |
| 28 --id-type $choose_action.choose_acs.operation_assay.aids_type_assay | 26 --id-type $choose_action.choose_acs.operation_assay.ids_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 | 27 #end if |
| 34 #elif $choose_action.choose_acs.input_type == 'compound': | 28 #elif $choose_action.choose_acs.input_type == 'compound': |
| 35 --operation $choose_action.choose_acs.operation_compound.operation_compound | 29 --operation $choose_action.choose_acs.operation_compound.operation_compound |
| 36 #if $choose_action.choose_acs.operation_compound.operation_compound == 'property': | 30 #if $choose_action.choose_acs.operation_compound.operation_compound == 'property': |
| 37 --property-value $choose_action.choose_acs.operation_compound.property_compound | 31 --property-value $choose_action.choose_acs.operation_compound.property_compound |
| 38 #elif $choose_action.choose_acs.operation_compound.operation_compound == 'aids': | 32 #elif $choose_action.choose_acs.operation_compound.operation_compound == 'aids' or $choose_action.choose_acs.operation_compound.operation_compound == 'cids' or $choose_action.choose_acs.operation_compound.operation_compound == 'sids': |
| 39 --id-type $choose_action.choose_acs.operation_compound.aids_type_compound | 33 --id-type $choose_action.choose_acs.operation_compound.ids_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 | 34 #end if |
| 45 #else: | 35 #else: |
| 46 --operation $choose_action.choose_acs.operation_substance.operation_substance | 36 --operation $choose_action.choose_acs.operation_substance.operation_substance |
| 47 #if $choose_action.choose_acs.operation_substance.operation_substance == 'property': | 37 #if $choose_action.choose_acs.operation_substance.operation_substance == 'property': |
| 48 --property-value $choose_action.choose_acs.operation_substance.property_substance | 38 --property-value $choose_action.choose_acs.operation_substance.property_substance |
| 49 #elif $choose_action.choose_acs.operation_substance.operation_substance == 'aids': | 39 #elif $choose_action.choose_acs.operation_substance.operation_substance == 'aids' or $choose_action.choose_acs.operation_substance.operation_substance == 'cids' or $choose_action.choose_acs.operation_substance.operation_substance == 'sids': |
| 50 --id-type $choose_action.choose_acs.operation_substance.aids_type_substance | 40 --id-type $choose_action.choose_acs.operation_substance.ids_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 | 41 #end if |
| 56 #end if | 42 #end if |
| 57 --outfile $output | 43 --outfile $output |
| 58 #elif $choose_action.action == 'compounds_for_assay': | 44 #elif $choose_action.action == 'compounds_for_assay': |
| 59 rest_tool_comp_for_assay.py | 45 rest_tool_comp_for_assay.py |
| 60 #if $choose_action.field_or_file2.field_or_file2 == 'field': | 46 #if $choose_action.field_or_file.field_or_file_select == 'field': |
| 61 --aid $choose_action.field_or_file2.id2 | 47 --aid $choose_action.field_or_file.id_value |
| 62 #else: | 48 #else: |
| 63 --aid-file $choose_action.field_or_file2.file_ids_2 | 49 --aid-file $choose_action.field_or_file.id_value |
| 64 #end if | 50 #end if |
| 65 --outfile $output | 51 --outfile $output |
| 66 #elif $choose_action.action == 'assays_by_activity_or_target': | 52 #elif $choose_action.action == 'assays_by_activity_or_target': |
| 67 rest_tool_assay_by_activity_or_target.py | 53 rest_tool_assay_by_activity_or_target.py |
| 68 #if $choose_action.activity_or_target.activity_or_target == 'activity': | 54 #if $choose_action.activity_or_target.activity_or_target == 'activity': |
| 70 #else: | 56 #else: |
| 71 --target $choose_action.activity_or_target.target_id | 57 --target $choose_action.activity_or_target.target_id |
| 72 --target-type $choose_action.activity_or_target.target_identifier_type | 58 --target-type $choose_action.activity_or_target.target_identifier_type |
| 73 #end if | 59 #end if |
| 74 --outfile $output | 60 --outfile $output |
| 75 | 61 #elif $choose_action.action == 'advanced': |
| 62 rest_tool_advanced.py | |
| 63 --outfile $output | |
| 64 --type $choose_action.input_type.input_type_select | |
| 65 --id-type $choose_action.input_type.namespace_id.namespace_id_select | |
| 66 #if $choose_action.input_type.input_type_select == 'assay': | |
| 67 #if $choose_action.input_type.namespace_id.namespace_id_select == 'aid': | |
| 68 --id-type-ff $choose_action.input_type.namespace_id.field_or_file.field_or_file_select | |
| 69 --id-value $choose_action.input_type.namespace_id.field_or_file.id_value | |
| 70 #elif $choose_action.input_type.namespace_id.namespace_id_select == 'target': | |
| 71 --id-value $choose_action.input_type.namespace_id.target_select | |
| 72 #elif $choose_action.input_type.namespace_id.namespace_id_select == 'type': | |
| 73 --id-value $choose_action.input_type.namespace_id.type_select | |
| 74 #elif $choose_action.input_type.namespace_id.namespace_id_select == 'activity': | |
| 75 --id-value $choose_action.input_type.namespace_id.activity_select | |
| 76 #end if | |
| 77 | |
| 78 --operation $choose_action.input_type.operation_assay.operation_assay_select | |
| 79 | |
| 80 #if $choose_action.input_type.operation_assay.operation_assay_select == 'property': | |
| 81 --operation-value $choose_action.input_type.operation_assay.operation_assay_select.property_assay | |
| 82 #elif $choose_action.input_type.operation_assay.operation_assay_select == 'target': | |
| 83 --operation-value $choose_action.input_type.operation_assay.operation_assay_select.target_assay | |
| 84 #elif $choose_action.input_type.operation_assay.operation_assay_select == 'aids' or $choose_action.input_type.operation_assay.operation_assay_select == 'cids' or $choose_action.input_type.operation_assay.operation_assay_select == 'sids': | |
| 85 --ids-operation-type $choose_action.input_type.operation_assay.ids_type_assay | |
| 86 #end if | |
| 87 #elif $choose_action.input_type.input_type_select == 'compound': | |
| 88 #if $choose_action.input_type.namespace_id.namespace_id_select == 'cid' or $choose_action.input_type.namespace_id.namespace_id_select == 'name' or $choose_action.input_type.namespace_id.namespace_id_select == 'smiles' or $choose_action.input_type.namespace_id.namespace_id_select == 'inchi' or $choose_action.input_type.namespace_id.namespace_id_select == 'inchikey' or $choose_action.input_type.namespace_id.namespace_id_select == 'sdf': | |
| 89 --id-type-ff $choose_action.input_type.namespace_id.field_or_file.field_or_file_select | |
| 90 --id-value $choose_action.input_type.namespace_id.field_or_file.id_value | |
| 91 #elif $choose_action.input_type.namespace_id.namespace_id_select == 'xref': | |
| 92 --xref $choose_action.input_type.namespace_id.xref_select | |
| 93 --xref-value $choose_action.input_type.namespace_id.xref_value | |
| 94 #end if | |
| 95 | |
| 96 --operation $choose_action.input_type.operation_compound.operation_compound_select | |
| 97 #if $choose_action.input_type.operation_compound.operation_compound_select == 'property': | |
| 98 --operation-value $choose_action.input_type.operation_compound.property_compound | |
| 99 #elif $choose_action.input_type.operation_compound.operation_compound_select == 'xrefs': | |
| 100 --operation-value $choose_action.input_type.operation_compound.xref_compound | |
| 101 #elif $choose_action.input_type.operation_compound.operation_compound_select == 'aids' or $choose_action.input_type.operation_compound.operation_compound_select == 'cids' or $choose_action.input_type.operation_compound.operation_compound_select == 'sids': | |
| 102 --ids-operation-type $choose_action.input_type.operation_compound.ids_type_compound | |
| 103 #end if | |
| 104 | |
| 105 #elif $choose_action.input_type.input_type_select == 'substance': | |
| 106 #if $choose_action.input_type.namespace_id.namespace_id_select == 'sid' or $choose_action.input_type.namespace_id.namespace_id_select == 'name': | |
| 107 --id-type-ff $choose_action.input_type.namespace_id.field_or_file.field_or_file_select | |
| 108 --id-value $choose_action.input_type.namespace_id.field_or_file.id_value | |
| 109 #elif $choose_action.input_type.namespace_id.namespace_id_select == 'xrefs': | |
| 110 --xref $choose_action.input_type.namespace_id.xref_select | |
| 111 --xref-value $choose_action.input_type.namespace_id.xref_value | |
| 112 #end if | |
| 113 --operation $choose_action.input_type.operation_substance.operation_substance_select | |
| 114 #if $choose_action.input_type.operation_substance.operation_substance_select == 'property': | |
| 115 --operation-value $choose_action.input_type.operation_substance.operation_substance_select.property_substance | |
| 116 #elif $choose_action.input_type.operation_substance.operation_substance_select == 'xref': | |
| 117 --operation-value $choose_action.input_type.operation_substance.xref_substance | |
| 118 #elif $choose_action.input_type.operation_substance.operation_substance_select == 'aids' or $choose_action.input_type.operation_substance.operation_substance_select == 'cids' or $choose_action.input_type.operation_substance.operation_substance_select == 'sids': | |
| 119 --ids-operation-type $choose_action.input_type.operation_substance.ids_type_substance | |
| 120 #end if | |
| 121 #end if | |
| 76 #end if | 122 #end if |
| 77 </command> | 123 </command> |
| 78 | 124 |
| 79 <inputs> | 125 <inputs> |
| 80 <conditional name="choose_action"> | 126 <conditional name="choose_action"> |
| 81 <param name="action" multiple="false" type="select" label="Choose action"> | 127 <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> | 128 <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> | 129 <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> | 130 <option value="assays_by_activity_or_target">Get BioAssay IDs given activity/target</option> |
| 131 <option value="advanced" selected="True">Advanced</option> | |
| 86 </param> | 132 </param> |
| 87 <when value="search"> | 133 <when value="search"> |
| 88 <param name="input_type_search" multiple="false" type="select" label="Search for"> | 134 <param name="input_type_search" multiple="false" type="select" label="Search for"> |
| 89 <option value="assay">BioAssay</option> | 135 <expand macro="acs_options" /> |
| 90 <option value="compound">Compound</option> | |
| 91 <option value="substance">Substance</option> | |
| 92 </param> | 136 </param> |
| 93 <param name="input_type" multiple="false" type="select" label="Search By"> | 137 <param name="input_type" multiple="false" type="select" label="Search By"> |
| 94 <option value="name">Name</option> | 138 <option value="name">Name</option> |
| 95 </param> | 139 </param> |
| 96 <param format="txt" name="search_name" type="text" label="Enter the Name" /> | 140 <param format="txt" name="search_name" type="text" label="Enter the Name" /> |
| 97 </when> | 141 </when> |
| 98 <when value="specific_data"> | 142 <when value="specific_data"> |
| 99 <conditional name="field_or_file1"> | 143 <expand macro="field_or_file" /> |
| 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"> | 144 <conditional name="choose_acs"> |
| 112 <param name="input_type" multiple="false" type="select" label="Input Type"> | 145 <param name="input_type" multiple="false" type="select" label="Input Type"> |
| 113 <option value="assay">BioAssay</option> | 146 <expand macro="acs_options" /> |
| 114 <option value="compound">Compound</option> | |
| 115 <option value="substance">Substance</option> | |
| 116 </param> | 147 </param> |
| 117 | 148 |
| 118 <when value="assay"> | 149 <when value="assay"> |
| 119 <conditional name="operation_assay"> | 150 <expand macro="conditional_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> | 151 </when> |
| 150 <when value="compound"> | 152 <when value="compound"> |
| 151 <conditional name="operation_compound"> | 153 <expand macro="conditional_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> | 154 </when> |
| 178 <when value="substance"> | 155 <when value="substance"> |
| 179 <conditional name="operation_substance"> | 156 <expand macro="conditional_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> | 157 </when> |
| 205 </conditional> | 158 </conditional> |
| 206 </when> | 159 </when> |
| 207 <!-- second option --> | 160 <!-- second option --> |
| 208 <when value="compounds_for_assay"> | 161 <when value="compounds_for_assay"> |
| 209 <conditional name="field_or_file2"> | 162 <expand macro="field_or_file" /> |
| 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> | 163 </when> |
| 222 <!-- third option --> | 164 <!-- third option --> |
| 223 <when value="assays_by_activity_or_target"> | 165 <when value="assays_by_activity_or_target"> |
| 224 <conditional name="activity_or_target"> | 166 <conditional name="activity_or_target"> |
| 225 <param name="activity_or_target" multiple="false" type="select" label="Look for"> | 167 <param name="activity_or_target" multiple="false" type="select" label="Look for"> |
| 238 </param> | 180 </param> |
| 239 <param format="txt" name="target_id" type="text" label="Enter the target" /> | 181 <param format="txt" name="target_id" type="text" label="Enter the target" /> |
| 240 </when> | 182 </when> |
| 241 </conditional> | 183 </conditional> |
| 242 </when> | 184 </when> |
| 243 | 185 <when value="advanced"> |
| 186 <expand macro="advanced2" /> | |
| 187 </when> | |
| 244 </conditional> | 188 </conditional> |
| 245 </inputs> | 189 </inputs> |
| 246 <outputs> | 190 <outputs> |
| 247 <data format="csv" name="output" /> | 191 <data format="csv" name="output" /> |
| 248 </outputs> | 192 </outputs> |
| 249 <tests> | 193 <tests> |
| 250 </tests> | 194 </tests> |
| 251 <help> | 195 <help> |
| 252 **What it does** | 196 **What it does** |
| 253 | 197 |
| 254 This tool fetches data from pubchem | 198 This tool fetches data from pubchem. The outputformat will be if possible csv > txt > xml |
| 255 </help> | 199 </help> |
| 256 </tool> | 200 </tool> |
