comparison get_genetree/get_genetree.xml @ 0:f0018341e9f6 draft

planemo upload for repository https://github.com/TGAC/earlham-galaxytools/tree/master/tools/Ensembl-REST commit e80af91bced56efdb4fbf62ac03232655a22f25d-dirty
author earlhaminst
date Thu, 11 Aug 2016 14:29:07 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0018341e9f6
1 <tool id="get_genetree" name="Get gene tree by Ensembl ID" version="0.1.1">
2 <description>using REST API</description>
3 <macros>
4 <xml name="sequence_conditional">
5 <conditional name="sequence">
6 <param name="sequence_selector" type="select" label="Sequence type" help="The type of sequences to bring back. If 'None', no sequence is returned">
7 <option value="protein" selected="true">Protein</option>
8 <option value="cdna">cDNA</option>
9 <option value="none">None</option>
10 </param>
11 <when value="protein">
12 <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" />
13 <yield />
14 </when>
15 <when value="cdna">
16 <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" />
17 <yield />
18 </when>
19 <when value="none" />
20 </conditional>
21 </xml>
22 </macros>
23 <requirements>
24 <requirement type="package" version="2.7">requests</requirement>
25 </requirements>
26 <command>
27 <![CDATA[
28 python $__tool_directory__/get_genetree.py
29 --id_type $input_type
30 -i "$input"
31 -g $species_selector
32 --format ${output_format.output_format_selector}
33 #if $output_format.output_format_selector == 'json'
34 -s ${output_format.sequence.sequence_selector}
35 #if $output_format.sequence.sequence_selector != 'none'
36 -a ${output_format.sequence.aligned}
37 -c ${output_format.sequence.cigar}
38 #end if
39 #elif $output_format.output_format_selector == 'phyloxml'
40 -s ${output_format.sequence.sequence_selector}
41 #if $output_format.sequence.sequence_selector != 'none'
42 -a ${output_format.sequence.aligned}
43 #end if
44 #else
45 --nh_format $output_format.nh_format
46 #end if
47 > "$output"
48 ]]>
49 </command>
50
51 <inputs>
52 <param name="input_type" type="select" label="Input type">
53 <option value="gene_id" selected="true">Ensembl gene ID</option>
54 <option value="gene_tree_id">Ensembl genetree ID</option>
55 </param>
56 <param name="input" type="text" label="Ensembl ID">
57 <validator type="empty_field" />
58 </param>
59 <param name="species_selector" type="select" label="Select Species">
60 <option value="ensembl" selected="true">Vertebrates</option>
61 <option value="ensemblgenomes">Other species</option>
62 </param>
63 <conditional name="output_format">
64 <param name="output_format_selector" type="select" label="Output format">
65 <option value="json" selected="true">JSON</option>
66 <!-- <option value="orthoxml">OrthoXML</option> -->
67 <option value="phyloxml">phyloXML</option>
68 <option value="nh">Newick</option>
69 </param>
70 <when value="json">
71 <expand macro="sequence_conditional">
72 <param name="cigar" type="boolean" truevalue="1" falsevalue="0" label="Output the sequences also in CIGAR format" />
73 </expand>
74 </when>
75 <when value="phyloxml">
76 <expand macro="sequence_conditional" />
77 </when>
78 <when value="nh">
79 <param name="nh_format" type="select" label="NH format" help="The format of a NH (New Hampshire) request">
80 <option value="simple" selected="true">simple</option>
81 <option value="full">full</option>
82 <option value="display_label_composite">display_label_composite</option>
83 <option value="species">species</option>
84 <option value="species_short_name">species_short_name</option>
85 <option value="ncbi_taxon">ncbi_taxon</option>
86 <option value="ncbi_name">ncbi_name</option>
87 <option value="njtree">njtree</option>
88 <option value="phylip">phylip</option>
89 </param>
90 </when>
91 </conditional>
92 </inputs>
93
94 <outputs>
95 <data name="output" format="json" label="$(tool.name) on ${input_type} ${input}">
96 <change_format>
97 <when input="output_format.output_format_selector" value="phyloxml" format="phyloxml" />
98 <when input="output_format.output_format_selector" value="nh" format="nhx" />
99 </change_format>
100 </data>
101 </outputs>
102
103 <tests>
104 <test>
105 <param name="input_type" value="gene_id" />
106 <param name="input" value="ENSGALP00000027524" />
107 <param name="output_format_selector" value="json" />
108 <param name="sequence_selector" value="protein" />
109 <param name="aligned" value="0" />
110 <param name="cigar" value="0" />
111 <output name="output" file="genetree.json" ftype="json" />
112 </test>
113 <test>
114 <param name="input_type" value="gene_tree_id" />
115 <param name="input" value="ENSGT00390000003602" />
116 <param name="output_format_selector" value="json" />
117 <param name="sequence_selector" value="protein" />
118 <param name="aligned" value="0" />
119 <param name="cigar" value="0" />
120 <output name="output" file="genetree.json" fype="json" />
121 </test>
122 <test>
123 <param name="input_type" value="gene_tree_id" />
124 <param name="input" value="ENSGT00390000003602" />
125 <param name="output_format_selector" value="phyloxml" />
126 <param name="sequence_selector" value="protein" />
127 <param name="aligned" value="0" />
128 <output name="output" file="genetree.phyloxml" ftype="phyloxml" compare="sim_size" />
129 </test>
130 </tests>
131
132 <help>
133 <![CDATA[
134 **What it does**
135
136 Retrieve a gene tree from Ensembl using its REST API.
137
138 Uses the `"GET genetree/id"`_ and `"GET genetree/member/id"`_ API endpoint.
139
140 .. _"GET genetree/id": http://rest.ensembl.org/documentation/info/genetree
141 .. _"GET genetree/member/id": http://rest.ensembl.org/documentation/info/genetree_member_id
142 ]]>
143 </help>
144 <citations>
145 </citations>
146 </tool>