Mercurial > repos > iuc > vsnp_statistics
comparison vsnp_statistics.xml @ 2:b960f47c57a1 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/vsnp commit 2a94c64d6c7236550bf483d2ffc4e86248c63aab"
author | iuc |
---|---|
date | Tue, 16 Nov 2021 20:12:13 +0000 |
parents | 50f539302bf4 |
children | a2f69b1598e0 |
comparison
equal
deleted
inserted
replaced
1:14f3e6f202c6 | 2:b960f47c57a1 |
---|---|
1 <tool id="vsnp_statistics" name="vSNP: statistics" version="@WRAPPER_VERSION@.1+galaxy0" profile="@PROFILE@"> | 1 <tool id="vsnp_statistics" name="vSNP: statistics" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" 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="1.79">biopython</requirement> | 7 <expand macro="biopython_requirement"/> |
8 <requirement type="package" version="1.21.1">numpy</requirement> | 8 <expand macro="numpy_requirement"/> |
9 <requirement type="package" version="3.0.7">openpyxl</requirement> | 9 <expand macro="openpyxl_requirement"/> |
10 <requirement type="package" version="1.3.0">pandas</requirement> | 10 <expand macro="pandas_requirement"/> |
11 <requirement type="package" version="2.0.1">xlrd</requirement> | 11 <expand macro="xlrd_requirement"/> |
12 </requirements> | 12 </requirements> |
13 <command detect_errors="exit_code"><![CDATA[ | 13 <command detect_errors="exit_code"><![CDATA[ |
14 #import re | 14 #import re |
15 #set input_idxstats_dir = 'input_idxstats' | |
16 #set input_metrics_dir = 'input_metrics' | |
17 #set input_reads_dir = 'input_reads' | |
18 mkdir -p $input_idxstats_dir && | |
19 mkdir -p $input_metrics_dir && | |
20 mkdir -p $input_reads_dir && | |
21 | 15 |
22 #if $input_type_cond.input_type == 'single_files': | 16 #if $input_type_cond.input_type in ["single", "pair"]: |
23 #set read1 = $input_type_cond.read_type_cond.read1 | 17 #set read1 = $input_type_cond.read1 |
24 #set read1_identifier = re.sub('[^\s\w\-]', '_', str($read1.element_identifier)) | 18 #set read1_identifier = re.sub('[^\s\w\-]', '_', str($read1.element_identifier)) |
25 ln -s '${read1}' '${read1_identifier}' && | 19 ln -s '${read1}' '${read1_identifier}' && |
26 #if $input_type_cond.read_type_cond.read_type == 'pair': | 20 #if $input_type_cond.input_type == "pair": |
27 #set read2 = $input_type_cond.read_type_cond.read2 | 21 #set read2 = $input_type_cond.read2 |
28 #set read2_identifier = re.sub('[^\s\w\-]', '_', str($read2.element_identifier)) | 22 #set read2_identifier = re.sub('[^\s\w\-]', '_', str($read2.element_identifier)) |
29 ln -s '${read2}' '${read2_identifier}' && | 23 ln -s '${read2}' '${read2_identifier}' && |
30 #else: | |
31 #set read2 = None | |
32 #end if | 24 #end if |
33 #else: | 25 #else: |
34 #if $input_type_cond.collection_type_cond.collection_type == 'single': | 26 #set identifier = re.sub('[^\s\w\-]', '_', str($input_type_cond.reads_collection.element_identifier)) |
35 #for $i in $input_type_cond.collection_type_cond.reads_collection: | 27 #set read1 = $input_type_cond.reads_collection.forward |
36 #set identifier = re.sub('[^\s\w\-]', '_', str($i.element_identifier)) | 28 #set read1_identifier = $identifier + '_R1' |
37 ln -s '${i.file_name}' '$input_reads_dir/${identifier}' && | 29 ln -s '${read1}' '${read1_identifier}' && |
38 #end for | 30 #set read2 = $input_type_cond.reads_collection.reverse |
39 #else: | 31 #set read2_identifier = $identifier + '_R2' |
40 #set read1 = $input_type_cond.collection_type_cond.reads_collection['forward'] | 32 ln -s '${read2}' '${read2_identifier}' && |
41 #set read1_identifier = re.sub('[^\s\w\-]', '_', str($read1.name)) | |
42 ln -s '${read1}' '$input_reads_dir/${read1_identifier}' && | |
43 #set read2 = $input_type_cond.collection_type_cond.reads_collection['reverse'] | |
44 #set read2_identifier = re.sub('[^\s\w\-]', '_', str($read2.name)) | |
45 ln -s '${read2}' '$input_reads_dir/${read2_identifier}' && | |
46 #end if | |
47 #for $i in $input_type_cond.samtools_idxstats: | |
48 #set identifier = re.sub('[^\s\w\-]', '_', str($i.element_identifier)) | |
49 ln -s '${i.file_name}' '$input_idxstats_dir/${identifier}' && | |
50 #end for | |
51 #for $i in $input_type_cond.vsnp_azc: | |
52 #set identifier = re.sub('[^\s\w\-]', '_', str($i.element_identifier)) | |
53 ln -s '${i.file_name}' '$input_metrics_dir/${identifier}' && | |
54 #end for | |
55 #end if | 33 #end if |
56 | 34 |
57 python '$__tool_directory__/vsnp_statistics.py' | 35 python '$__tool_directory__/vsnp_statistics.py' |
58 #if $input_type_cond.input_type == 'single_files': | 36 --read1 '${read1_identifier}' |
59 --dbkey '$input_type_cond.samtools_idxstats.metadata.dbkey' | 37 #if $input_type_cond.input_type in ["pair", "paired"]: |
60 #if $input_type_cond.read_type_cond.read1.is_of_type('fastqsanger.gz'): | 38 --read2 '${read2_identifier}' |
61 --gzipped | |
62 #end if | |
63 --read1 '${read1_identifier}' | |
64 #if $input_type_cond.read_type_cond.read_type == 'pair': | |
65 --read2 '${read2_identifier}' | |
66 #end if | |
67 --samtools_idxstats '$input_type_cond.samtools_idxstats' | |
68 --vsnp_azc '$input_type_cond.vsnp_azc' | |
69 #else: | |
70 --dbkey '$input_type_cond.samtools_idxstats[0].metadata.dbkey' | |
71 #if $input_type_cond.collection_type_cond.reads_collection[0].is_of_type('fastqsanger.gz'): | |
72 --gzipped | |
73 #end if | |
74 #if $input_type_cond.collection_type_cond.collection_type == 'paired': | |
75 --list_paired | |
76 #end if | |
77 --input_idxstats_dir '$input_idxstats_dir' | |
78 --input_metrics_dir '$input_metrics_dir' | |
79 --input_reads_dir '$input_reads_dir' | |
80 #end if | 39 #end if |
40 #if $read1.is_of_type('fastqsanger.gz'): | |
41 --gzipped | |
42 #end if | |
43 --dbkey '$samtools_idxstats.metadata.dbkey' | |
44 --samtools_idxstats '$samtools_idxstats' | |
45 --vsnp_azc_metrics '$vsnp_azc_metrics' | |
81 --output '$output' | 46 --output '$output' |
82 ]]></command> | 47 ]]></command> |
83 <inputs> | 48 <inputs> |
84 <conditional name="input_type_cond"> | 49 <conditional name="input_type_cond"> |
85 <param name="input_type" type="select" label="Choose the category of the files to be analyzed"> | 50 <param name="input_type" type="select" label="Choose the category of the files to be analyzed"> |
86 <option value="single_files" selected="true">Single files</option> | 51 <option value="single" selected="true">Single files</option> |
87 <option value="collections">Collections of files</option> | 52 <option value="paired">Paired reads</option> |
53 <option value="pair">Paired reads in separate data sets</option> | |
88 </param> | 54 </param> |
89 <when value="single_files"> | 55 <when value="single"> |
90 <conditional name="read_type_cond"> | 56 <param name="read1" type="data" format="fastqsanger.gz,fastqsanger" label="Read1 fastq file"/> |
91 <param name="read_type" type="select" label="Choose the read type"> | |
92 <option value="single" selected="true">Single reads</option> | |
93 <option value="pair">Paired reads</option> | |
94 </param> | |
95 <when value="single"> | |
96 <param name="read1" type="data" format="fastqsanger.gz,fastqsanger" label="Read1 fastq file"/> | |
97 </when> | |
98 <when value="pair"> | |
99 <param name="read1" type="data" format="fastqsanger.gz,fastqsanger" label="Read1 fastq file"/> | |
100 <param name="read2" type="data" format="fastqsanger.gz,fastqsanger" label="Read2 fastq file"/> | |
101 </when> | |
102 </conditional> | |
103 <param name="samtools_idxstats" type="data" format="tabular" label="Samtools idxstats file"/> | |
104 <param name="vsnp_azc" type="data" format="tabular" label="vSNP: add zero coverage metrics file"/> | |
105 </when> | 57 </when> |
106 <when value="collections"> | 58 <when value="paired"> |
107 <conditional name="collection_type_cond"> | 59 <param name="reads_collection" type="data_collection" format="fastqsanger,fastqsanger.gz" collection_type="paired" label="Collection of fastqsanger paired read files"/> |
108 <param name="collection_type" type="select" label="Collections of single reads or paired reads?"> | 60 </when> |
109 <option value="single" selected="true">Single reads</option> | 61 <when value="pair"> |
110 <option value="paired">Paired reads in separate datasets</option> | 62 <param name="read1" type="data" format="fastqsanger.gz,fastqsanger" label="Read1 fastq file"/> |
111 </param> | 63 <param name="read2" type="data" format="fastqsanger.gz,fastqsanger" label="Read2 fastq file"/> |
112 <when value="single"> | |
113 <param name="reads_collection" type="data_collection" format="fastqsanger,fastqsanger.gz" collection_type="list" label="Collection of fastqsanger files"/> | |
114 </when> | |
115 <when value="paired"> | |
116 <param name="reads_collection" type="data_collection" format="fastqsanger,fastqsanger.gz" collection_type="paired" label="Collection of fastqsanger paired read files"/> | |
117 </when> | |
118 </conditional> | |
119 <param name="samtools_idxstats" type="data_collection" format="tabular" collection_type="list" label="Collection of samtools idxstats files"/> | |
120 <param name="vsnp_azc" type="data_collection" format="tabular" collection_type="list" label="Collection of vSNP: add zero coverage metrics files"/> | |
121 </when> | 64 </when> |
122 </conditional> | 65 </conditional> |
66 <param name="samtools_idxstats" type="data" format="tabular" label="Samtools idxstats file"/> | |
67 <param name="vsnp_azc_metrics" type="data" format="tabular" label="vSNP: add zero coverage metrics file"/> | |
123 </inputs> | 68 </inputs> |
124 <outputs> | 69 <outputs> |
125 <data name="output" format="tabular"/> | 70 <data name="output" format="tabular"/> |
126 </outputs> | 71 </outputs> |
127 <tests> | 72 <tests> |
128 <!-- A single fastq file --> | 73 <!-- A single fastq file --> |
129 <test expect_num_outputs="1"> | 74 <test expect_num_outputs="1"> |
130 <param name="input_type" value="single_files"/> | 75 <param name="input_type" value="single"/> |
131 <param name="read_type" value="single"/> | |
132 <param name="read1" value="Mcap_Deer_DE_SRR650221.fastq.gz" ftype="fastqsanger.gz" dbkey="89"/> | 76 <param name="read1" value="Mcap_Deer_DE_SRR650221.fastq.gz" ftype="fastqsanger.gz" dbkey="89"/> |
133 <param name="samtools_idxstats" value="samtools_idxstats1.tabular" ftype="tabular" dbkey="89"/> | 77 <param name="samtools_idxstats" value="samtools_idxstats1.tabular" ftype="tabular" dbkey="89"/> |
134 <param name="vsnp_azc" value="add_zc_metrics1.tabular" ftype="tabular" dbkey="89"/> | 78 <param name="vsnp_azc_metrics" value="add_zc_metrics1.tabular" ftype="tabular" dbkey="89"/> |
135 <output name="output" file="vsnp_statistics1.tabular" ftype="tabular"/> | 79 <output name="output" ftype="tabular"> |
80 <assert_contents> | |
81 <has_size value="332"/> | |
82 </assert_contents> | |
83 </output> | |
136 </test> | 84 </test> |
137 <!-- A set of paired fastq files --> | 85 <!-- A set of paired fastq files --> |
138 <test expect_num_outputs="1"> | 86 <test expect_num_outputs="1"> |
139 <param name="input_type" value="single_files"/> | 87 <param name="input_type" value="pair"/> |
140 <param name="read_type" value="pair"/> | |
141 <param name="read1" value="13-1941-6_S4_L001_R1_600000.fastq.gz" ftype="fastqsanger.gz" dbkey="89"/> | 88 <param name="read1" value="13-1941-6_S4_L001_R1_600000.fastq.gz" ftype="fastqsanger.gz" dbkey="89"/> |
142 <param name="read2" value="13-1941-6_S4_L001_R2_600000.fastq.gz" ftype="fastqsanger.gz" dbkey="89"/> | 89 <param name="read2" value="13-1941-6_S4_L001_R2_600000.fastq.gz" ftype="fastqsanger.gz" dbkey="89"/> |
143 <param name="samtools_idxstats" value="samtools_idxstats2.tabular" ftype="tabular" dbkey="89"/> | 90 <param name="samtools_idxstats" value="samtools_idxstats2.tabular" ftype="tabular" dbkey="89"/> |
144 <param name="vsnp_azc" value="add_zc_metrics2.tabular" ftype="tabular" dbkey="89"/> | 91 <param name="vsnp_azc_metrics" value="add_zc_metrics2.tabular" ftype="tabular" dbkey="89"/> |
145 <output name="output" file="vsnp_statistics2.tabular" ftype="tabular"/> | 92 <output name="output" ftype="tabular"> |
93 <assert_contents> | |
94 <has_size value="500"/> | |
95 </assert_contents> | |
96 </output> | |
146 </test> | 97 </test> |
147 <!-- A collection of SE fastq files --> | 98 <!-- A collection of paired fastq files --> |
148 <test expect_num_outputs="1"> | 99 <test expect_num_outputs="1"> |
149 <param name="input_type" value="collections"/> | 100 <param name="input_type" value="paired"/> |
150 <param name="read_type" value="single"/> | |
151 <param name="reads_collection"> | |
152 <collection type="list"> | |
153 <element name="Mcap_Deer_DE_SRR650221.fastq.gz" value="Mcap_Deer_DE_SRR650221.fastq.gz" dbkey="89"/> | |
154 <element name="13-1941-6_S4_L001_R1_600000.fastq.gz" value="13-1941-6_S4_L001_R1_600000.fastq.gz" dbkey="89"/> | |
155 </collection> | |
156 </param> | |
157 <param name="samtools_idxstats"> | |
158 <collection type="list"> | |
159 <element name="13-1941-6_S4_L001_R1_600000.fastq.gz" value="samtools_idxstats3.tabular" dbkey="89"/> | |
160 <element name="Mcap_Deer_DE_SRR650221.fastq.gz" value="samtools_idxstats4.tabular" dbkey="89"/> | |
161 </collection> | |
162 </param> | |
163 <param name="vsnp_azc"> | |
164 <collection type="list"> | |
165 <element name="13-1941-6_S4_L001_R1_600000.fastq.gz" value="add_zc_metrics3.tabular" dbkey="89"/> | |
166 <element name="Mcap_Deer_DE_SRR650221.fastq.gz" value="add_zc_metrics4.tabular" dbkey="89"/> | |
167 </collection> | |
168 </param> | |
169 <output name="output" file="vsnp_statistics3.tabular" ftype="tabular"/> | |
170 </test> | |
171 <!-- A collection of PE fastq files --> | |
172 <test expect_num_outputs="1"> | |
173 <param name="input_type" value="collections"/> | |
174 <param name="collection_type" value="paired"/> | |
175 <param name="reads_collection"> | 101 <param name="reads_collection"> |
176 <collection type="paired"> | 102 <collection type="paired"> |
177 <element name="forward" value="13-1941-6_S4_L001_R1_600000.fastq.gz" ftype="fastqsanger.gz"/> | 103 <element name="forward" value="13-1941-6_S4_L001_R1_600000.fastq.gz" ftype="fastqsanger.gz"/> |
178 <element name="reverse" value="13-1941-6_S4_L001_R2_600000.fastq.gz" ftype="fastqsanger.gz"/> | 104 <element name="reverse" value="13-1941-6_S4_L001_R2_600000.fastq.gz" ftype="fastqsanger.gz"/> |
179 </collection> | 105 </collection> |
180 </param> | 106 </param> |
181 <param name="samtools_idxstats"> | 107 <param name="samtools_idxstats" value="samtools_idxstats5.tabular" ftype="tabular" dbkey="89"/> |
182 <collection type="list"> | 108 <param name="vsnp_azc_metrics" value="add_zc_metrics5.tabular" ftype="tabular" dbkey="89"/> |
183 <element name="13-1941-6_S4_L001_R1_600000.fastq" value="samtools_idxstats5.tabular" dbkey="89"/> | 109 <output name="output" ftype="tabular"> |
184 </collection> | 110 <assert_contents> |
185 </param> | 111 <has_size value="466"/> |
186 <param name="vsnp_azc"> | 112 </assert_contents> |
187 <collection type="list"> | 113 </output> |
188 <element name="13-1941-6_S4_L001_R1_600000.fastq" value="add_zc_metrics5.tabular" dbkey="89"/> | |
189 </collection> | |
190 </param> | |
191 <output name="output" file="vsnp_statistics4.tabular" ftype="tabular"/> | |
192 </test> | 114 </test> |
193 </tests> | 115 </tests> |
194 <help> | 116 <help> |
195 **What it does** | 117 **What it does** |
196 | 118 |
197 Accepts associated fastq files, SAMtools idxstats files and **vSNP: add zero coverage** metrics files and extracts information from them | 119 Accepts associated fastq files, SAMtools idxstats files and **vSNP: add zero coverage** metrics files and extracts information from them |
198 to produce an Excel spreadsheet containing statistics for each sample. The samples can be single or paired reads, and all associated inputs | 120 to produce a tabular file containing statistics for each sample. The samples can be a single read, a single set of paired reads in |
199 can be either single files or collections of files. The output statistics include reference, file size, mean read length, mean read quality, | 121 separate datasets or a collection of paired reads. The output statistics include reference, file size, mean read length, mean read quality, |
200 reads passing Q30, total reads, all mapped reads, unmapped reads, unmapped reads percentage of total, reference with coverage, average depth | 122 reads passing Q30, total reads, all mapped reads, unmapped reads, unmapped reads percentage of total, reference with coverage, average depth |
201 of coverage and good SNP count. | 123 of coverage and good SNP count. |
202 </help> | 124 </help> |
203 <expand macro="citations"/> | 125 <expand macro="citations"/> |
204 </tool> | 126 </tool> |