Mercurial > repos > matthias > dada2_learnerrors
comparison macros.xml @ 5:9aeea74a1fc9 draft
planemo upload for repository https://github.com/bernt-matthias/mb-galaxy-tools/tree/topic/dada2/tools/dada2 commit 990192685955e9cda0282e348c28ef6462d88a38
author | matthias |
---|---|
date | Sun, 05 May 2019 12:22:22 -0400 |
parents | 10141f4eaae9 |
children | f9040a48d23f |
comparison
equal
deleted
inserted
replaced
4:9f888de151d1 | 5:9aeea74a1fc9 |
---|---|
23 </citations> | 23 </citations> |
24 </xml> | 24 </xml> |
25 | 25 |
26 <token name="@DADA_UNIQUES@">dada2_derep,dada2_dada,dada2_mergepairs</token> | 26 <token name="@DADA_UNIQUES@">dada2_derep,dada2_dada,dada2_mergepairs</token> |
27 | 27 |
28 <!-- function to read dada2 data types | |
29 - derep, dada, and mergepairs are simply read as RDS | |
30 - sequence_table is a named integer matrix (rows=samples, columns=ASVs) | |
31 - uniques is a named integer vector (columns=ASVs, only one rows)--> | |
28 <token name="@READ_FOO@"><![CDATA[ | 32 <token name="@READ_FOO@"><![CDATA[ |
33 read.uniques <- function ( fname ) { | |
34 p <- read.table(fname, header=F, sep="\t") | |
35 n <-x[,2] | |
36 names(n)<-x[,1] | |
37 } | |
29 #def read_data($dataset) | 38 #def read_data($dataset) |
30 #if $dataset.is_of_type('dada2_derep') | 39 #if $dataset.is_of_type('dada2_sequencetable') |
31 readRDS('$dataset) | 40 t(as.matrix( read.table('$dataset', header=T, sep="\t", row.names=1) )) |
32 #else if $dataset.is_of_type('dada2_dada') | 41 #else if $dataset.is_of_type('dada2_uniques') |
42 read.uniques('$dataset') | |
43 #else if $dataset.is_of_type('tabular') | |
44 read.table('$dataset', header=T, sep="\t", row.names=1) | |
45 #else | |
33 readRDS('$dataset') | 46 readRDS('$dataset') |
34 #else if $dataset.is_of_type('dada2_sequencetable') | |
35 as.matrix( read.table('$dataset', header=T, sep="\t", row.names=1) ) | |
36 #else if $dataset.is_of_type('dada2_mergepairs') | |
37 readRDS('$dataset') | |
38 #else if $dataset.is_of_type('tabular') | |
39 read.table('$dataset', header=T, sep="\t", row.names=1 ) | |
40 #else | |
41 #raise Exception("error: unknown input type") | |
42 #end if | 47 #end if |
43 #end def | 48 #end def |
44 ]]></token> | 49 ]]></token> |
50 <!-- function to write dada2 data types (the content or the R variable 'out' is written) | |
51 - derep, dada, and mergepairs are written as RDS | |
52 - sequence_table is a named integer matrix (rows=samples, columns=ASVs) | |
53 - uniques is a named integer vector (columns=ASVs, only one rows)--> | |
54 <token name="@WRITE_FOO@"><![CDATA[ | |
55 write.data <- function( data, fname, type ){ | |
56 if( type == 'dada2_uniques'){ | |
57 write.table(data, file = fname, quote = F, sep = "\t", row.names = T, col.names = F) | |
58 }else if( type== 'dada2_sequencetable'){ | |
59 write.table(t(data), file=fname, quote=F, sep="\t", row.names = T, col.names = NA) | |
60 }else{ | |
61 saveRDS(data, file=fname) | |
62 } | |
63 } | |
64 ]]></token> | |
65 | |
45 <!-- for filterAndTrim --> | 66 <!-- for filterAndTrim --> |
46 <xml name="trimmers"> | 67 <xml name="trimmers"> |
47 <section name="trim" title="Trimming parameters"> | 68 <section name="trim" title="Trimming parameters"> |
48 <param argument="truncQ" type="integer" value="2" min="0" label="Truncate reads at quality threshold" help="Truncate reads at the first instance of a quality score less than or equal to this threshold"/> | 69 <param argument="truncQ" type="integer" value="2" min="0" label="Truncate reads at quality threshold" help="Truncate reads at the first instance of a quality score less than or equal to this threshold"/> |
49 <param argument="trimLeft" type="integer" value="0" min="0" label="Trim start of each read" help="The number of nucleotides to remove from the start of each read."/> | 70 <param argument="trimLeft" type="integer" value="0" min="0" label="Trim start of each read" help="The number of nucleotides to remove from the start of each read."/> |
61 </section> | 82 </section> |
62 </xml> | 83 </xml> |
63 | 84 |
64 <xml name="errorEstimationFunction"> | 85 <xml name="errorEstimationFunction"> |
65 <param name="errfoo" argument="errorEstimationFunction" type="select" label="Error function"> | 86 <param name="errfoo" argument="errorEstimationFunction" type="select" label="Error function"> |
66 <option value="loessErrfun">loess</option> | 87 <option value="loessErrfun">loess: Use a loess fit to estimate error rates from transition counts</option> |
67 <option value="noqualErrfun">noqual</option> | 88 <option value="noqualErrfun">noqual: Estimate error rates for each type of transition while ignoring quality scores.</option> |
68 <option value="PacBioErrfun">PacBio</option> | 89 <option value="PacBioErrfun">PacBio: Estimate error rates from transition counts in PacBio CCS data.</option> |
69 </param> | 90 </param> |
70 </xml> | 91 </xml> |
71 <token name="@HELP_OVERVIEW@"><![CDATA[ | 92 <token name="@HELP_OVERVIEW@"><![CDATA[ |
72 Overview | 93 Overview |
73 ........ | 94 ........ |