Mercurial > repos > ric > test1
comparison biosample.xml @ 12:46f08bb8dd68 draft default tip
Uploaded
| author | ric |
|---|---|
| date | Wed, 28 Sep 2016 04:59:02 -0400 |
| parents | 14122ab2a0ce |
| children |
comparison
equal
deleted
inserted
replaced
| 11:3a6db127d400 | 12:46f08bb8dd68 |
|---|---|
| 1 <tool id="vl_import_biosample" name="VLI.biosample"> | |
| 2 <description>import BioSample definitions within omero/vl</description> | |
| 3 <command interpreter="python"> | |
| 4 #if $__app__.config.vl_import_enabled_users.split(',').count($__user_email__)==1 #importer.py | |
| 5 #else #unauthorized_access.py | |
| 6 #end if | |
| 7 #if $advanced_configuration.configuration_level == 'advanced' | |
| 8 --host=$advanced_configuration.vl_host | |
| 9 --user=$advanced_configuration.vl_user | |
| 10 --passwd=$advanced_configuration.vl_passwd | |
| 11 #end if | |
| 12 --operator=galaxy | |
| 13 --ifile=${input} | |
| 14 --ofile=${output} | |
| 15 --report_file=${report} | |
| 16 --loglevel=$__app__.config.vl_loglevel | |
| 17 --logfile=${logfile} | |
| 18 #if $blocking_validation | |
| 19 --blocking-validator | |
| 20 #end if | |
| 21 biosample | |
| 22 #if str($study) != 'use_provided' | |
| 23 --study ${study} | |
| 24 #end if | |
| 25 #if str($source_type) != 'use_provided' | |
| 26 --source-type ${source_type} | |
| 27 #end if | |
| 28 #if str($vessel_type_selector.vessel_type) != 'use_provided' | |
| 29 --vessel-type ${vessel_type_selector.vessel_type} | |
| 30 #end if | |
| 31 #if str($vessel_content) != 'use_provided' | |
| 32 --vessel-content=${vessel_content} | |
| 33 #end if | |
| 34 #if str($vessel_status) != 'use_provided' | |
| 35 --vessel-status=${vessel_status} | |
| 36 #end if | |
| 37 #if str($vessel_type_selector) == 'IlluminaBeadChipArray' | |
| 38 #if str($vessel_type_selector.assay_type) != 'use_provided' | |
| 39 --bead-chip-assay-type=${vessel_type_selector.assay_type} | |
| 40 #end if | |
| 41 #end if | |
| 42 </command> | |
| 43 | |
| 44 <inputs> | |
| 45 <param format="tabular" name="input" type="data" | |
| 46 label="A tabular dataset with the following columns ..."/> | |
| 47 | |
| 48 <param name="study" type="select" label="Context study" | |
| 49 help="Choose from the already defined studies. See below."> | |
| 50 <options from_parameter="tool.app.known_studies" | |
| 51 transform_lines="[ "%s%s%s:%s" | |
| 52 % ( l[0], self.separator, l[0], l[1][:40] ) | |
| 53 for l in obj ]"> | |
| 54 <column name="value" index="0"/> | |
| 55 <column name="name" index="1"/> | |
| 56 <filter type="sort_by" column="0"/> | |
| 57 <filter type="add_value" name="Records provide study labels" | |
| 58 value="use_provided" index="0"/> | |
| 59 </options> | |
| 60 </param> | |
| 61 | |
| 62 <param name="source_type" type="select" | |
| 63 label="type of the source object" | |
| 64 help="Choose from the legal types. See below."> | |
| 65 <option value="use_provided" selected="true"> | |
| 66 Use what provided by record</option> | |
| 67 <option value="Tube">Tube</option> | |
| 68 <option value="PlateWell">PlateWell</option> | |
| 69 <option value="Individual">Individual</option> | |
| 70 <option value="NO_SOURCE">No source provided</option> | |
| 71 </param> | |
| 72 | |
| 73 <conditional name="vessel_type_selector"> | |
| 74 <param name="vessel_type" type="select" | |
| 75 label="type of the vessel object" | |
| 76 help="Choose from the legal types. See below."> | |
| 77 <option value="use_provided" selected="true"> | |
| 78 Use what provided by record | |
| 79 </option> | |
| 80 <option value="Tube">Tube</option> | |
| 81 <option value="PlateWell">PlateWell</option> | |
| 82 <option value="IlluminaBeadChipArray">IlluminaBeadChipArray</option> | |
| 83 </param> | |
| 84 <when value="IlluminaBeadChipArray"> | |
| 85 <param name="assay_type" type="select" label="Illumina Bead Chip Array Assay type" | |
| 86 help="Choose from the following assay types"> | |
| 87 <options from_parameter="tool.app.known_illumina_beadchip_assay_type" | |
| 88 transform_lines="[ "%s%s%s" | |
| 89 % (o[1], self.separator, o[1]) | |
| 90 for o in obj ]"> | |
| 91 <column name="value" index="0"/> | |
| 92 <column name="name" index="1"/> | |
| 93 <filter type="sort_by" column="0"/> | |
| 94 <filter type="add_value" name="Records provide assay type" | |
| 95 value="use_provided" index="0"/> | |
| 96 </options> | |
| 97 </param> | |
| 98 </when> | |
| 99 </conditional> | |
| 100 | |
| 101 <param name="vessel_content" type="select" label="Vessel content" | |
| 102 help="Choose from one of the available values. See below."> | |
| 103 <options from_parameter="tool.app.kb.VesselContent.__enums__" | |
| 104 transform_lines="[ "%s%s%s" | |
| 105 % (e.enum_label(), | |
| 106 self.separator, | |
| 107 e.enum_label()) | |
| 108 for e in obj ]"> | |
| 109 <column name="value" index="0"/> | |
| 110 <column name="name" index="1"/> | |
| 111 <filter type="sort_by" column="0"/> | |
| 112 <filter type="add_value" name="Records provide vessel content" | |
| 113 value="use_provided" index="0"/> | |
| 114 </options> | |
| 115 </param> | |
| 116 <param name="vessel_status" type="select" label="Vessel status" | |
| 117 help="Choose from one of the available values. See below."> | |
| 118 <options from_parameter="tool.app.kb.VesselStatus.__enums__" | |
| 119 transform_lines="[ "%s%s%s" | |
| 120 % (e.enum_label(), | |
| 121 self.separator, | |
| 122 e.enum_label()) | |
| 123 for e in obj ]"> | |
| 124 <column name="value" index="0"/> | |
| 125 <column name="name" index="1"/> | |
| 126 <filter type="sort_by" column="0"/> | |
| 127 <filter type="add_value" name="Records provide vessel status" | |
| 128 value="use_provided" index="0"/> | |
| 129 </options> | |
| 130 </param> | |
| 131 | |
| 132 <conditional name="extra_fields"> | |
| 133 <param name="enabled" type="select" | |
| 134 label="Enable extra optional fields"> | |
| 135 <option value="no" selected="true">no</option> | |
| 136 <option value="yes">yes</option> | |
| 137 </param> | |
| 138 <when value="no"/> | |
| 139 <when value="yes"> | |
| 140 <param name="current_volume" type="float" | |
| 141 value="20" | |
| 142 help="fluid (FIXME UNITS) currently held in the vessel"> | |
| 143 <validator type="in_range" message="Volume must be positive" | |
| 144 min="0" max="inf"/> | |
| 145 </param> | |
| 146 <param name="used_volume" type="float" | |
| 147 value="20" | |
| 148 help="amount of source fluid (FIXME UNITS) used"> | |
| 149 <validator type="in_range" message="Volume must be positive" | |
| 150 min="0" max="inf"/> | |
| 151 </param> | |
| 152 </when> | |
| 153 </conditional> | |
| 154 | |
| 155 <!-- ************************************************** --> | |
| 156 <param name="blocking_validation" type="boolean" checked="false" | |
| 157 label="Blocking validation" | |
| 158 help="When this check is enabled, if at least one record doesn't pass importer's validation, the entire import procedure will be blocked"/> | |
| 159 | |
| 160 <conditional name="wait_for_trigger"> | |
| 161 <param name="enable_trigger" type="boolean" checked="false" | |
| 162 label="Wait for another tool to end before running this tool"/> | |
| 163 <when value="true"> | |
| 164 <param format="txt" name="trigger_file" type="data" | |
| 165 label="Select the LOG file that will be used as trigger"/> | |
| 166 </when> | |
| 167 </conditional> | |
| 168 | |
| 169 <conditional name="advanced_configuration"> | |
| 170 <param name="configuration_level" type="select" | |
| 171 label="Configuration level"> | |
| 172 <option value="default" selected="true">Default configuration</option> | |
| 173 <option value="advanced">Advanced configuration</option> | |
| 174 </param> | |
| 175 <when value="default"/> | |
| 176 <when value="advanced"> | |
| 177 <param name="vl_host" size="40" type="text" value="localhost" | |
| 178 label="Omero/VL host"/> | |
| 179 <param name="vl_user" size="20" type="text" value="root" | |
| 180 label="Omero/VL user"/> | |
| 181 <param name="vl_passwd" size="20" type="text" value="What? Me_worry?" | |
| 182 label="Omero/VL passwd"/> | |
| 183 </when> | |
| 184 </conditional> | |
| 185 </inputs> | |
| 186 | |
| 187 <outputs> | |
| 188 <data format="tabular" name="output" label="${tool.name}.mapping"/> | |
| 189 <data format="tabular" name="report" label="${tool.name}.report"/> | |
| 190 <data format="txt" name="logfile" label="${tool.name}.logfile"/> | |
| 191 </outputs> | |
| 192 | |
| 193 <help> | |
| 194 A biosample record will have, at least, the following fields:: | |
| 195 | |
| 196 label source | |
| 197 I001-bs-2 V932814892 | |
| 198 I002-bs-2 V932814892 | |
| 199 I003-bs-2 None | |
| 200 | |
| 201 Where label is the label of the biosample container. If a 'None' value | |
| 202 has been passed in the source column, the biosample will be imported | |
| 203 as a new unlinked object into the biobanks. Another example, this time | |
| 204 involving DNA samples:: | |
| 205 | |
| 206 label source used_volume current_volume activation_date | |
| 207 I001-dna V932814899 0.3 0.2 17/03/2007 | |
| 208 I002-dna V932814900 0.22 0.2 21/01/2004 | |
| 209 | |
| 210 A special case is when records refer to biosamples contained in plate | |
| 211 wells. In this case, an additional column must be present with the VID | |
| 212 of the corresponding TiterPlate object. For instance:: | |
| 213 | |
| 214 plate label source | |
| 215 V39030 A01 V932814892 | |
| 216 V39031 A02 V932814893 | |
| 217 V39032 A03 V932814894 | |
| 218 | |
| 219 where the label column is now the label of the well position. | |
| 220 | |
| 221 If row and column (optional) are provided, the program will use them; | |
| 222 if they are not provided, it will infer them from label (e.g., J01 -> | |
| 223 row=10, column=1). Missing labels will be generated as:: | |
| 224 | |
| 225 '%s%03d' % (chr(row+ord('A')-1), column) | |
| 226 | |
| 227 A badly formed label will result in the rejection of the record; the | |
| 228 same will happen if label, row and column are inconsistent. The well | |
| 229 will be filled by current_volume material produced by removing | |
| 230 used_volume material taken from the bio material contained in the | |
| 231 vessel identified by source. row and column are base 1. | |
| 232 | |
| 233 If the sample is a IlluminaBeadChipArray the plate column used in the | |
| 234 PlateWell case will become a illumina_array column and a new column, named | |
| 235 bead_chip_assay_type, is required:: | |
| 236 | |
| 237 illumina_array label source bead_chip_assay_type | |
| 238 V1351235 R01C01 V412441 HUMANEXOME_12V1_B | |
| 239 V1351235 R01C02 V351151 HUMANEXOME_12V1_B | |
| 240 V1351235 R02C01 V345115 HUMANEXOME_12V1_B | |
| 241 </help> | |
| 242 | |
| 243 <stdio> | |
| 244 <exit_code range="1:" level="fatal" /> | |
| 245 </stdio> | |
| 246 | |
| 247 </tool> |
