comparison dada2_dada.xml @ 2:2222f08c8316 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f2a33fe115fef9d711112b53136cf7619f1b19be"
author iuc
date Mon, 16 Mar 2020 07:34:56 -0400
parents 6b4ddc3b64bd
children 84fd33a60b35
comparison
equal deleted inserted replaced
1:6b4ddc3b64bd 2:2222f08c8316
20 args <- commandArgs(trailingOnly = TRUE) 20 args <- commandArgs(trailingOnly = TRUE)
21 nthreads <- as.integer(args[1]) 21 nthreads <- as.integer(args[1])
22 22
23 derep <- c() 23 derep <- c()
24 #if $batch_cond.batch_select == "no" 24 #if $batch_cond.batch_select == "no"
25 ids<-c()
25 #for $d in $batch_cond.derep: 26 #for $d in $batch_cond.derep:
26 derep <- c(derep, '$d') 27 derep <- c(derep, '$d')
28 ids <- c(ids, '$d.element_identifier')
27 #end for 29 #end for
30 names(derep) <- ids
28 #else 31 #else
29 derep <- c(derep, '$batch_cond.derep') 32 derep <- c(derep, '$batch_cond.derep')
30 #end if 33 #end if
31 34
32 err <- readRDS('$err') 35 err <- readRDS('$err')
48 ## - selfConsist = $selfconsist 51 ## - selfConsist = $selfconsist
49 ## since they are probably not relevant for the end user 52 ## since they are probably not relevant for the end user
50 dada_result <- dada(derep, err, 53 dada_result <- dada(derep, err,
51 pool = pool, multithread = nthreads) 54 pool = pool, multithread = nthreads)
52 55
56 ## in non batch mode the results of the samples are stored in a list
57 ## (of dada class objects) these are stored in separate files (which
58 ## then go into a collection).
59 ## special case: for 1 sample the dada_result is not a list of dada
60 ## objects but it is a dada object
53 #if $batch_cond.batch_select == "no": 61 #if $batch_cond.batch_select == "no":
54 #if len($batch_cond.derep) > 1: 62 #if len($batch_cond.derep) > 1:
55 for( id in names(dada_result) ){ 63 for( id in names(dada_result) ){
56 saveRDS(dada_result[[id]], file=file.path("output" ,paste(id, "dada2_dada", sep="."))) 64 saveRDS(dada_result[[id]], file=file.path("output" ,paste(id, "dada2_dada", sep=".")))
57 } 65 }
97 <filter>batch_cond['batch_select']=="no"</filter> 105 <filter>batch_cond['batch_select']=="no"</filter>
98 </collection> 106 </collection>
99 </outputs> 107 </outputs>
100 <tests> 108 <tests>
101 <!-- default, non batch --> 109 <!-- default, non batch -->
102 <test> 110 <test expect_num_outputs="1">
103 <param name="batch_cond|batch_select" value="no"/> 111 <param name="batch_cond|batch_select" value="no"/>
104 <param name="batch_cond|derep" value="filterAndTrim_F3D0_R1.fq.gz" ftype="fastq.gz" /> 112 <param name="batch_cond|derep" value="filterAndTrim_F3D0_R1.fq.gz,filterAndTrim_F3D141_R1.fq.gz" ftype="fastq.gz" />
105 <param name="err" value="learnErrors_F3D0_R1.Rdata" ftype="dada2_errorrates" /> 113 <param name="err" value="learnErrors_R1.Rdata" ftype="dada2_errorrates" />
106 <output_collection name="data_collection" type="list"> 114 <output_collection name="data_collection" type="list">
107 <element name="filterAndTrim_F3D0_R1.fq.gz" file="dada_F3D0_R1.Rdata" ftype="dada2_dada" compare="sim_size" delta="10000"/> 115 <element name="filterAndTrim_F3D0_R1.fq.gz" file="dada_F3D0_S188_L001_R1.Rdata" ftype="dada2_dada" compare="sim_size" delta="10000"/>
116 <element name="filterAndTrim_F3D141_R1.fq.gz" file="dada_F3D141_S207_L001_R1.Rdata" ftype="dada2_dada" compare="sim_size" delta="10000"/>
108 </output_collection> 117 </output_collection>
109 </test> 118 </test>
110 <!-- default, batch --> 119 <!-- default, batch -->
111 <test> 120 <test expect_num_outputs="1">
112 <param name="batch_cond|batch_select" value="yes"/> 121 <param name="batch_cond|batch_select" value="yes"/>
113 <param name="batch_cond|derep" value="filterAndTrim_F3D0_R1.fq.gz" ftype="fastq.gz" /> 122 <param name="batch_cond|derep" value="filterAndTrim_F3D0_R1.fq.gz" ftype="fastq.gz" />
114 <param name="err" value="learnErrors_F3D0_R1.Rdata" ftype="dada2_errorrates" /> 123 <param name="err" value="learnErrors_R1.Rdata" ftype="dada2_errorrates" />
115 <output name="dada" value="dada_F3D0_R1.Rdata" ftype="dada2_dada" compare="sim_size" delta="10000"/> 124 <output name="dada" value="dada_F3D0_S188_L001_R1.Rdata" ftype="dada2_dada" compare="sim_size" delta="10000"/>
116 </test> 125 </test>
117 <!-- test non-default options --> 126 <!-- test non-default options -->
118 <test> 127 <test expect_num_outputs="1">
119 <param name="batch_cond|batch_select" value="no"/> 128 <param name="batch_cond|batch_select" value="no"/>
120 <param name="batch_cond|derep" value="filterAndTrim_F3D0_R1.fq.gz" ftype="fastq.gz" /> 129 <param name="batch_cond|derep" value="filterAndTrim_F3D0_R1.fq.gz" ftype="fastq.gz" />
121 <param name="batch_cond|pool" value="pseudo"/> 130 <param name="batch_cond|pool" value="pseudo"/>
122 <param name="err" value="learnErrors_F3D0_R1.Rdata" ftype="dada2_errorrates" /> 131 <param name="err" value="learnErrors_R1.Rdata" ftype="dada2_errorrates" />
123 <output_collection name="data_collection" type="list"> 132 <output_collection name="data_collection" type="list">
124 <element name="filterAndTrim_F3D0_R1.fq.gz" file="dada_F3D0_R1.Rdata" ftype="dada2_dada" compare="sim_size" delta="10000"/> 133 <element name="filterAndTrim_F3D0_R1.fq.gz" file="dada_F3D0_S188_L001_R1.Rdata" ftype="dada2_dada" compare="sim_size" delta="10000"/>
125 </output_collection> 134 </output_collection>
126 </test> 135 </test>
127 </tests> 136 </tests>
128 <help><![CDATA[ 137 <help><![CDATA[
129 Description 138 Description