comparison vsnp_build_tables.xml @ 9:f641e52353e8 draft

"planemo upload for repository https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/sequence_analysis/vsnp/vsnp_build_tables commit 1131a7accc36df73eac621f6ae8aa3cb62403bde"
author greg
date Thu, 29 Jul 2021 13:52:48 +0000
parents a5b1e7dcc971
children 14384fd2a7e2
comparison
equal deleted inserted replaced
8:c3a6795aed09 9:f641e52353e8
1 <tool id="vsnp_build_tables" name="vSNP: build tables" version="@WRAPPER_VERSION@.2+galaxy0" profile="@PROFILE@"> 1 <tool id="vsnp_build_tables" name="vSNP: build tables" version="@WRAPPER_VERSION@.3+galaxy0" profile="@PROFILE@">
2 <description></description> 2 <description></description>
3 <macros> 3 <macros>
4 <import>macros.xml</import> 4 <import>macros.xml</import>
5 </macros> 5 </macros>
6 <requirements> 6 <requirements>
8 <requirement type="package" version="0.25.3">pandas</requirement> 8 <requirement type="package" version="0.25.3">pandas</requirement>
9 <requirement type="package" version="1.4.4">xlsxwriter</requirement> 9 <requirement type="package" version="1.4.4">xlsxwriter</requirement>
10 </requirements> 10 </requirements>
11 <command detect_errors="exit_code"><![CDATA[ 11 <command detect_errors="exit_code"><![CDATA[
12 #import re 12 #import re
13 13 #set output_excel_dir = 'output_excel_dir'
14 mkdir 'output_excel_dir' && 14 #set input_type = $input_type_cond.input_type
15 15 mkdir $output_excel_dir &&
16 ## The input_snps_json and input_avg_mq_json identifiers 16 #if $input_type == "collection":
17 ## are typically the same string, so we append a uniquq 17 #set input_newick_dir = 'input_newick_dir'
18 ## extension to enable the links. 18 mkdir $input_newick_dir &&
19 #set input_snps_json_identifier = re.sub('[^\s\w\-]', '_', str($input_snps_json.element_identifier)) + '.snps' 19 #set input_json_avg_mq_dir = 'input_json_avg_mq_dir'
20 ln -s '${input_snps_json}' '${input_snps_json_identifier}' && 20 mkdir $input_json_avg_mq_dir &&
21 #set input_avg_mq_json_identifier = re.sub('[^\s\w\-]', '_', str($input_avg_mq_json.element_identifier)) + '.avg_mq' 21 #set input_json_dir = 'input_json_dir'
22 ln -s '${input_avg_mq_json}' '${input_avg_mq_json_identifier}' && 22 mkdir $input_json_dir &&
23 #set input_newick_identifier = re.sub('[^\s\w\-]', '_', str($input_newick.element_identifier)) 23 #for $i in $input_type_cond.input_avg_mq_json_collection:
24 ln -s '${input_newick}' '${input_newick_identifier}' && 24 #set file_name = $i.file_name
25 25 #set identifier = re.sub('[^\s\w\-]', '_', str($i.element_identifier))
26 ln -s '$file_name' '$input_json_avg_mq_dir/$identifier' &&
27 #end for
28 #for $i in $input_type_cond.input_snps_json_collection:
29 #set file_name = $i.file_name
30 #set identifier = re.sub('[^\s\w\-]', '_', str($i.element_identifier))
31 ln -s '$file_name' '$input_json_dir/$identifier' &&
32 #end for
33 #for $i in $input_type_cond.input_newick_collection:
34 #set file_name = $i.file_name
35 #set identifier = re.sub('[^\s\w\-]', '_', str($i.element_identifier))
36 ln -s '$file_name' '$input_newick_dir/$identifier' &&
37 #end for
38 #end if
26 python '$__tool_directory__/vsnp_build_tables.py' 39 python '$__tool_directory__/vsnp_build_tables.py'
27 --input_snps_json '${input_snps_json_identifier}' 40 #if $input_type == "single":
28 --input_avg_mq_json '${input_avg_mq_json_identifier}' 41 --input_avg_mq_json '$input_avg_mq_json'
29 --input_newick '${input_newick_identifier}' 42 --input_snps_json '$input_snps_json'
30 #if str($gbk_cond.gbk_param) == 'yes': 43 --input_newick '$input_newick'
31 #if str($gbk_cond.gbk_source_cond.gbk_source) == 'cached': 44 #end if:
32 --gbk_file '$gbk_cond.gbk_source_cond.gbk_file.fields.path' 45 #if str($gbk_cond.gbk_param) == "yes":
46 #set gbk_source_cond = $gbk_cond.gbk_source_cond
47 #set gbk_source = $gbk_source_cond.gbk_source
48 #if str($gbk_source) == "cached":
49 --gbk_file '$gbk_source_cond.gbk_file.fields.path'
33 #else: 50 #else:
34 --gbk_file '$gbk_cond.gbk_source_cond.gbk_file' 51 --gbk_file '$gbk_source_cond.gbk_file'
35 #end if 52 #end if
36 #end if 53 #end if
54 --processes \${GALAXY_SLOTS:-8}
37 ]]></command> 55 ]]></command>
38 <inputs> 56 <inputs>
39 <param name="input_snps_json" type="data" format="json" label="SNPs json file"/> 57 <conditional name="input_type_cond">
40 <param name="input_avg_mq_json" type="data" format="json" label="Average MQ json file"/> 58 <param name="input_type" type="select" label="Choose the category for the files to be analyzed">
41 <param name="input_newick" type="data" format="newick" label="Best-scoring ML tree file"/> 59 <option value="single" selected="true">Single files</option>
60 <option value="collection">Collection of files</option>
61 </param>
62 <when value="single">
63 <param name="input_snps_json" type="data" format="json" label="SNPs json file"/>
64 <param name="input_avg_mq_json" type="data" format="json" label="Average MQ json file"/>
65 <param name="input_newick" type="data" format="newick" label="Best-scoring ML tree file"/>
66 </when>
67 <when value="collection">
68 <param name="input_snps_json_collection" format="json" type="data_collection" collection_type="list" label="Collection of SNPs json files"/>
69 <param name="input_avg_mq_json_collection" format="json" type="data_collection" collection_type="list" label="Collection of average MQ json files"/>
70 <param name="input_newick_collection" format="newick" type="data_collection" collection_type="list" label="Collection of best-scoring ML tree files"/>
71 </when>
72 </conditional>
42 <conditional name="gbk_cond"> 73 <conditional name="gbk_cond">
43 <param name="gbk_param" type="select" label="Use Genbank file?"> 74 <param name="gbk_param" type="select" label="Use Genbank file?">
44 <option value="yes" selected="true">yes</option> 75 <option value="yes" selected="true">yes</option>
45 <option value="no">No</option> 76 <option value="no">No</option>
46 </param> 77 </param>
51 <option value="history">from history</option> 82 <option value="history">from history</option>
52 </param> 83 </param>
53 <when value="cached"> 84 <when value="cached">
54 <param name="gbk_file" type="select" label="Genbank file"> 85 <param name="gbk_file" type="select" label="Genbank file">
55 <options from_data_table="vsnp_genbank"> 86 <options from_data_table="vsnp_genbank">
56 <filter type="data_meta" column="0" key="dbkey" ref="input_avg_mq_json"/>
57 <validator type="no_options" message="A cached Genbank file is not available for the build associated with the selected average MQ json file"/> 87 <validator type="no_options" message="A cached Genbank file is not available for the build associated with the selected average MQ json file"/>
58 </options> 88 </options>
59 </param> 89 </param>
60 </when> 90 </when>
61 <when value="history"> 91 <when value="history">
78 <param name="input_snps_json" value="input_snps_json.json" ftype="json" dbkey="89"/> 108 <param name="input_snps_json" value="input_snps_json.json" ftype="json" dbkey="89"/>
79 <param name="input_newick" value="input_newick.newick" ftype="newick" dbkey="89"/> 109 <param name="input_newick" value="input_newick.newick" ftype="newick" dbkey="89"/>
80 <param name="input_avg_mq_json" value="input_avg_mq_json.json" ftype="json" dbkey="89"/> 110 <param name="input_avg_mq_json" value="input_avg_mq_json.json" ftype="json" dbkey="89"/>
81 <param name="gbk_param" value="no"/> 111 <param name="gbk_param" value="no"/>
82 <output_collection name="excel" type="list" count="2"> 112 <output_collection name="excel" type="list" count="2">
83 <element name="input_newick_newick_cascade_table" file="cascade_table.xlsx" ftype="xlsx" compare="sim_size"/> 113 <element name="cascade_table" file="cascade_table.xlsx" ftype="xlsx" compare="sim_size"/>
84 <element name="input_newick_newick_sort_table" file="sort_table.xlsx" ftype="xlsx" compare="sim_size"/> 114 <element name="sort_table" file="sort_table.xlsx" ftype="xlsx" compare="sim_size"/>
85 </output_collection> 115 </output_collection>
86 </test> 116 </test>
87 <test> 117 <test>
88 <param name="input_snps_json" value="Mbovis-01_snps.json" ftype="json" dbkey="89"/> 118 <param name="input_type" value="collection"/>
89 <param name="input_newick" value="Mbovis-01_snps.newick" ftype="newick" dbkey="89"/> 119 <param name="input_snps_json_collection">
90 <param name="input_avg_mq_json" value="Mbovis-01_avg_mq.json" ftype="json" dbkey="89"/> 120 <collection type="list">
121 <element name="Mbovis-01_snps.json" value="Mbovis-01_snps.json" dbkey="89"/>
122 <element name="Mbovis-01D_snps.json" value="Mbovis-01D_snps.json" dbkey="89"/>
123 <element name="Mbovis-01D6_snps.json" value="Mbovis-01D6_snps.json" dbkey="89"/>
124 </collection>
125 </param>
126 <param name="input_newick_collection">
127 <collection type="list">
128 <element name="Mbovis-01_snps.newick" value="Mbovis-01_snps.newick" dbkey="89"/>
129 <element name="Mbovis-01D_snps.newick" value="Mbovis-01D_snps.newick" dbkey="89"/>
130 <element name="Mbovis-01D6_snps.newick" value="Mbovis-01D6_snps.newick" dbkey="89"/>
131 </collection>
132 </param>
133 <param name="input_avg_mq_json_collection">
134 <collection type="list">
135 <element name="Mbovis-01_snps.json" value="Mbovis-01_avg_mq.json" dbkey="89"/>
136 <element name="Mbovis-01D_snps.json" value="Mbovis-01D_avg_mq.json" dbkey="89"/>
137 <element name="Mbovis-01D6_snps.json" value="Mbovis-01D6_avg_mq.json" dbkey="89"/>
138 </collection>
139 </param>
91 <param name="gbk_param" value="no"/> 140 <param name="gbk_param" value="no"/>
92 <output_collection name="excel" type="list" count="2"> 141 <output_collection name="excel" type="list" count="6">
142 <element name="Mbovis-01D6_snps_newick_cascade_table" file="Mbovis-01D6_cascade_table.xlsx" ftype="xlsx" compare="sim_size"/>
143 <element name="Mbovis-01D6_snps_newick_sort_table" file="Mbovis-01D6_sort_table.xlsx" ftype="xlsx" compare="sim_size"/>
144 <element name="Mbovis-01D_snps_newick_cascade_table" file="Mbovis-01D_cascade_table.xlsx" ftype="xlsx" compare="sim_size"/>
145 <element name="Mbovis-01D_snps_newick_sort_table" file="Mbovis-01D_sort_table.xlsx" ftype="xlsx" compare="sim_size"/>
93 <element name="Mbovis-01_snps_newick_cascade_table" file="Mbovis-01_cascade_table.xlsx" ftype="xlsx" compare="sim_size"/> 146 <element name="Mbovis-01_snps_newick_cascade_table" file="Mbovis-01_cascade_table.xlsx" ftype="xlsx" compare="sim_size"/>
94 <element name="Mbovis-01_snps_newick_sort_table" file="Mbovis-01_sort_table.xlsx" ftype="xlsx" compare="sim_size"/> 147 <element name="Mbovis-01_snps_newick_sort_table" file="Mbovis-01_sort_table.xlsx" ftype="xlsx" compare="sim_size"/>
95 </output_collection>
96 </test>
97 <test>
98 <param name="input_snps_json" value="Mbovis-01D_snps.json" ftype="json" dbkey="89"/>
99 <param name="input_newick" value="Mbovis-01D_snps.newick" ftype="newick" dbkey="89"/>
100 <param name="input_avg_mq_json" value="Mbovis-01D_avg_mq.json" ftype="json" dbkey="89"/>
101 <param name="gbk_param" value="no"/>
102 <output_collection name="excel" type="list" count="2">
103 <element name="Mbovis-01D_snps_newick_cascade_table" file="Mbovis-01D_cascade_table.xlsx" ftype="xlsx" compare="sim_size"/>
104 <element name="Mbovis-01D_snps_newick_sort_table" file="Mbovis-01D_sort_table.xlsx" ftype="xlsx" compare="sim_size"/>
105 </output_collection>
106 </test>
107 <test>
108 <param name="input_snps_json" value="Mbovis-01D6_snps.json" ftype="json" dbkey="89"/>
109 <param name="input_newick" value="Mbovis-01D6_snps.newick" ftype="newick" dbkey="89"/>
110 <param name="input_avg_mq_json" value="Mbovis-01D6_avg_mq.json" ftype="json" dbkey="89"/>
111 <param name="gbk_param" value="no"/>
112 <output_collection name="excel" type="list" count="2">
113 <element name="Mbovis-01D6_snps_newick_cascade_table" file="Mbovis-01D6_cascade_table.xlsx" ftype="xlsx" compare="sim_size"/>
114 <element name="Mbovis-01D6_snps_newick_sort_table" file="Mbovis-01D6_sort_table.xlsx" ftype="xlsx" compare="sim_size"/>
115 </output_collection> 148 </output_collection>
116 </test> 149 </test>
117 </tests> 150 </tests>
118 <help> 151 <help>
119 **What it does** 152 **What it does**
144 177
145 .. _vSNP documentation: https://github.com/USDA-VS/vSNP/blob/master/docs/detailed_usage.md 178 .. _vSNP documentation: https://github.com/USDA-VS/vSNP/blob/master/docs/detailed_usage.md
146 179
147 **Required Options** 180 **Required Options**
148 181
182 * **Choose the category for the files to be analyzed** - select "Single files" or "Collections of files", then select the appropriate history items (single SNPs json, average MQ json and newick files, or collections of each) based on the selected option.
149 * **Use Genbank file** - Select "yes" to annotate the tables using the information in the Genbank file. Locally cached files, if available, provide the most widely used annotations, but more custom Genbank files can be chosen from the current history. 183 * **Use Genbank file** - Select "yes" to annotate the tables using the information in the Genbank file. Locally cached files, if available, provide the most widely used annotations, but more custom Genbank files can be chosen from the current history.
150 </help> 184 </help>
151 <expand macro="citations"/> 185 <expand macro="citations"/>
152 </tool> 186 </tool>
153 187