comparison dada2_plotQualityProfile.xml @ 3:cf166b8a8e27 draft

planemo upload for repository https://github.com/bernt-matthias/mb-galaxy-tools/tree/topic/dada2/tools/dada2 commit 5b1603bbcd3f139cad5c876be83fcb39697b5613-dirty
author matthias
date Mon, 29 Apr 2019 08:57:18 -0400
parents 4095456821e2
children 863ebf0d28d5
comparison
equal deleted inserted replaced
2:4095456821e2 3:cf166b8a8e27
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 "batch" in $paired_cond.paired_select 14 #if "batch" in str($paired_cond.paired_select)
15 #if "single" in $paired_cond.paired_select 15 #if "single" in str($paired_cond.paired_select)
16 files = c(files, '$reads') 16 files = c(files, '$paired_cond.reads')
17 #else 17 #else
18 files = c(files, '$reads.forward') 18 files = c(files, '$paired_cond.reads.forward')
19 files = c(files, '$reads.reverse') 19 files = c(files, '$paired_cond.reads.reverse')
20 #end if 20 #end if
21 #else 21 #else
22 #for $read in $paired_cond.reads: 22 #for $read in $paired_cond.reads:
23 #if $paired_cond.paired_select == "no" 23 #if "single" in str($paired_cond.paired_select)
24 files = c(files, '$read') 24 files = c(files, '$read')
25 #else 25 #else
26 files = c(files, '$read.forward') 26 files = c(files, '$read.forward')
27 files = c(files, '$read.reverse') 27 files = c(files, '$read.reverse')
28 #end if 28 #end if
29 #end for 29 #end for
30 #end if 30 #end if
31
32 31
33 library(ggplot2, quietly=T) 32 library(ggplot2, quietly=T)
34 library(dada2, quietly=T) 33 library(dada2, quietly=T)
35 34
36 qp <- plotQualityProfile(files, 35 qp <- plotQualityProfile(files,
37 #if str($n) != "" 36 #if str($n) != ""
38 n=$n, 37 n=$n,
39 #end if 38 #end if
40 aggregate = $mode) 39 aggregate = $aggregate)
41 40
42 ggsave('output.pdf', qp, width = 20,height = 15,units = c("cm")) 41 ggsave('output.pdf', qp, width = 20,height = 15,units = c("cm"))
43 ]]></configfile> 42 ]]></configfile>
44 </configfiles> 43 </configfiles>
45 <inputs> 44 <inputs>
46 <conditional name="paired_cond"> 45 <conditional name="paired_cond">
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"> 46 <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">
48 <option value="paired">paired - non batch</option> 47 <option value="paired">paired - non batch</option>
49 <option value="single">single - non batch</option> 48 <option value="single">single - non batch</option>
50 <option value="paired_batch">paired - batch</option> 49 <option value="paired_batch">paired - batch</option>
51 <option value="single_batch">single - batch</option> 50 <option value="single_batch">single - batch</option>
52 </param> 51 </param>
53 <when value="paired"> 52 <when value="paired">
54 <param name="reads" type="data_collection" collection_type="list:paired" format="fastqsanger,fastqsanger.gz" label="Short read data"/> 53 <param name="reads" type="data_collection" collection_type="list:paired" format="fastqsanger,fastqsanger.gz" label="Short read data"/>
55 </when> 54 </when>
56 <when value="single"> 55 <when value="single">
57 <param name="reads" type="data" multiple="true" format="fastqsanger,fastqsanger.gz" label="Short read data"/> 56 <param name="reads" type="data" multiple="true" format="fastqsanger,fastqsanger.gz" label="Short read data"/>
58 </when> 57 </when>
59 <when value="paired_batch"> 58 <when value="paired_batch">
60 <param name="reads" type="data_collection" collection_type="paired" format="fastqsanger,fastqsanger.gz" label="Short read data"/> 59 <param name="reads" type="data_collection" collection_type="paired" format="fastqsanger,fastqsanger.gz" label="Short read data"/>
61 </when> 60 </when>
62 <when value="single_batch"> 61 <when value="single_batch">
63 <param name="reads" type="data" format="fastqsanger,fastqsanger.gz" label="Short read data"/> 62 <param name="reads" type="data" format="fastqsanger,fastqsanger.gz" label="Short read data"/>
64 </when> 63 </when>
65 </conditional> 64 </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"/> 65 <param argument="aggregate" 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"/>
67 <param name="n" type="integer" optional="true" label="sample number" help="number of records to sample from the fastq file (default 500.000)"/> 66 <param argument="n" type="integer" value="500000" label="sample number" help="number of records to sample from the fastq file"/>
68 </inputs> 67 </inputs>
69 <outputs> 68 <outputs>
70 <data name="output" format="pdf" from_work_dir="output.pdf"/> 69 <data name="output" format="pdf" from_work_dir="output.pdf"/>
71 </outputs> 70 </outputs>
72 <tests> 71 <tests>
72 <!-- paired non-batch, aggregate -->
73 <test> 73 <test>
74 <param name="mode" value="TRUE"/> 74 <param name="aggregate" value="TRUE"/>
75 <conditional name="paired_cond"> 75 <param name="paired_cond|paired_select" value="paired"/>
76 <param name="paired_select" value="TRUE"/> 76 <param name="paired_cond|reads">
77 <param name="reads"> 77 <collection type="list:paired">
78 <collection type="paired"> 78 <element name="F3D0_S188_L001">
79 <element name="forward" value="F3D0_S188_L001_R1_001.fastq.gz" ftype="fastqsanger.gz"/> 79 <collection type="paired">
80 <element name="reverse" value="F3D0_S188_L001_R2_001.fastq.gz" ftype="fastqsanger.gz"/> 80 <element name="forward" value="F3D0_S188_L001_R1_001.fastq.gz" ftype="fastqsanger.gz"/>
81 </collection> 81 <element name="reverse" value="F3D0_S188_L001_R2_001.fastq.gz" ftype="fastqsanger.gz"/>
82 </param> 82 </collection>
83 </conditional> 83 </element>
84 </collection>
85 </param>
84 <output name="output" value="qualityProfileMultiple.pdf" ftype="pdf"/> 86 <output name="output" value="qualityProfileMultiple.pdf" ftype="pdf"/>
85 </test> 87 </test>
88 <!-- paired, batch, no aggregate-->
86 <test> 89 <test>
87 <param name="mode" value="FALSE"/> 90 <param name="aggregate" value="FALSE"/>
88 <param name="reads" value="F3D0_S188_L001_R1_001.fastq.gz,F3D0_S188_L001_R2_001.fastq.gz" ftype="fastqsanger.gz"/> 91 <param name="paired_cond|paired_select" value="paired_batch"/>
92 <param name="paired_cond|reads">
93 <collection type="paired">
94 <element name="forward" value="F3D0_S188_L001_R1_001.fastq.gz" ftype="fastqsanger.gz"/>
95 <element name="reverse" value="F3D0_S188_L001_R2_001.fastq.gz" ftype="fastqsanger.gz"/>
96 </collection>
97 </param>
89 <output name="output" value="qualityProfile.pdf" ftype="pdf"/> 98 <output name="output" value="qualityProfile.pdf" ftype="pdf"/>
90 </test> 99 </test>
100 <!-- single, non-batch, aggregate -->
91 <test> 101 <test>
92 <param name="mode" value="FALSE"/> 102 <param name="aggregate" value="TRUE"/>
93 <param name="reads" value="F3D0_S188_L001_R1_001.fastq.gz,F3D0_S188_L001_R2_001.fastq.gz" ftype="fastqsanger.gz"/> 103 <param name="paired_cond|paired_select" value="single"/>
104 <param name="paired_cond|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"/> 105 <param name="n" value="10000"/>
95 <output name="output" value="qualityProfileSmallSample.pdf" ftype="pdf"/> 106 <output name="output" value="qualityProfileSmallSample.pdf" ftype="pdf"/>
96 </test> 107 </test>
97 </tests> 108 <!-- single, batch, no aggregate -->
109 <test>
110 <param name="aggregate" value="FALSE"/>
111 <param name="paired_cond|paired_select" value="single_batch"/>
112 <param name="paired_cond|reads" value="F3D0_S188_L001_R1_001.fastq.gz" ftype="fastqsanger.gz"/>
113 <param name="n" value="10000"/>
114 <output name="output" value="qualityProfileSmallSample.pdf" ftype="pdf" compare="sim_size"/>
115 </test> </tests>
98 <help><![CDATA[ 116 <help><![CDATA[
99 Summary 117 Summary
100 ....... 118 .......
101 119
102 This function plots a visual summary of the distribution of quality scores as a function of sequence position for the input fastq datasets. 120 This function plots a visual summary of the distribution of quality scores as a function of sequence position for the input fastq datasets.