comparison vsnp_determine_ref_from_data.xml @ 1:bca267738b33 draft

Uploaded
author greg
date Thu, 19 Nov 2020 21:25:31 +0000
parents ebc08e5ce646
children ee6166a3edd8
comparison
equal deleted inserted replaced
0:ebc08e5ce646 1:bca267738b33
5 <requirement type="package" version="5.3">pyyaml</requirement> 5 <requirement type="package" version="5.3">pyyaml</requirement>
6 </requirements> 6 </requirements>
7 <command detect_errors="exit_code"><![CDATA[ 7 <command detect_errors="exit_code"><![CDATA[
8 #import os 8 #import os
9 #import re 9 #import re
10 #set $dnaprint_fields = $__app__.tool_data_tables['vsnp_dnaprints'].get_fields()
11 #set gzipped = 'false' 10 #set gzipped = 'false'
12 #set input_type = $input_type_cond.input_type 11 #set input_type = $input_type_cond.input_type
13 #set input_reads_dir = 'input_reads' 12 #set input_reads_dir = 'input_reads'
14 #set output_dbkey_dir = 'output_dbkey' 13 #set output_dbkey_dir = 'output_dbkey'
15 #set output_metrics_dir = 'output_metrics' 14 #set output_metrics_dir = 'output_metrics'
33 #if $read1.is_of_type('fastqsanger.gz') and $read2.is_of_type('fastqsanger.gz'): 32 #if $read1.is_of_type('fastqsanger.gz') and $read2.is_of_type('fastqsanger.gz'):
34 #set gzipped = 'true' 33 #set gzipped = 'true'
35 #end if 34 #end if
36 #end if 35 #end if
37 #else: 36 #else:
38 #for $i in $input_type_cond.reads_collection: 37 #for $i in $input_type_cond.collection_type_cond.reads_collection:
39 #if $i.is_of_type('fastqsanger.gz'): 38 #if $i.is_of_type('fastqsanger.gz'):
40 #set gzipped = 'true' 39 #set gzipped = 'true'
41 #end if 40 #end if
42 #set filename = $i.file_name 41 #set filename = $i.file_name
43 #set identifier = re.sub('[^\s\w\-]', '_', str($i.element_identifier)) 42 #set identifier = re.sub('[^\s\w\-]', '_', str($i.element_identifier))
44 ln -s $filename $input_reads_dir/$identifier && 43 ln -s '$filename' '$input_reads_dir/$identifier' &&
45 #end for 44 #end for
46 #end if 45 #end if
47 python '$__tool_directory__/vsnp_determine_ref_from_data.py' 46 python '$__tool_directory__/vsnp_determine_ref_from_data.py'
48 #if str($input_type) == "single": 47 #if str($input_type) == "single":
49 #if str($read_type_cond.read_type) == "single": 48 #if str($read_type_cond.read_type) == "single":
55 --output_dbkey '$output_dbkey' 54 --output_dbkey '$output_dbkey'
56 --output_metrics '$output_metrics' 55 --output_metrics '$output_metrics'
57 #end if 56 #end if
58 --gzipped $gzipped 57 --gzipped $gzipped
59 --processes $processes 58 --processes $processes
60 #for $i in $dnaprint_fields: 59 #if str($in_test_mode) == "false":
61 --dnaprint_fields '${i[0]}' '${i[2]}' 60 #set $dnaprint_fields = $__app__.tool_data_tables['vsnp_dnaprints'].get_fields()
62 #end for 61 #for $i in $dnaprint_fields:
62 --dnaprint_fields '${i[0]}' '${i[2]}'
63 #end for
64 #else:
65 --in_test_mode '$in_test_mode'
66 #end if
63 ]]></command> 67 ]]></command>
64 <inputs> 68 <inputs>
65 <conditional name="input_type_cond"> 69 <conditional name="input_type_cond">
66 <param name="input_type" type="select" label="Choose the category of the files to be analyzed"> 70 <param name="input_type" type="select" label="Choose the category of the files to be analyzed">
67 <option value="single" selected="true">Single files</option> 71 <option value="single" selected="true">Single files</option>
68 <option value="collection">Collections of files</option> 72 <option value="collection">Collection of files</option>
69 </param> 73 </param>
70 <when value="single"> 74 <when value="single">
71 <conditional name="read_type_cond"> 75 <conditional name="read_type_cond">
72 <param name="read_type" type="select" label="Choose the read type"> 76 <param name="read_type" type="select" label="Choose the read type">
73 <option value="paired" selected="true">Paired</option> 77 <option value="paired" selected="true">Paired</option>
81 <param name="read1" type="data" format="fastqsanger.gz,fastqsanger" label="Read1 fastq file"/> 85 <param name="read1" type="data" format="fastqsanger.gz,fastqsanger" label="Read1 fastq file"/>
82 </when> 86 </when>
83 </conditional> 87 </conditional>
84 </when> 88 </when>
85 <when value="collection"> 89 <when value="collection">
86 <param name="reads_collection" type="data_collection" format="fastqsanger,fastqsanger.gz" collection_type="list" label="Collection of fastqsanger files"/> 90 <conditional name="collection_type_cond">
91 <param name="collection_type" type="select" label="Collection of single reads or paired reads?">
92 <option value="single_reads" selected="true">Single reads</option>
93 <option value="paired_reads">Paired reads</option>
94 </param>
95 <when value="single_reads">
96 <param name="reads_collection" type="data_collection" format="fastqsanger,fastqsanger.gz" collection_type="list" label="Collection of fastqsanger files"/>
97 </when>
98 <when value="paired_reads">
99 <param name="reads_collection" type="data_collection" format="fastqsanger,fastqsanger.gz" collection_type="paired" label="Collection of fastqsanger paired read files"/>
100 </when>
101 </conditional>
87 </when> 102 </when>
88 </conditional> 103 </conditional>
89 <param name="processes" type="integer" min="1" max="20" value="8" label="Number of processes for job splitting"/> 104 <param name="processes" type="integer" min="1" max="20" value="8" label="Number of processes for job splitting"/>
105 <!-- Functional testing -->
106 <param name="in_test_mode" type="hidden" value="false"/>
90 </inputs> 107 </inputs>
91 <outputs> 108 <outputs>
92 <data name="output_dbkey" format="txt" label="${tool.name} (dbkey) on ${on_string}"> 109 <data name="output_dbkey" format="txt" label="${tool.name} (dbkey) on ${on_string}">
93 <filter>input_type_cond['input_type'] == 'single'</filter> 110 <filter>input_type_cond['input_type'] == 'single'</filter>
94 </data> 111 </data>
95 <data name="output_metrics" format="txt" label="${tool.name} (metrics) on ${on_string}"> 112 <data name="output_metrics" format="txt" label="${tool.name} (metrics) on ${on_string}">
96 <filter>input_type_cond['input_type'] == 'single'</filter> 113 <filter>input_type_cond['input_type'] == 'single'</filter>
97 </data> 114 </data>
98 <collection name="output_dbkey_collection" type="list"> 115 <collection name="output_dbkey_collection" type="list">
99 <discover_datasets pattern="__name__" directory="output_dbkey" format="txt" /> 116 <discover_datasets pattern="__name__" directory="output_dbkey" format="txt"/>
100 <filter>input_type_cond['input_type'] == 'collection'</filter> 117 <filter>input_type_cond['input_type'] == 'collection'</filter>
101 </collection> 118 </collection>
102 <collection name="output_metrics_collection" type="list"> 119 <collection name="output_metrics_collection" type="list">
103 <discover_datasets pattern="__name__" directory="output_metrics" format="txt" /> 120 <discover_datasets pattern="__name__" directory="output_metrics" format="txt"/>
104 <filter>input_type_cond['input_type'] == 'collection'</filter> 121 <filter>input_type_cond['input_type'] == 'collection'</filter>
105 </collection> 122 </collection>
106 </outputs> 123 </outputs>
107 <tests> 124 <tests>
108 <test> 125 <test>
109 <!-- Need to figure out how to test installed data tables --> 126 <param name="in_test_mode" value="true"/>
110 <param name="read1" value="reads.fastqsanger" ftype="fastqsanger" dbkey="89"/> 127 <param name="read_type" value="single"/>
111 <param name="read2" value="read2.fastqsanger" ftype="fastqsanger" dbkey="89"/> 128 <param name="read1" value="Mcap_Deer_DE_SRR650221.fastq.gz" ftype="fastqsanger.gz"/>
112 <output name="output_dbkey" file="output_dbkey.txt" ftype="txt"/> 129 <output name="output_dbkey" file="output_dbkey.txt" ftype="txt"/>
113 <output name="output_metrics" file="output_metrics.txt" ftype="txt"/> 130 <output name="output_metrics" file="output_metrics.txt" ftype="txt"/>
131 </test>
132 <test>
133 <param name="in_test_mode" value="true"/>
134 <param name="input_type" value="collection"/>
135 <param name="collection_type" value="paired_reads"/>
136 <param name="reads_collection">
137 <collection type="paired">
138 <element name="forward" value="forward.fastq.gz" ftype="fastqsanger.gz"/>
139 <element name="reverse" value="reverse.fastq.gz" ftype="fastqsanger.gz"/>
140 </collection>
141 </param>
142 <output_collection name="output_dbkey_collection" type="list">
143 <element name="forward.txt" file="forward_dbkey.txt" ftype="txt"/>
144 <element name="reverse.txt" file="reverse_dbkey.txt" ftype="txt"/>
145 </output_collection>
146 <output_collection name="output_metrics_collection" type="list">
147 <element name="forward.txt" file="forward_metrics.txt" ftype="txt"/>
148 <element name="reverse.txt" file="reverse_metrics.txt" ftype="txt"/>
149 </output_collection>
114 </test> 150 </test>
115 </tests> 151 </tests>
116 <help> 152 <help>
117 **What it does** 153 **What it does**
118 154
119 Accepts a single fastqsanger read, a set of paired reads, or a collections of reads and inspects the data to discover the 155 Accepts a single fastqsanger read, a set of paired reads, or a collection of reads and inspects the data to discover the
120 best reference genome for aligning the reads. This tool is, in essence, a DNA sniffer, and is the first Galaxy tool to 156 best reference genome for aligning the reads. This tool is, in essence, a DNA sniffer, and is the first Galaxy tool to
121 perform this task. While inspecting the data, a string of 0's and 1's is compiled based on the data contents, and we call 157 perform this task. While inspecting the data, a string of 0's and 1's is compiled based on the data contents, and we call
122 the complete string a "DNA print". All of the "DNA prints" files installed by the complementary **vSNP DNAprints data 158 the complete string a "DNA print". All of the "DNA prints" files installed by the complementary **vSNP DNAprints data
123 manager** tool are then inspected to find a match for the compiled "DNA print" string. These files are each associated 159 manager** tool are then inspected to find a match for the compiled "DNA print" string. These files are each associated
124 with a Galaxy "dbkey" (i.e., genome build), so when a metach is found, the associated "dbkey" is passed to a mapper (e.g., 160 with a Galaxy "dbkey" (i.e., genome build), so when a metach is found, the associated "dbkey" is passed to a mapper (e.g.,
147 * Brucella suis ATCC 23445 183 * Brucella suis ATCC 23445
148 * Brucella suis bv. 3 str. 686 184 * Brucella suis bv. 3 str. 686
149 185
150 **Required Options** 186 **Required Options**
151 187
152 * **Choose the category of the files to be analyzed** - select "Single files" or "Collections of files", then select the appropriate history items (single or paired fastqsanger reads or collections of fastqsanger reads) based on the selected option. 188 * **Choose the category of the files to be analyzed** - select "Single files" or "Collection of files", then select the appropriate history items (single or paired fastqsanger reads or a collection of fastqsanger reads) based on the selected option.
153 * **Number of processes for job splitting** - Select the number of processes for splitting the job to shorten execution time. 189 * **Number of processes for job splitting** - Select the number of processes for splitting the job to shorten execution time.
154 </help> 190 </help>
155 <citations> 191 <citations>
156 <citation type="bibtex"> 192 <citation type="bibtex">
157 @misc{None, 193 @misc{None,