Mercurial > repos > iuc > packaged_annotation_loader
view load_annotations.xml @ 0:0de428c589f3 draft default tip
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/packaged_annotation_loader commit 339a6c16fb6d944d4e147b5192cbeb0ebd26d18e"
author | iuc |
---|---|
date | Tue, 04 Jan 2022 18:34:48 +0000 |
parents | |
children |
line wrap: on
line source
<tool id="packaged_annotation_loader" name="Load packaged annotation data" version="0.1" profile="20.05"> <description>as a collection</description> <requirements> <requirement type="package" version="3.9">python</requirement> <requirement type="package" version="6.0">pyyaml</requirement> </requirements> <command detect_errors="exit_code"><![CDATA[ cp $c1 galaxy.json #if str($retrieve_meta): && python '$__tool_directory__/retrieve_meta.py' --format $retrieve_meta -o meta.out galaxy.json #end if ]]> </command> <configfiles> <configfile name="c1"> #set $elems=",".join(['{{"name": "%s", "ext": "%s", "filename": "{0}/%s", "dbkey": "{1}"}}' % (i, f, i) for i, f in zip($annotation, $annotation.fields.format.split(','))]) #set $elems=$elems.format($packaged_data.fields.path, $packaged_data.fields.dbkey) {"list_output": {"elements": [$elems]}} </configfile> </configfiles> <inputs> <param name="packaged_data" type="select" label="Annotation data package to load"> <options from_data_table="packaged_annotation_data"> <column name="name" index="6" /> <column name="value" index="5" /> <column name="path" index="7" /> <column name="dbkey" index="1" /> <filter type="unique_value" column="value" /> <filter type="sort_by" column="name" /> <validator type="no_options" message="No annotation paackage available" /> </options> </param> <param name="annotation" type="select" multiple="true" optional="false" label="Packaged annotations to load into collection"> <options from_data_table="packaged_annotation_data"> <column name="name" index="2" /> <column name="value" index="3" /> <column name="format" index="4" /> <column name="package_id" index="5" /> <filter type="param_value" ref="packaged_data" column="package_id" /> <validator type="no_options" message="No annotation data available" /> </options> </param> <param name="retrieve_meta" type="select" label="Retrieve annotation sources metadata as separate dataset?"> <option value="">No metadata</option> <option value="yaml">Return the metadata in orignal yaml format</option> <option value="tab">Return tabular annotation source/version info</option> </param> </inputs> <outputs> <collection name="list_output" type="list" label="Output List"> <discover_datasets from_provided_metadata="true" visible="false" /> </collection> <data name="meta_out" format="tabular" label="Loaded annotations metadata" from_work_dir="meta.out"> <filter>bool(str(retrieve_meta))</filter> <change_format> <when input="retrieve_meta" value="yaml" format="yaml" /> </change_format> </data> </outputs> <tests> <test expect_num_outputs="1"> <param name="packaged_data" value="Cancer_variant_data__hg19__1__2021-12-16" /> <param name="annotation" value="hotspots.data.test" /> <output_collection name="list_output" type="list" count="1"> <element name="hotspots.data.test" ftype="bed" file="test-annotation-data/hotspots.data.test"> <metadata name="dbkey" value="hg19" /> </element> </output_collection> </test> <test expect_num_outputs="1"> <param name="packaged_data" value="Cancer_variant_data__hg19__1__2021-12-16" /> <param name="annotation" value="hotspots.data.test,civic.variants.test" /> <output_collection name="list_output" type="list" count="2"> <element name="hotspots.data.test" ftype="bed" file="test-annotation-data/hotspots.data.test"> <metadata name="dbkey" value="hg19" /> </element> <element name="civic.variants.test" ftype="bed" file="test-annotation-data/civic.variants.test"> <metadata name="dbkey" value="hg19" /> </element> </output_collection> </test> <test expect_num_outputs="2"> <param name="packaged_data" value="Cancer_variant_data__hg19__1__2021-12-16" /> <param name="annotation" value="hotspots.data.test,civic.variants.test" /> <param name="retrieve_meta" value="yaml" /> <output_collection name="list_output" type="list" count="2"> <element name="hotspots.data.test" ftype="bed" file="test-annotation-data/hotspots.data.test"> <metadata name="dbkey" value="hg19" /> </element> <element name="civic.variants.test" ftype="bed" file="test-annotation-data/civic.variants.test"> <metadata name="dbkey" value="hg19" /> </element> </output_collection> <output name="meta_out" ftype="yaml" file="test-annotation-data/meta.yml" /> </test> <test expect_num_outputs="2"> <param name="packaged_data" value="Cancer_variant_data__hg19__1__2021-12-16" /> <param name="annotation" value="hotspots.data.test,civic.variants.test" /> <param name="retrieve_meta" value="tab" /> <output_collection name="list_output" type="list" count="2"> <element name="hotspots.data.test" ftype="bed" file="test-annotation-data/hotspots.data.test"> <metadata name="dbkey" value="hg19" /> </element> <element name="civic.variants.test" ftype="bed" file="test-annotation-data/civic.variants.test"> <metadata name="dbkey" value="hg19" /> </element> </output_collection> <output name="meta_out" ftype="tabular" file="anno-version.tsv"/> </test> <test expect_num_outputs="2"> <param name="packaged_data" value="Cancer_variant_data__hg19__1__2021-12-16" /> <param name="annotation" value="civic.variants.test" /> <param name="retrieve_meta" value="tab" /> <output_collection name="list_output" type="list" count="1"> <element name="civic.variants.test" ftype="bed" file="test-annotation-data/civic.variants.test"> <metadata name="dbkey" value="hg19" /> </element> </output_collection> <output name="meta_out" ftype="tabular"> <assert_contents> <has_n_lines n="2" /> <has_line line="Annotation	Version" /> <has_line line="CIViC variants	01-Feb-2019" /> </assert_contents> </output> </test> </tests> <help><![CDATA[ This tool can be used to make genome annotation data installed via the `data manager for packaged_annotation data <https://toolshed.g2.bx.psu.edu/view/wolma/data_manager_packaged_annotation_data>`__ accessible as a list of datasets collection. ]]></help> </tool>