comparison dada2_filterAndTrim.xml @ 6:34e55239e68b draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit ea6c9c638e742c097b0ef294161eeea447c09e06
author iuc
date Fri, 30 Jun 2023 07:56:47 +0000
parents 23fc35093b11
children 7434cc396c7b
comparison
equal deleted inserted replaced
5:a9f4a217dcd6 6:34e55239e68b
1 <tool id="dada2_filterAndTrim" name="dada2: filterAndTrim" version="@DADA2_VERSION@+galaxy@WRAPPER_VERSION@" profile="19.09"> 1 <tool id="dada2_filterAndTrim" name="dada2: filterAndTrim" version="@DADA2_VERSION@+galaxy@WRAPPER_VERSION@" profile="19.09">
2 <description>Filter and trim short read data</description> 2 <description>Filter and trim short read data</description>
3 <macros> 3 <macros>
4 <import>macros.xml</import> 4 <import>macros.xml</import>
5 </macros> 5 </macros>
6 <expand macro="bio_tools"/>
6 <expand macro="requirements"/> 7 <expand macro="requirements"/>
7 <expand macro="stdio"/> 8 <expand macro="stdio"/>
8 <expand macro="version_command"/> 9 <expand macro="version_command"/>
9 <command detect_errors="exit_code"><![CDATA[ 10 <command detect_errors="exit_code"><![CDATA[
10 Rscript '$dada2_script' 11 Rscript '$dada2_script'
11 ]]></command> 12 ]]></command>
12 <configfiles> 13 <configfiles>
13 <configfile name="dada2_script"><![CDATA[ 14 <configfile name="dada2_script"><![CDATA[
15 #if $paired_cond.paired_select == "paired"
16 #set $compress_output = str($paired_cond.reads.forward.ext.endswith('gz')).upper()
17 #else
18 #set $compress_output = str($paired_cond.reads.ext.endswith('gz')).upper()
19 #end if
14 truncQ <- c($trim.truncQ) 20 truncQ <- c($trim.truncQ)
15 truncLen <- c($trim.truncLen) 21 truncLen <- c($trim.truncLen)
16 trimLeft <- c($trim.trimLeft) 22 trimLeft <- c($trim.trimLeft)
17 trimRight <- c($trim.trimRight) 23 trimRight <- c($trim.trimRight)
18 #if str($filter.maxLen) == "" 24 #if str($filter.maxLen) == ""
73 orientFwd <- "$orientFwd" 79 orientFwd <- "$orientFwd"
74 #end if 80 #end if
75 81
76 library(dada2, quietly=T) 82 library(dada2, quietly=T)
77 83
78 ftout <- filterAndTrim(fwd, filt.fwd, rev, filt.rev, compress = TRUE, 84 ftout <- filterAndTrim(fwd, filt.fwd, rev, filt.rev, compress = $compress_output,
79 truncQ = truncQ, truncLen = truncLen, trimLeft = trimLeft, trimRight = trimRight, maxLen = maxLen, 85 truncQ = truncQ, truncLen = truncLen, trimLeft = trimLeft, trimRight = trimRight, maxLen = maxLen,
80 minLen = minLen, maxN = maxN, minQ = minQ, maxEE = maxEE, rm.lowcomplex = $rmlowcomplex, 86 minLen = minLen, maxN = maxN, minQ = minQ, maxEE = maxEE, rm.lowcomplex = $rmlowcomplex,
81 rm.phix = $rmPhiX, orient.fwd = orientFwd) 87 rm.phix = $rmPhiX, orient.fwd = orientFwd)
82 88
83 rownames(ftout) <- c( '$paired_cond.reads.element_identifier' ) 89 rownames(ftout) <- c( '$paired_cond.reads.element_identifier' )
108 <param name="rmlowcomplex" argument="rm.lowcomplex" type="integer" value="0" min="0" label="Low complexity filter kmer threshold" help="see below"/> 114 <param name="rmlowcomplex" argument="rm.lowcomplex" type="integer" value="0" min="0" label="Low complexity filter kmer threshold" help="see below"/>
109 <param name="orientFwd" argument="orient.fwd" type="text" value="" optional="true" label="String present at the start of valid reads" help="see below"/> 115 <param name="orientFwd" argument="orient.fwd" type="text" value="" optional="true" label="String present at the start of valid reads" help="see below"/>
110 <param name="output_statistics" truevalue="TRUE" falsevalue="FALSE" type="boolean" checked="true" label="Output statistics" help="Create extra table with the number of reads pre and post filtering" /> 116 <param name="output_statistics" truevalue="TRUE" falsevalue="FALSE" type="boolean" checked="true" label="Output statistics" help="Create extra table with the number of reads pre and post filtering" />
111 </inputs> 117 </inputs>
112 <outputs> 118 <outputs>
113 <collection name="paired_output" type="paired" format_source="reads['forward']"> 119 <collection name="paired_output" type="paired" format_source="reads['forward']" label="${tool.name} on ${on_string}: Paired reads" >
114 <filter>paired_cond['paired_select'] == "paired"</filter> 120 <filter>paired_cond['paired_select'] == "paired"</filter>
115 </collection> 121 </collection>
116 <data name="output_single" format_source="reads" > 122 <data name="output_single" format_source="reads" label="${tool.name} on ${on_string}: Reads" >
117 <filter>paired_cond['paired_select'] == "single"</filter> 123 <filter>paired_cond['paired_select'] == "single"</filter>
118 </data> 124 </data>
119 <data name="output_fwd" format_source="reads" label="${tool.name} on ${on_string}: Forward reads" > 125 <data name="output_fwd" format_source="reads" label="${tool.name} on ${on_string}: Forward reads" >
120 <filter>paired_cond['paired_select'] == "separate"</filter> 126 <filter>paired_cond['paired_select'] == "separate"</filter>
121 </data> 127 </data>
222 <param name="seprev_cond|filter|minQ" value="13" /> 228 <param name="seprev_cond|filter|minQ" value="13" />
223 <param name="seprev_cond|filter|maxEE" value="1" /> 229 <param name="seprev_cond|filter|maxEE" value="1" />
224 <param name="output_statistics" value="FALSE" /> 230 <param name="output_statistics" value="FALSE" />
225 <output_collection name="paired_output" type="paired" count="2"/> 231 <output_collection name="paired_output" type="paired" count="2"/>
226 </test> 232 </test>
233 <!-- paired data in paired collection with uncompressed input -->
234 <test expect_num_outputs="4">
235 <conditional name="paired_cond">
236 <param name="paired_select" value="paired"/>
237 <param name="reads">
238 <collection type="paired">
239 <element name="forward" value="F3D0_S188_L001_R1_001.fastq" ftype="fastqsanger"/>
240 <element name="reverse" value="F3D0_S188_L001_R2_001.fastq" ftype="fastqsanger"/>
241 </collection>
242 </param>
243 </conditional>
244 <output_collection name="paired_output" type="paired" count="2">
245 <element name="forward" value="filterAndTrim_F3D0_R1.fq" ftype="fastqsanger" />
246 <element name="reverse" value="filterAndTrim_F3D0_R2.fq" ftype="fastqsanger" />
247 </output_collection>
248 <output name="outtab" value="F3D0_S188_L001_R1_001.tab" ftype="tabular" lines_diff="2">
249 <assert_contents>
250 <has_text text="745" />
251 <has_text text="750" />
252 </assert_contents>
253 </output>
254 </test>
227 255
228 <!-- test failure in case all reads are filtered --> 256 <!-- test failure in case all reads are filtered -->
229 <test expect_exit_code="1" expect_failure="true"> 257 <test expect_exit_code="1" expect_failure="true">
230 <conditional name="paired_cond" > 258 <conditional name="paired_cond" >
231 <param name="paired_select" value="paired"/> 259 <param name="paired_select" value="paired"/>