Mercurial > repos > matthias > dada2_plotqualityprofile
comparison dada2_plotQualityProfile.xml @ 2:4095456821e2 draft
planemo upload for repository https://github.com/bernt-matthias/mb-galaxy-tools/tree/topic/dada2/tools/dada2 commit 5b1603bbcd3f139cad5c876be83fcb39697b5613-dirty
author | matthias |
---|---|
date | Tue, 09 Apr 2019 07:03:51 -0400 |
parents | de5c51e1c190 |
children | cf166b8a8e27 |
comparison
equal
deleted
inserted
replaced
1:2b8227e68647 | 2:4095456821e2 |
---|---|
1 <tool id="dada2_plotQualityProfile" name="dada2: plotQualityProfile" version="@DADA2_VERSION@"> | 1 <tool id="dada2_plotQualityProfile" name="dada2: plotQualityProfile" version="@DADA2_VERSION@+galaxy@WRAPPER_VERSION@"> |
2 <description>plot a visual summary of the quality scores</description> | 2 <description>plot a visual summary of the quality scores</description> |
3 <macros> | 3 <macros> |
4 <import>macros.xml</import> | 4 <import>macros.xml</import> |
5 </macros> | 5 </macros> |
6 <expand macro="requirements"/> | 6 <expand macro="requirements"/> |
9 Rscript --slave '$dada2_script' | 9 Rscript --slave '$dada2_script' |
10 ]]></command> | 10 ]]></command> |
11 <configfiles> | 11 <configfiles> |
12 <configfile name="dada2_script"><![CDATA[ | 12 <configfile name="dada2_script"><![CDATA[ |
13 files = c() | 13 files = c() |
14 #if $mode_cond.mode_select == "TRUE" | 14 #if "batch" in $paired_cond.paired_select |
15 #for $read in $mode_cond.reads: | 15 #if "single" in $paired_cond.paired_select |
16 files = c(files, '$read') | 16 files = c(files, '$reads') |
17 #end for | 17 #else |
18 files = c(files, '$reads.forward') | |
19 files = c(files, '$reads.reverse') | |
20 #end if | |
18 #else | 21 #else |
19 files = c(files, '$mode_cond.reads') | 22 #for $read in $paired_cond.reads: |
23 #if $paired_cond.paired_select == "no" | |
24 files = c(files, '$read') | |
25 #else | |
26 files = c(files, '$read.forward') | |
27 files = c(files, '$read.reverse') | |
28 #end if | |
29 #end for | |
20 #end if | 30 #end if |
31 | |
21 | 32 |
22 library(ggplot2, quietly=T) | 33 library(ggplot2, quietly=T) |
23 library(dada2, quietly=T) | 34 library(dada2, quietly=T) |
24 | 35 |
25 qp <- plotQualityProfile(files, | 36 qp <- plotQualityProfile(files, |
26 #if str($n) != "" | 37 #if str($n) != "" |
27 n=$n, | 38 n=$n, |
28 #end if | 39 #end if |
29 aggregate = $mode_cond.mode_select) | 40 aggregate = $mode) |
30 | 41 |
31 ggsave('output.pdf', qp, width = 20,height = 15,units = c("cm")) | 42 ggsave('output.pdf', qp, width = 20,height = 15,units = c("cm")) |
32 ]]></configfile> | 43 ]]></configfile> |
33 </configfiles> | 44 </configfiles> |
34 <inputs> | 45 <inputs> |
35 <conditional name="mode_cond"> | 46 <conditional name="paired_cond"> |
36 <param name="mode_select" type="select" label="Aggregate data" help="Create a single plot for all data sets (default) or a separate plot for each data set"> | 47 <param name="paired_select" type="select" label="Input data organisation and processing mode" help="Select if data is organized in a paired collection or not (note that the pairing of the data sets is not used by the tool); batch will create a separate pdf for each input data set or data set pair; non-batch will create one pdf containing a plot for each data set"> |
37 <option value="TRUE">yes</option> | 48 <option value="paired">paired - non batch</option> |
38 <option value="FALSE">no</option> | 49 <option value="single">single - non batch</option> |
39 </param> | 50 <option value="paired_batch">paired - batch</option> |
40 <when value="TRUE"> | 51 <option value="single_batch">single - batch</option> |
41 <param name="reads" type="data" multiple="true" format="fastqsanger,fastqsanger.gz" label="Short read data"/> | 52 </param> |
42 </when> | 53 <when value="paired"> |
43 <when value="FALSE"> | 54 <param name="reads" type="data_collection" collection_type="list:paired" format="fastqsanger,fastqsanger.gz" label="Short read data"/> |
44 <param name="reads" type="data" format="fastqsanger,fastqsanger.gz" label="Short read data"/> | 55 </when> |
45 </when> | 56 <when value="single"> |
46 </conditional> | 57 <param name="reads" type="data" multiple="true" format="fastqsanger,fastqsanger.gz" label="Short read data"/> |
58 </when> | |
59 <when value="paired_batch"> | |
60 <param name="reads" type="data_collection" collection_type="paired" format="fastqsanger,fastqsanger.gz" label="Short read data"/> | |
61 </when> | |
62 <when value="single_batch"> | |
63 <param name="reads" type="data" format="fastqsanger,fastqsanger.gz" label="Short read data"/> | |
64 </when> | |
65 </conditional> | |
66 <param name="mode" type="boolean" label="Aggregate data" checked="True" truevalue="TRUE" falsevalue="FALSE" help="Create a single plot for all data sets (default) or a separate plot for each data set"/> | |
47 <param name="n" type="integer" optional="true" label="sample number" help="number of records to sample from the fastq file (default 500.000)"/> | 67 <param name="n" type="integer" optional="true" label="sample number" help="number of records to sample from the fastq file (default 500.000)"/> |
48 </inputs> | 68 </inputs> |
49 <outputs> | 69 <outputs> |
50 <data name="output" format="pdf" from_work_dir="output.pdf"/> | 70 <data name="output" format="pdf" from_work_dir="output.pdf"/> |
51 </outputs> | 71 </outputs> |
72 <tests> | |
73 <test> | |
74 <param name="mode" value="TRUE"/> | |
75 <conditional name="paired_cond"> | |
76 <param name="paired_select" value="TRUE"/> | |
77 <param name="reads"> | |
78 <collection type="paired"> | |
79 <element name="forward" value="F3D0_S188_L001_R1_001.fastq.gz" ftype="fastqsanger.gz"/> | |
80 <element name="reverse" value="F3D0_S188_L001_R2_001.fastq.gz" ftype="fastqsanger.gz"/> | |
81 </collection> | |
82 </param> | |
83 </conditional> | |
84 <output name="output" value="qualityProfileMultiple.pdf" ftype="pdf"/> | |
85 </test> | |
86 <test> | |
87 <param name="mode" value="FALSE"/> | |
88 <param name="reads" value="F3D0_S188_L001_R1_001.fastq.gz,F3D0_S188_L001_R2_001.fastq.gz" ftype="fastqsanger.gz"/> | |
89 <output name="output" value="qualityProfile.pdf" ftype="pdf"/> | |
90 </test> | |
91 <test> | |
92 <param name="mode" value="FALSE"/> | |
93 <param name="reads" value="F3D0_S188_L001_R1_001.fastq.gz,F3D0_S188_L001_R2_001.fastq.gz" ftype="fastqsanger.gz"/> | |
94 <param name="n" value="10000"/> | |
95 <output name="output" value="qualityProfileSmallSample.pdf" ftype="pdf"/> | |
96 </test> | |
97 </tests> | |
98 <help><![CDATA[ | |
99 Summary | |
100 ....... | |
52 | 101 |
53 <help><![CDATA[ | 102 This function plots a visual summary of the distribution of quality scores as a function of sequence position for the input fastq datasets. |
54 TODO: Fill in help. | 103 |
104 Details | |
105 ....... | |
106 | |
107 The distribution of quality scores at each position is shown as a grey-scale heat map, with dark colors corresponding to higher frequency. The plotted lines show positional summary statistics: green is the mean, orange is the median, and the dashed orange lines are the 25th and 75th quantiles. If the sequences vary in length, a red line will be plotted showing the percentage of reads that extend | |
108 to at least that position. | |
109 | |
110 Note this tool ignores the pairing of the reads, but the data is just processed as list. | |
55 ]]></help> | 111 ]]></help> |
56 <expand macro="citations"/> | 112 <expand macro="citations"/> |
57 </tool> | 113 </tool> |