Mercurial > repos > earlhaminst > ensembl_get_genetree
view get_genetree.xml @ 7:515e7181d5e9 draft default tip
planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/Ensembl-REST commit dd31db8a912937667a46f5c7c1aafd389edf596b
author | earlhaminst |
---|---|
date | Mon, 05 Dec 2022 16:29:26 +0000 |
parents | 0618e3bd5138 |
children |
line wrap: on
line source
<tool id="get_genetree" name="Get gene tree by Ensembl ID" version="0.1.2"> <description>using REST API</description> <macros> <xml name="sequence_conditional"> <conditional name="sequence"> <param name="sequence_selector" type="select" label="Sequence type" help="The type of sequences to bring back. If 'None', no sequence is returned"> <option value="protein" selected="true">Protein</option> <option value="cdna">cDNA</option> <option value="none">None</option> </param> <when value="protein"> <param name="aligned" type="boolean" truevalue="1" falsevalue="0" label="Return the aligned sequences instead of the original ones" help="The original sequences contain no insertions" /> <yield /> </when> <when value="cdna"> <param name="aligned" type="boolean" truevalue="1" falsevalue="0" label="Return the aligned sequences instead of the original ones" help="The original sequences contain no insertions" /> <yield /> </when> <when value="none" /> </conditional> </xml> </macros> <requirements> <requirement type="package" version="2.12.4">requests</requirement> <requirement type="package" version="1.10.0">six</requirement> </requirements> <command detect_errors="exit_code"> <![CDATA[ python '$__tool_directory__/get_genetree.py' --id_type $input_type -i '$input' --format ${output_format.output_format_selector} #if $output_format.output_format_selector == 'json' -s ${output_format.sequence.sequence_selector} #if $output_format.sequence.sequence_selector != 'none' -a ${output_format.sequence.aligned} -c ${output_format.sequence.cigar} #end if #elif $output_format.output_format_selector == 'phyloxml' -s ${output_format.sequence.sequence_selector} #if $output_format.sequence.sequence_selector != 'none' -a ${output_format.sequence.aligned} #end if #else --nh_format $output_format.nh_format #end if > '$output' ]]> </command> <inputs> <param name="input_type" type="select" label="Input type"> <option value="gene_id" selected="true">Ensembl gene ID</option> <option value="gene_tree_id">Ensembl genetree ID</option> </param> <param name="input" type="text" label="Ensembl ID"> <validator type="empty_field" /> </param> <conditional name="output_format"> <param name="output_format_selector" type="select" label="Output format"> <option value="json" selected="true">JSON</option> <!-- <option value="orthoxml">OrthoXML</option> --> <option value="phyloxml">phyloXML</option> <option value="nh">Newick</option> </param> <when value="json"> <expand macro="sequence_conditional"> <param name="cigar" type="boolean" truevalue="1" falsevalue="0" label="Output the sequences also in CIGAR format" /> </expand> </when> <when value="phyloxml"> <expand macro="sequence_conditional" /> </when> <when value="nh"> <param name="nh_format" type="select" label="NH format" help="The format of a NH (New Hampshire) request"> <option value="simple" selected="true">simple</option> <option value="full">full</option> <option value="display_label_composite">display_label_composite</option> <option value="species">species</option> <option value="species_short_name">species_short_name</option> <option value="ncbi_taxon">ncbi_taxon</option> <option value="ncbi_name">ncbi_name</option> <option value="njtree">njtree</option> <option value="phylip">phylip</option> </param> </when> </conditional> </inputs> <outputs> <data name="output" format="json" label="$(tool.name) on ${input_type} ${input}"> <change_format> <when input="output_format.output_format_selector" value="phyloxml" format="phyloxml" /> <when input="output_format.output_format_selector" value="nh" format="nhx" /> </change_format> </data> </outputs> <tests> <test> <param name="input_type" value="gene_id" /> <param name="input" value="ENSGALP00010009242" /> <param name="output_format_selector" value="json" /> <param name="sequence_selector" value="protein" /> <param name="aligned" value="0" /> <param name="cigar" value="0" /> <output name="output" ftype="json"> <assert_contents> <has_text text="tree" /> <has_text text="Euteleostomi" /> <has_text text="ENSG00000139618" /> <has_text text="ENSMUSG00000041147" /> </assert_contents> </output> </test> <test> <param name="input_type" value="gene_id" /> <param name="input" value="ENSGALP00010009242" /> <param name="output_format_selector" value="nh" /> <param name="nh_format" value="simple" /> <output name="output" ftype="nhx"> <assert_contents> <has_text text="ENSGALP00010009242" /> <has_text text="ENSP00000369497" /> </assert_contents> </output> </test> <test> <param name="input_type" value="gene_tree_id" /> <param name="input" value="ENSGT00390000003602" /> <param name="output_format_selector" value="json" /> <param name="sequence_selector" value="protein" /> <param name="aligned" value="0" /> <param name="cigar" value="0" /> <output name="output" ftype="json"> <assert_contents> <has_text text="tree" /> <has_text text="Euteleostomi" /> <has_text text="ENSG00000139618" /> <has_text text="ENSMUSG00000041147" /> </assert_contents> </output> </test> <test> <param name="input_type" value="gene_tree_id" /> <param name="input" value="ENSGT00390000003602" /> <param name="output_format_selector" value="phyloxml" /> <param name="sequence_selector" value="protein" /> <param name="aligned" value="0" /> <output name="output" ftype="phyloxml"> <assert_contents> <has_text text="Euteleostomi" /> <has_text text="ENSG00000139618" /> <has_text text="ENSMUSG00000041147" /> <has_text text="</phyloxml>" /> </assert_contents> </output> </test> </tests> <help> <![CDATA[ **What it does** Retrieve a gene tree from Ensembl using its REST API. Uses the `"GET genetree/id"`_ and `"GET genetree/member/id"`_ API endpoint. .. _"GET genetree/id": https://rest.ensembl.org/documentation/info/genetree .. _"GET genetree/member/id": https://rest.ensembl.org/documentation/info/genetree_member_id ]]> </help> <citations> </citations> </tool>