comparison vsnp_get_snps.xml @ 10:be5875f29ea4 draft

Uploaded
author greg
date Tue, 03 Aug 2021 19:24:50 +0000
parents 0fe292b20b9d
children 544b2ed99a9a
comparison
equal deleted inserted replaced
9:0fe292b20b9d 10:be5875f29ea4
1 <tool id="vsnp_get_snps" name="vSNP: get SNPs" version="@WRAPPER_VERSION@.0+galaxy0" profile="@PROFILE@"> 1 <tool id="vsnp_get_snps" name="vSNP: get SNPs" version="@WRAPPER_VERSION@.1+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>
7 <requirement type="package" version="3.0.7">openpyxl</requirement> 7 <expand macro="openpyxl_requirement"/>
8 <requirement type="package" version="1.3.0">pandas</requirement> 8 <expand macro="pandas_requirement"/>
9 <requirement type="package" version="0.6.8">pyvcf</requirement> 9 <expand macro="pyvcf_requirement"/>
10 <requirement type="package" version="2.0.1">xlrd</requirement> 10 <expand macro="xlrd_requirement"/>
11 </requirements> 11 </requirements>
12 <command detect_errors="exit_code"><![CDATA[ 12 <command detect_errors="exit_code"><![CDATA[
13 #import re 13 #import re
14 14
15 #set input_vcf_dir = 'input_vcf_dir' 15 #set input_vcf_dir = 'input_vcf_dir'
25 #set dbkey = '?' 25 #set dbkey = '?'
26 #for $i in $input_vcf_collection: 26 #for $i in $input_vcf_collection:
27 #if str($dbkey) == '?': 27 #if str($dbkey) == '?':
28 #set dbkey = $i.metadata.dbkey 28 #set dbkey = $i.metadata.dbkey
29 #else if str($dbkey) != $i.metadata.dbkey: 29 #else if str($dbkey) != $i.metadata.dbkey:
30 >&2 echo "The dbkeys associated with the zero coverage VCF files with SNPs found in closely related isolate groups are not unique" && 30 >&2 echo "The dbkeys associated with the zero coverage VCF files with SNPs found in closely related isolate groups are not unique" && exit 1
31 exit 1
32 #end if 31 #end if
33 #set vcf_identifier = re.sub('[^\s\w\-]', '_', str($i.element_identifier)) 32 #set vcf_identifier = re.sub('[^\s\w\-]', '_', str($i.element_identifier))
34 ln -s '${i}' '$input_vcf_dir/${vcf_identifier}' && 33 ln -s '${i}' '$input_vcf_dir/${vcf_identifier}' &&
35 #end for 34 #end for
36 #if str($dbkey) == '?': 35 #if str($dbkey) == '?':
47 #end if 46 #end if
48 #if str($input_excel_cond.input_excel_param) == 'yes': 47 #if str($input_excel_cond.input_excel_param) == 'yes':
49 #if str($input_excel_cond.excel_source_cond.excel_source) == 'cached': 48 #if str($input_excel_cond.excel_source_cond.excel_source) == 'cached':
50 #set excel_file = 'No genome specified for input VCF (database) file(s)' 49 #set excel_file = 'No genome specified for input VCF (database) file(s)'
51 #set excel_fields = $__app__.tool_data_tables['vsnp_excel'].get_fields() 50 #set excel_fields = $__app__.tool_data_tables['vsnp_excel'].get_fields()
52 ## The value of excel_fields is a nested list that looks like this. 51 ## The value of excel_fields is a nested list that looks like this.
53 ## [['AF2122', 'Mbovis_define_filter.xlsx', '~/tool-data/vsnp/AF2122/excel/Mbovis_define_filter.xlsx', 'Excel file for AF2122'],...] 52 ## [['AF2122', 'Mbovis_define_filter.xlsx', '~/tool-data/vsnp/AF2122/excel/Mbovis_define_filter.xlsx', 'Excel file for AF2122'],...]
54 #for $i in $excel_fields: 53 #for $i in $excel_fields:
55 #if str($i[0]) == $dbkey: 54 #if str($i[0]) == $dbkey:
56 #set excel_file = $i[2] 55 #set excel_file = $i[2]
57 #break 56 #break
108 <option value="history">from history</option> 107 <option value="history">from history</option>
109 </param> 108 </param>
110 <when value="cached"> 109 <when value="cached">
111 <param name="input_excel" type="select" label="Excel file"> 110 <param name="input_excel" type="select" label="Excel file">
112 <options from_data_table="vsnp_excel"> 111 <options from_data_table="vsnp_excel">
113 <filter type="data_meta" column="0" key="dbkey" ref="input_vcf_collection"/>
114 <validator type="no_options" message="No built-in Excel grouping and filtering datasets are available"/> 112 <validator type="no_options" message="No built-in Excel grouping and filtering datasets are available"/>
115 </options> 113 </options>
116 </param> 114 </param>
117 </when> 115 </when>
118 <when value="history"> 116 <when value="history">
120 </when> 118 </when>
121 </conditional> 119 </conditional>
122 </when> 120 </when>
123 <when value="no"/> 121 <when value="no"/>
124 </conditional> 122 </conditional>
125 <param argument="all_isolates" type="boolean" truevalue="--all_isolates" falsevalue="" checked="false" label="Create a group containing all isolates?"/> 123 <param argument="all_isolates" type="boolean" truevalue="--all_isolates" falsevalue="" checked="true" label="Create a group containing all isolates?"/>
126 </inputs> 124 </inputs>
127 <outputs> 125 <outputs>
128 <collection name="snps" type="list" label="${tool.name} on ${on_string} (SNPs)"> 126 <collection name="snps" type="list" label="${tool.name} on ${on_string} (SNPs)">
129 <discover_datasets pattern="__name_and_ext__" directory="output_snps_dir"/> 127 <discover_datasets pattern="__name_and_ext__" directory="output_snps_dir"/>
130 </collection> 128 </collection>
152 <element name="SRR8073662_zc.vcf" value="SRR8073662_zc.vcf" dbkey="89"/> 150 <element name="SRR8073662_zc.vcf" value="SRR8073662_zc.vcf" dbkey="89"/>
153 <element name="SRR1792272_zc.vcf" value="SRR1792272_zc.vcf" dbkey="89"/> 151 <element name="SRR1792272_zc.vcf" value="SRR1792272_zc.vcf" dbkey="89"/>
154 </collection> 152 </collection>
155 </param> 153 </param>
156 <param name="input_excel_param" value="no"/> 154 <param name="input_excel_param" value="no"/>
155 <param name="all_isolates" value=""/>
157 <output_collection name="snps" type="list" count="1"> 156 <output_collection name="snps" type="list" count="1">
158 <element name="all_vcf" file="all_vcf.fasta" ftype="fasta" compare="contains"/> 157 <element name="all_vcf" file="all_vcf.fasta" ftype="fasta" compare="contains"/>
159 </output_collection> 158 </output_collection>
160 <output_collection name="json_avg_mq" type="list" count="1"> 159 <output_collection name="json_avg_mq" type="list" count="1">
161 <element name="all_vcf" file="json_avg_mq_all_vcf.json" ftype="json" compare="contains"/> 160 <element name="all_vcf" file="json_avg_mq_all_vcf.json" ftype="json" compare="contains"/>
180 <element name="02_5877_MEX_TX_Fed.vcf" value="02_5877_MEX_TX_Fed.vcf" dbkey="89"/> 179 <element name="02_5877_MEX_TX_Fed.vcf" value="02_5877_MEX_TX_Fed.vcf" dbkey="89"/>
181 <element name="02_0585_COA_TX_Fed.vcf" value="02_0585_COA_TX_Fed.vcf" dbkey="89"/> 180 <element name="02_0585_COA_TX_Fed.vcf" value="02_0585_COA_TX_Fed.vcf" dbkey="89"/>
182 </collection> 181 </collection>
183 </param> 182 </param>
184 <param name="input_excel_param" value="no"/> 183 <param name="input_excel_param" value="no"/>
184 <param name="all_isolates" value=""/>
185 <output_collection name="snps" type="list" count="1"> 185 <output_collection name="snps" type="list" count="1">
186 <element name="all_vcf" file="all_vcf2.fasta" ftype="fasta" compare="contains"/> 186 <element name="all_vcf" file="all_vcf2.fasta" ftype="fasta" compare="contains"/>
187 </output_collection> 187 </output_collection>
188 <output_collection name="json_avg_mq" type="list" count="1"> 188 <output_collection name="json_avg_mq" type="list" count="1">
189 <element name="all_vcf" file="json_avg_mq_all_vcf.json" ftype="json" compare="contains"/> 189 <element name="all_vcf" file="json_avg_mq_all_vcf.json" ftype="json" compare="contains"/>
209 <element name="02_0585_COA_TX_Fed.vcf" value="02_0585_COA_TX_Fed.vcf" dbkey="89"/> 209 <element name="02_0585_COA_TX_Fed.vcf" value="02_0585_COA_TX_Fed.vcf" dbkey="89"/>
210 </collection> 210 </collection>
211 </param> 211 </param>
212 <param name="input_excel_param" value="yes"/> 212 <param name="input_excel_param" value="yes"/>
213 <param name="input_excel" value="89"/> 213 <param name="input_excel" value="89"/>
214 <param name="all_isolates" value=""/>
214 <output_collection name="snps" type="list" count="1"> 215 <output_collection name="snps" type="list" count="1">
215 <element name="Mbovis-17" file="Mbovis-17_snps.fasta" ftype="fasta" compare="contains"/> 216 <element name="Mbovis-17" file="Mbovis-17_snps.fasta" ftype="fasta" compare="contains"/>
216 </output_collection> 217 </output_collection>
217 <output_collection name="json_avg_mq" type="list" count="1"> 218 <output_collection name="json_avg_mq" type="list" count="1">
218 <element name="Mbovis-17" file="Mbovis-17_avg_mq_json.json" ftype="json" compare="contains"/> 219 <element name="Mbovis-17" file="Mbovis-17_avg_mq_json.json" ftype="json" compare="contains"/>