Mercurial > repos > ric > test2
view galaxy-tools/biobank/tools/query.xml @ 0:ba6cf6ede027 draft default tip
Uploaded
| author | ric |
|---|---|
| date | Wed, 28 Sep 2016 06:03:30 -0400 |
| parents | |
| children |
line wrap: on
line source
<tool id="vl_tools_query" name="VLT.query"> <description> Provides a simplified environment to perform complex queries to BIOBANK. </description> <command interpreter="bash"> launcher.sh --interpreter=python --runner=kb_query.py --host=$__user_omero_host__ --user=$__user_omero_user__ --passwd=$__user_omero_password__ --operator=$__user_email__ --ofile=${output1} --logfile=${logfile} query --group=$study --code-file=$code_file </command> <inputs> <param name="study" type="select" label="study label" help="Choose one of the available groups/studies. See below."> <options from_parameter="tool.app.known_studies" transform_lines="[ "%s%s%s:%s" % ( l[0], self.separator, l[0], l[1][:40] ) for l in obj ]"> <column name="value" index="0"/> <column name="name" index="1"/> <filter type="sort_by" column="0"/> </options> </param> <param name="query_code" type="text" area="True" size="10x60" optional="False" value="" /> <!-- ************************************************** --> </inputs> <configfiles> <configfile name="code_file">${str($query_code).replace('__sq__', "'").replace('__cr____cn__', '\n')}</configfile> </configfiles> <outputs> <data format="tabular" name="output1" label="${tool.name}.mapped"/> <data format="txt" name="logfile" label="${tool.name}.logfile"/> </outputs> <help> The following is an example of a query that will dump family relations within the group:: writeheader('study', 'id', 'gender', 'father', 'mother') for i in Individuals(group): writerow(group.id, enum_label(i.gender), i.father.id if i.father else 'None', i.mother.id if i.mother else 'None') The next example will prepare a file that could be used to define a data collection and then as the input for a genotyping run:: writeheader('dc_id', 'gender', 'data_sample', 'path', 'mimetype', 'size', 'sha1') for i in Individuals(group): for d in DataSamples(i, 'AffymetrixCel'): for o in DataObjects(d): writerow(group.id, enum_label(i.gender), d.id, o.path, o.mimetype, o.size, o.sha1) In the examples above, '''group''' (actually a study) corresponds to the group whose label is assigned by the '''--group''' flag. **Note** This is clearly an extremely dangerous tool. </help> </tool>
