Mercurial > repos > matthias > dada2_learnerrors
comparison dada2_learnErrors.xml @ 0:56d5be6c03b9 draft
planemo upload for repository https://github.com/bernt-matthias/mb-galaxy-tools/tree/topic/dada2/tools/dada2 commit d63c84012410608b3b5d23e130f0beff475ce1f8-dirty
| author | matthias |
|---|---|
| date | Fri, 08 Mar 2019 06:30:11 -0500 |
| parents | |
| children | 57eb7437f646 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:56d5be6c03b9 |
|---|---|
| 1 <tool id="dada2_learnErrors" name="dada2: learnErrors" version="@DADA2_VERSION@"> | |
| 2 <description>Learn Error rates</description> | |
| 3 <macros> | |
| 4 <import>macros.xml</import> | |
| 5 </macros> | |
| 6 <expand macro="requirements"/> | |
| 7 <expand macro="version_command"/> | |
| 8 <command detect_errors="exit_code"><![CDATA[ | |
| 9 #for $read in $reads: | |
| 10 ln -s '$read' '$read.element_identifier' && | |
| 11 #end for | |
| 12 mkdir '$errors.extra_files_path' && | |
| 13 Rscript '$dada2_script' \${GALAXY_SLOTS:-1} | |
| 14 ]]></command> | |
| 15 <configfiles> | |
| 16 <configfile name="dada2_script"><![CDATA[ | |
| 17 library(ggplot2, quietly=T) | |
| 18 library(dada2, quietly=T) | |
| 19 | |
| 20 args <- commandArgs(trailingOnly = TRUE) | |
| 21 nthreads <- as.integer(args[1]) | |
| 22 | |
| 23 files <- c() | |
| 24 #for $read in $reads: | |
| 25 files <- c(files, '$read.element_identifier') | |
| 26 #end for | |
| 27 | |
| 28 err <- learnErrors(files, nbases = 10**$nbases, | |
| 29 errorEstimationFunction = $advanced.errfoo, multithread = nthreads, | |
| 30 randomize = $advanced.randomize, MAX_CONSIST = $advanced.maxconsist, OMEGA_C = $advanced.omegac) | |
| 31 | |
| 32 write.table(err\$err_out, file = '$errors', quote = F, sep = "\t", row.names = T, col.names = F) | |
| 33 saveRDS(err, file=file.path('$errors.extra_files_path', "Rdata")) | |
| 34 | |
| 35 | |
| 36 ## generate error plots | |
| 37 plot <- plotErrors(err, obs = $plotopt.obs, err_out = $plotopt.errout, err_in = $plotopt.errin, nominalQ = $plotopt.nominalQ) | |
| 38 ggsave('output.pdf', plot, width = 20,height = 15,units = c("cm")) | |
| 39 ]]></configfile> | |
| 40 </configfiles> | |
| 41 <inputs> | |
| 42 <param name="reads" type="data" multiple="true" format="fastqsanger,fastqsanger.gz" label="Short read data" help="forward or reverse reads should be processed separately"/> | |
| 43 <param name="nbases" type="integer" value="8" min="0" label="Magnitide of number of bases to use for learning" help=""/> | |
| 44 <section name="advanced" title="Advanced Option"> | |
| 45 <expand macro="errorEstimationFunction"/> | |
| 46 <param name="randomize" type="boolean" checked="false" truevalue="TRUE" falsevalue="FALSE" label="randomize samples"/> | |
| 47 <param name="maxconsist" type="integer" value="10" min="0" label="maximum number of times to step through the selfconsistency loop" help=""/> | |
| 48 <param name="omegac" type="integer" value="0" min="0" label="threshold at which unique sequences inferred to contain errors are corrected" help=""/> | |
| 49 </section> | |
| 50 <section name="plotopt" title="Plotting Option"> | |
| 51 <param name="obs" type="boolean" checked="true" truevalue="TRUE" falsevalue="FALSE" label="plot observed error rates"/> | |
| 52 <param name="errout" type="boolean" checked="true" truevalue="TRUE" falsevalue="FALSE" label="plot output error rates"/> | |
| 53 <param name="errin" type="boolean" checked="false" truevalue="TRUE" falsevalue="FALSE" label="plot input error rates"/> | |
| 54 <param name="nominalQ" type="boolean" checked="true" truevalue="TRUE" falsevalue="FALSE" label="plot observed error rates"/> | |
| 55 </section> | |
| 56 | |
| 57 </inputs> | |
| 58 <outputs> | |
| 59 <data name="errors" format="dada2_errorrates" label="${tool.name} on ${on_string}"/> | |
| 60 <data name="output" format="pdf" from_work_dir="output.pdf" label="${tool.name} on ${on_string}: error rates plot"/> | |
| 61 </outputs> | |
| 62 | |
| 63 <help><![CDATA[ | |
| 64 TODO: Fill in help. | |
| 65 ]]></help> | |
| 66 <expand macro="citations"/> | |
| 67 </tool> |
