Mercurial > repos > matthias > dada2_filterandtrim
changeset 6:37305bbf8f44 draft
planemo upload for repository https://github.com/bernt-matthias/mb-galaxy-tools/tree/topic/dada2/tools/dada2 commit 72e787011111e0262b8161c3834a6258d7b667bc
author | matthias |
---|---|
date | Tue, 07 May 2019 10:30:34 -0400 |
parents | ea57169fd0d0 |
children | 146bee188fdf |
files | dada2_filterAndTrim.xml |
diffstat | 1 files changed, 54 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/dada2_filterAndTrim.xml Sun May 05 12:28:14 2019 -0400 +++ b/dada2_filterAndTrim.xml Tue May 07 10:30:34 2019 -0400 @@ -28,7 +28,7 @@ #else: maxEE <- c($filter.maxEE) #end if -#if $paired_cond.paired_select == "TRUE" and $seprev_cond.seprev_select == "yes" +#if $paired_cond.paired_select != "single" and $seprev_cond.seprev_select == "yes" truncQ <- c(truncQ,$seprev_cond.trim.truncQ) truncLen <- c(truncLen,$seprev_cond.trim.truncLen) trimLeft <- c(trimLeft,$seprev_cond.trim.trimLeft) @@ -52,14 +52,19 @@ rev <- NULL filt.fwd <- NULL filt.rev <- NULL -#if $paired_cond.paired_select == "TRUE" +#if $paired_cond.paired_select == "paired" fwd <- c(fwd, '$paired_cond.reads.forward') rev <- c(rev, '$paired_cond.reads.reverse') filt.fwd <- c(filt.fwd, '$paired_output.forward') filt.rev <- c(filt.rev, '$paired_output.reverse') +#else if $paired_cond.paired_select == "separate" + fwd <- c(fwd, '$paired_cond.forward') + rev <- c(rev, '$paired_cond.reverse') + filt.fwd <- c(filt.fwd, '$output_fwd') + filt.rev <- c(filt.rev, '$output_rev') #else fwd <- c(fwd, '$paired_cond.reads') - filt.fwd <- c(filt.fwd, '$output') + filt.fwd <- c(filt.fwd, '$output_single') #end if library(dada2, quietly=T) @@ -68,20 +73,29 @@ truncQ = truncQ, truncLen = truncLen, trimLeft = trimLeft, trimRight = trimRight, maxLen = maxLen, minLen = minLen, maxN = maxN, minQ = minQ, maxEE = maxEE, rm.phix = $rmPhiX, orient.fwd = '$orientFwd') -rownames(ftout) <- c( '$paired_cond.reads.element_identifier' ) +#if $paired_cond.paired_select == "separate": + rownames(ftout) <- c( '$paired_cond.forward.element_identifier' ) +#else: + rownames(ftout) <- c( '$paired_cond.reads.element_identifier' ) +#end if write.table(ftout, "$outtab", quote=F, sep="\t", col.names=NA) ]]></configfile> </configfiles> <inputs> <conditional name="paired_cond"> <param name="paired_select" type="select" label="Paired reads"> - <option value="TRUE">yes</option> - <option value="FALSE">no</option> + <option value="paired">paired - in a data set pair</option> + <option value="separate">paired - in two separate data sets</option> + <option value="single">single</option> </param> - <when value="TRUE"> + <when value="paired"> <param name="reads" argument="fwd/rev" type="data_collection" collection_type="paired" format="fastqsanger,fastqsanger.gz" label="Paired short read data"/> </when> - <when value="FALSE"> + <when value="separate"> + <param name="forward" argument="fwd" type="data" format="fastqsanger,fastqsanger.gz" label="Forward read data"/> + <param name="reverse" argument="rev" type="data" format="fastqsanger,fastqsanger.gz" label="Reverse read data"/> + </when> + <when value="single"> <param name="reads" argument="fwd" type="data" format="fastqsanger,fastqsanger.gz" label="Short read data"/> </when> </conditional> @@ -106,10 +120,16 @@ <collection name="paired_output" type="paired"> <data name="forward" format="fastqsanger.gz" /> <data name="reverse" format="fastqsanger.gz" /> - <filter>paired_cond['paired_select'] == "TRUE"</filter> + <filter>paired_cond['paired_select'] == "paired"</filter> </collection> - <data name="output" format="fastqsanger.gz" > - <filter>paired_cond['paired_select'] == "FALSE"</filter> + <data name="output_single" format="fastqsanger.gz" > + <filter>paired_cond['paired_select'] == "single"</filter> + </data> + <data name="output_fwd" format="fastqsanger.gz" label="${tool.name} on ${on_string}: Forward reads" > + <filter>paired_cond['paired_select'] == "separate"</filter> + </data> + <data name="output_rev" format="fastqsanger.gz" label="${tool.name} on ${on_string}: Reverse reads" > + <filter>paired_cond['paired_select'] == "separate"</filter> </data> <data name="outtab" format="tabular" label="${tool.name} on ${on_string}: Statistics"> <filter>output_statistics</filter> @@ -120,7 +140,7 @@ currently removed `expect_num_outputs="2"` because of https://github.com/galaxyproject/galaxy/pull/7894--> <test> <conditional name="paired_cond"> - <param name="paired_select" value="TRUE"/> + <param name="paired_select" value="paired"/> <param name="reads"> <collection type="paired"> <element name="forward" value="F3D0_S188_L001_R1_001.fastq.gz" ftype="fastqsanger.gz"/> @@ -134,19 +154,30 @@ </output_collection> <output name="outtab" value="filterAndTrim_F3D0.tab" ftype="tabular"/> </test> + <!-- separate paired data --> + <test> + <conditional name="paired_cond"> + <param name="paired_select" value="separate"/> + <param name="forward" value="F3D0_S188_L001_R1_001.fastq.gz" ftype="fastqsanger.gz"/> + <param name="reverse" value="F3D0_S188_L001_R2_001.fastq.gz" ftype="fastqsanger.gz"/> + </conditional> + <output name="output_fwd" value="filterAndTrim_F3D0_R1.fq.gz" ftype="fastqsanger.gz" /> + <output name="output_rev" value="filterAndTrim_F3D0_R2.fq.gz" ftype="fastqsanger.gz" /> + <output name="outtab" value="filterAndTrim_F3D0.tab" ftype="tabular" compare="sim_size"/> + </test> <!-- single end data --> <test expect_num_outputs="1"> <conditional name="paired_cond"> - <param name="paired_select" value="FALSE"/> + <param name="paired_select" value="single"/> <param name="reads" value="F3D0_S188_L001_R1_001.fastq.gz" ftype="fastqsanger.gz"/> </conditional> <param name="output_statistics" value="FALSE" /> - <output name="output" value="filterAndTrim_single_F3D0_R1.fq.gz" ftype="fastqsanger.gz" /> + <output name="output_fwd" value="filterAndTrim_single_F3D0_R1.fq.gz" ftype="fastqsanger.gz" /> </test> <!-- single end data trimming --> <test expect_num_outputs="1"> <conditional name="paired_cond"> - <param name="paired_select" value="FALSE"/> + <param name="paired_select" value="single"/> <param name="reads" value="F3D0_S188_L001_R1_001.fastq.gz" ftype="fastqsanger.gz"/> </conditional> <param name="trim|truncQ" value="30" /> @@ -154,12 +185,12 @@ <param name="trim|trimRight" value="2" /> <param name="trim|truncLen" value="2" /> <param name="output_statistics" value="FALSE" /> - <output name="output" value="filterAndTrim_single_trimmers_F3D0_R1.fq.gz" ftype="fastqsanger.gz" /> + <output name="output_fwd" value="filterAndTrim_single_trimmers_F3D0_R1.fq.gz" ftype="fastqsanger.gz" /> </test> <!-- single end data filtering --> <test expect_num_outputs="1"> <conditional name="paired_cond"> - <param name="paired_select" value="FALSE"/> + <param name="paired_select" value="single"/> <param name="reads" value="F3D0_S188_L001_R1_001.fastq.gz" ftype="fastqsanger.gz"/> </conditional> <param name="filter|maxLen" value="255" /> @@ -168,13 +199,13 @@ <param name="filter|minQ" value="13" /> <param name="filter|maxEE" value="1" /> <param name="output_statistics" value="FALSE" /> - <output name="output" value="filterAndTrim_single_filters_F3D0_R1.fq.gz" ftype="fastqsanger.gz" /> + <output name="output_fwd" value="filterAndTrim_single_filters_F3D0_R1.fq.gz" ftype="fastqsanger.gz" /> </test> <!-- paired data w separate filters and trimmers for reverse currently removed `expect_num_outputs="1"` because of https://github.com/galaxyproject/galaxy/pull/7894--> <test> <conditional name="paired_cond"> - <param name="paired_select" value="TRUE"/> + <param name="paired_select" value="paired"/> <param name="reads"> <collection type="paired"> <element name="forward" value="F3D0_S188_L001_R1_001.fastq.gz" ftype="fastqsanger.gz"/> @@ -201,12 +232,14 @@ Description ........... -Filters and trims an input FASTQ dataset (can be compressed) based on several user-definable criteria, and outputs a compressed FASTQ data set containing those trimmed reads which passed the filters. For paired end data forward and reverse FASTQ datasets can be provided as pair of FASTQ datasets, in which case filtering is performed on the forward and reverse reads independently, and both reads must pass for the read pair to be in the output. +Filters and trims a FASTQ dataset (can be compressed) based on several user-definable criteria, and outputs a compressed FASTQ data set containing those trimmed reads which passed the filters. For paired end data forward and reverse FASTQ datasets can be provided as pair of FASTQ datasets (or two separate data sets), in which case filtering is performed on the forward and reverse reads independently, and both reads must pass for the read pair to be in the output. Usage ..... -**Input** is a FASTQ dataset (or a pair on case of paired end data) containing all reads of a sample. If you have multiple samples it is suggested to organize them in a (paired) collection. The **output** is a (paired) collection of filtered and trimmed paired FASTQ datasets (again one data set or pair per sample). +**Input** is a FASTQ dataset (or a pair in case of paired end data) containing all reads of a sample. It is suggested to organize them in a (paired) collection (in particular if you have multiple samples). + +**Output** is a (paired) collection of filtered and trimmed paired FASTQ datasets (again one data set or pair per sample). Upstream dada2 tools are *dada2: derepFastq* and *dada2: learnErrorRates*. Note that these tools do not work on paired end data. So, if you have paired end data you need to split the generated paired collection into one containing the forward reads and one containing the reverse reads. This can be done by the *unzip collection* tool.