annotate vsnp_statistics.xml @ 22:61239720da38 draft

"planemo upload for repository https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/sequence_analysis/vsnp/vsnp_statistics commit 1514016a0396b852d8d2ef312a0519a34696de10"
author greg
date Tue, 24 Aug 2021 12:44:52 +0000
parents d4ef7003c539
children b908bb18008a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16
44b07199be73 Uploaded
greg
parents: 14
diff changeset
1 <tool id="vsnp_statistics" name="vSNP: statistics" version="@WRAPPER_VERSION@.2+galaxy0" profile="@PROFILE@">
0
c21d338dbdc4 Uploaded
greg
parents:
diff changeset
2 <description></description>
4
2d6c6b01319e Uploaded
greg
parents: 2
diff changeset
3 <macros>
2d6c6b01319e Uploaded
greg
parents: 2
diff changeset
4 <import>macros.xml</import>
2d6c6b01319e Uploaded
greg
parents: 2
diff changeset
5 </macros>
0
c21d338dbdc4 Uploaded
greg
parents:
diff changeset
6 <requirements>
8
1becb6606626 Uploaded
greg
parents: 7
diff changeset
7 <expand macro="biopython_requirement"/>
1becb6606626 Uploaded
greg
parents: 7
diff changeset
8 <expand macro="numpy_requirement"/>
1becb6606626 Uploaded
greg
parents: 7
diff changeset
9 <expand macro="openpyxl_requirement"/>
1becb6606626 Uploaded
greg
parents: 7
diff changeset
10 <expand macro="pandas_requirement"/>
1becb6606626 Uploaded
greg
parents: 7
diff changeset
11 <expand macro="xlrd_requirement"/>
0
c21d338dbdc4 Uploaded
greg
parents:
diff changeset
12 </requirements>
c21d338dbdc4 Uploaded
greg
parents:
diff changeset
13 <command detect_errors="exit_code"><![CDATA[
c21d338dbdc4 Uploaded
greg
parents:
diff changeset
14 #import re
4
2d6c6b01319e Uploaded
greg
parents: 2
diff changeset
15
8
1becb6606626 Uploaded
greg
parents: 7
diff changeset
16 #if $input_type_cond.input_type in ["single", "pair"]:
1becb6606626 Uploaded
greg
parents: 7
diff changeset
17 #set read1 = $input_type_cond.read1
0
c21d338dbdc4 Uploaded
greg
parents:
diff changeset
18 #set read1_identifier = re.sub('[^\s\w\-]', '_', str($read1.element_identifier))
4
2d6c6b01319e Uploaded
greg
parents: 2
diff changeset
19 ln -s '${read1}' '${read1_identifier}' &&
8
1becb6606626 Uploaded
greg
parents: 7
diff changeset
20 #if $input_type_cond.input_type == "pair":
1becb6606626 Uploaded
greg
parents: 7
diff changeset
21 #set read2 = $input_type_cond.read2
4
2d6c6b01319e Uploaded
greg
parents: 2
diff changeset
22 #set read2_identifier = re.sub('[^\s\w\-]', '_', str($read2.element_identifier))
2d6c6b01319e Uploaded
greg
parents: 2
diff changeset
23 ln -s '${read2}' '${read2_identifier}' &&
0
c21d338dbdc4 Uploaded
greg
parents:
diff changeset
24 #end if
c21d338dbdc4 Uploaded
greg
parents:
diff changeset
25 #else:
18
076069733de7 Uploaded
greg
parents: 16
diff changeset
26 #set identifier = re.sub('[^\s\w\-]', '_', str($input_type_cond.reads_collection.element_identifier))
16
44b07199be73 Uploaded
greg
parents: 14
diff changeset
27 #set read1 = $input_type_cond.reads_collection.forward
18
076069733de7 Uploaded
greg
parents: 16
diff changeset
28 #set read1_identifier = $identifier + '_R1'
8
1becb6606626 Uploaded
greg
parents: 7
diff changeset
29 ln -s '${read1}' '${read1_identifier}' &&
16
44b07199be73 Uploaded
greg
parents: 14
diff changeset
30 #set read2 = $input_type_cond.reads_collection.reverse
18
076069733de7 Uploaded
greg
parents: 16
diff changeset
31 #set read2_identifier = $identifier + '_R2'
8
1becb6606626 Uploaded
greg
parents: 7
diff changeset
32 ln -s '${read2}' '${read2_identifier}' &&
0
c21d338dbdc4 Uploaded
greg
parents:
diff changeset
33 #end if
4
2d6c6b01319e Uploaded
greg
parents: 2
diff changeset
34
0
c21d338dbdc4 Uploaded
greg
parents:
diff changeset
35 python '$__tool_directory__/vsnp_statistics.py'
8
1becb6606626 Uploaded
greg
parents: 7
diff changeset
36 --read1 '${read1_identifier}'
16
44b07199be73 Uploaded
greg
parents: 14
diff changeset
37 #if $input_type_cond.input_type in ["pair", "paired"]:
8
1becb6606626 Uploaded
greg
parents: 7
diff changeset
38 --read2 '${read2_identifier}'
0
c21d338dbdc4 Uploaded
greg
parents:
diff changeset
39 #end if
8
1becb6606626 Uploaded
greg
parents: 7
diff changeset
40 #if $read1.is_of_type('fastqsanger.gz'):
1becb6606626 Uploaded
greg
parents: 7
diff changeset
41 --gzipped
1becb6606626 Uploaded
greg
parents: 7
diff changeset
42 #end if
1becb6606626 Uploaded
greg
parents: 7
diff changeset
43 --dbkey '$samtools_idxstats.metadata.dbkey'
1becb6606626 Uploaded
greg
parents: 7
diff changeset
44 --samtools_idxstats '$samtools_idxstats'
1becb6606626 Uploaded
greg
parents: 7
diff changeset
45 --vsnp_azc_metrics '$vsnp_azc_metrics'
1
14e29f7d59ca Uploaded
greg
parents: 0
diff changeset
46 --output '$output'
0
c21d338dbdc4 Uploaded
greg
parents:
diff changeset
47 ]]></command>
c21d338dbdc4 Uploaded
greg
parents:
diff changeset
48 <inputs>
c21d338dbdc4 Uploaded
greg
parents:
diff changeset
49 <conditional name="input_type_cond">
c21d338dbdc4 Uploaded
greg
parents:
diff changeset
50 <param name="input_type" type="select" label="Choose the category of the files to be analyzed">
8
1becb6606626 Uploaded
greg
parents: 7
diff changeset
51 <option value="single" selected="true">Single files</option>
1becb6606626 Uploaded
greg
parents: 7
diff changeset
52 <option value="paired">Paired reads</option>
1becb6606626 Uploaded
greg
parents: 7
diff changeset
53 <option value="pair">Paired reads in separate data sets</option>
0
c21d338dbdc4 Uploaded
greg
parents:
diff changeset
54 </param>
8
1becb6606626 Uploaded
greg
parents: 7
diff changeset
55 <when value="single">
1becb6606626 Uploaded
greg
parents: 7
diff changeset
56 <param name="read1" type="data" format="fastqsanger.gz,fastqsanger" label="Read1 fastq file"/>
4
2d6c6b01319e Uploaded
greg
parents: 2
diff changeset
57 </when>
8
1becb6606626 Uploaded
greg
parents: 7
diff changeset
58 <when value="paired">
1becb6606626 Uploaded
greg
parents: 7
diff changeset
59 <param name="reads_collection" type="data_collection" format="fastqsanger,fastqsanger.gz" collection_type="paired" label="Collection of fastqsanger paired read files"/>
1becb6606626 Uploaded
greg
parents: 7
diff changeset
60 </when>
1becb6606626 Uploaded
greg
parents: 7
diff changeset
61 <when value="pair">
1becb6606626 Uploaded
greg
parents: 7
diff changeset
62 <param name="read1" type="data" format="fastqsanger.gz,fastqsanger" label="Read1 fastq file"/>
1becb6606626 Uploaded
greg
parents: 7
diff changeset
63 <param name="read2" type="data" format="fastqsanger.gz,fastqsanger" label="Read2 fastq file"/>
0
c21d338dbdc4 Uploaded
greg
parents:
diff changeset
64 </when>
c21d338dbdc4 Uploaded
greg
parents:
diff changeset
65 </conditional>
8
1becb6606626 Uploaded
greg
parents: 7
diff changeset
66 <param name="samtools_idxstats" type="data" format="tabular" label="Samtools idxstats file"/>
1becb6606626 Uploaded
greg
parents: 7
diff changeset
67 <param name="vsnp_azc_metrics" type="data" format="tabular" label="vSNP: add zero coverage metrics file"/>
0
c21d338dbdc4 Uploaded
greg
parents:
diff changeset
68 </inputs>
c21d338dbdc4 Uploaded
greg
parents:
diff changeset
69 <outputs>
5
d0fbdeaaa488 "planemo upload for repository https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/sequence_analysis/vsnp/vsnp_statistics commit 770e89322a15829580ed9577a853660f63233f32"
greg
parents: 4
diff changeset
70 <data name="output" format="tabular"/>
0
c21d338dbdc4 Uploaded
greg
parents:
diff changeset
71 </outputs>
c21d338dbdc4 Uploaded
greg
parents:
diff changeset
72 <tests>
4
2d6c6b01319e Uploaded
greg
parents: 2
diff changeset
73 <!-- A single fastq file -->
2d6c6b01319e Uploaded
greg
parents: 2
diff changeset
74 <test expect_num_outputs="1">
8
1becb6606626 Uploaded
greg
parents: 7
diff changeset
75 <param name="input_type" value="single"/>
4
2d6c6b01319e Uploaded
greg
parents: 2
diff changeset
76 <param name="read1" value="Mcap_Deer_DE_SRR650221.fastq.gz" ftype="fastqsanger.gz" dbkey="89"/>
2d6c6b01319e Uploaded
greg
parents: 2
diff changeset
77 <param name="samtools_idxstats" value="samtools_idxstats1.tabular" ftype="tabular" dbkey="89"/>
8
1becb6606626 Uploaded
greg
parents: 7
diff changeset
78 <param name="vsnp_azc_metrics" value="add_zc_metrics1.tabular" ftype="tabular" dbkey="89"/>
5
d0fbdeaaa488 "planemo upload for repository https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/sequence_analysis/vsnp/vsnp_statistics commit 770e89322a15829580ed9577a853660f63233f32"
greg
parents: 4
diff changeset
79 <output name="output" file="vsnp_statistics1.tabular" ftype="tabular"/>
4
2d6c6b01319e Uploaded
greg
parents: 2
diff changeset
80 </test>
2d6c6b01319e Uploaded
greg
parents: 2
diff changeset
81 <!-- A set of paired fastq files -->
2d6c6b01319e Uploaded
greg
parents: 2
diff changeset
82 <test expect_num_outputs="1">
8
1becb6606626 Uploaded
greg
parents: 7
diff changeset
83 <param name="input_type" value="pair"/>
0
c21d338dbdc4 Uploaded
greg
parents:
diff changeset
84 <param name="read1" value="13-1941-6_S4_L001_R1_600000.fastq.gz" ftype="fastqsanger.gz" dbkey="89"/>
c21d338dbdc4 Uploaded
greg
parents:
diff changeset
85 <param name="read2" value="13-1941-6_S4_L001_R2_600000.fastq.gz" ftype="fastqsanger.gz" dbkey="89"/>
4
2d6c6b01319e Uploaded
greg
parents: 2
diff changeset
86 <param name="samtools_idxstats" value="samtools_idxstats2.tabular" ftype="tabular" dbkey="89"/>
8
1becb6606626 Uploaded
greg
parents: 7
diff changeset
87 <param name="vsnp_azc_metrics" value="add_zc_metrics2.tabular" ftype="tabular" dbkey="89"/>
5
d0fbdeaaa488 "planemo upload for repository https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/sequence_analysis/vsnp/vsnp_statistics commit 770e89322a15829580ed9577a853660f63233f32"
greg
parents: 4
diff changeset
88 <output name="output" file="vsnp_statistics2.tabular" ftype="tabular"/>
4
2d6c6b01319e Uploaded
greg
parents: 2
diff changeset
89 </test>
8
1becb6606626 Uploaded
greg
parents: 7
diff changeset
90 <!-- A collection of paired fastq files -->
4
2d6c6b01319e Uploaded
greg
parents: 2
diff changeset
91 <test expect_num_outputs="1">
8
1becb6606626 Uploaded
greg
parents: 7
diff changeset
92 <param name="input_type" value="paired"/>
4
2d6c6b01319e Uploaded
greg
parents: 2
diff changeset
93 <param name="reads_collection">
2d6c6b01319e Uploaded
greg
parents: 2
diff changeset
94 <collection type="paired">
2d6c6b01319e Uploaded
greg
parents: 2
diff changeset
95 <element name="forward" value="13-1941-6_S4_L001_R1_600000.fastq.gz" ftype="fastqsanger.gz"/>
2d6c6b01319e Uploaded
greg
parents: 2
diff changeset
96 <element name="reverse" value="13-1941-6_S4_L001_R2_600000.fastq.gz" ftype="fastqsanger.gz"/>
2d6c6b01319e Uploaded
greg
parents: 2
diff changeset
97 </collection>
2d6c6b01319e Uploaded
greg
parents: 2
diff changeset
98 </param>
8
1becb6606626 Uploaded
greg
parents: 7
diff changeset
99 <param name="samtools_idxstats" value="samtools_idxstats5.tabular" ftype="tabular" dbkey="89"/>
1becb6606626 Uploaded
greg
parents: 7
diff changeset
100 <param name="vsnp_azc_metrics" value="add_zc_metrics5.tabular" ftype="tabular" dbkey="89"/>
5
d0fbdeaaa488 "planemo upload for repository https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/sequence_analysis/vsnp/vsnp_statistics commit 770e89322a15829580ed9577a853660f63233f32"
greg
parents: 4
diff changeset
101 <output name="output" file="vsnp_statistics4.tabular" ftype="tabular"/>
0
c21d338dbdc4 Uploaded
greg
parents:
diff changeset
102 </test>
c21d338dbdc4 Uploaded
greg
parents:
diff changeset
103 </tests>
c21d338dbdc4 Uploaded
greg
parents:
diff changeset
104 <help>
c21d338dbdc4 Uploaded
greg
parents:
diff changeset
105 **What it does**
c21d338dbdc4 Uploaded
greg
parents:
diff changeset
106
4
2d6c6b01319e Uploaded
greg
parents: 2
diff changeset
107 Accepts associated fastq files, SAMtools idxstats files and **vSNP: add zero coverage** metrics files and extracts information from them
20
d4ef7003c539 "planemo upload for repository https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/sequence_analysis/vsnp/vsnp_statistics commit a08a9977ae1ac36c46b9fb7898bd4b5c4c302c11"
greg
parents: 18
diff changeset
108 to produce a tabular file containing statistics for each sample. The samples can be a single read, a single set of paired reads in
d4ef7003c539 "planemo upload for repository https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/sequence_analysis/vsnp/vsnp_statistics commit a08a9977ae1ac36c46b9fb7898bd4b5c4c302c11"
greg
parents: 18
diff changeset
109 separate datasets or a collection of paired reads. The output statistics include reference, file size, mean read length, mean read quality,
4
2d6c6b01319e Uploaded
greg
parents: 2
diff changeset
110 reads passing Q30, total reads, all mapped reads, unmapped reads, unmapped reads percentage of total, reference with coverage, average depth
2d6c6b01319e Uploaded
greg
parents: 2
diff changeset
111 of coverage and good SNP count.
0
c21d338dbdc4 Uploaded
greg
parents:
diff changeset
112 </help>
4
2d6c6b01319e Uploaded
greg
parents: 2
diff changeset
113 <expand macro="citations"/>
0
c21d338dbdc4 Uploaded
greg
parents:
diff changeset
114 </tool>
c21d338dbdc4 Uploaded
greg
parents:
diff changeset
115