comparison vegan_rarefaction.xml @ 1:dd2705a31239 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/vegan/vegan_rarefaction commit 55b5863db6c3e6cf443917117ec362a8daad8122
author iuc
date Mon, 08 Feb 2016 15:24:42 -0500
parents 3d1d965b6423
children b0d5976540e3
comparison
equal deleted inserted replaced
0:3d1d965b6423 1:dd2705a31239
1 <tool id="vegan_rarefaction" name="Vegan Rarefaction" version="0.0.2"> 1 <tool id="vegan_rarefaction" name="Vegan Rarefaction" version="0.0.3">
2 <description> 2 <description>
3 curve and statistics 3 curve and statistics
4 </description> 4 </description>
5 <macros> 5 <macros>
6 <import>vegan_macros.xml</import> 6 <import>vegan_macros.xml</import>
30 raremax_offset <- 0 30 raremax_offset <- 0
31 #end if 31 #end if
32 sprintf("Using sample size: %i", raremax) 32 sprintf("Using sample size: %i", raremax)
33 Srare <- rarefy(input_abundance, sample=raremax, se=FALSE, MARGIN=1) 33 Srare <- rarefy(input_abundance, sample=raremax, se=FALSE, MARGIN=1)
34 #if "output_richness" in $include_files: 34 #if "output_richness" in $include_files:
35 write.table(Srare, "${output_richness}", col.names=NA, sep = "\t") 35 write.table(Srare, "${output_richness}", quote=FALSE, col.names=NA, sep = "\t")
36 #end if 36 #end if
37 37
38 #if "output_slope" in $include_files: 38 #if "output_slope" in $include_files:
39 write.table(rareslope(input_abundance, sample=raremax+raremax_offset), "${output_slope}", sep = "\t") 39 write.table(rareslope(input_abundance, sample=raremax+raremax_offset), "${output_slope}", quote=FALSE, sep = "\t")
40 #end if 40 #end if
41 41
42 S <- specnumber(input_abundance) 42 S <- specnumber(input_abundance)
43 #if "output_species_count" in $include_files: 43 #if "output_species_count" in $include_files:
44 write.table(S, "${ output_species_count }", col.names=NA, sep="\t" ) 44 write.table(S, "${ output_species_count }", quote=FALSE, col.names=NA, sep="\t" )
45 #end if 45 #end if
46 46
47 #if "output_species_frequency" in $include_files: 47 #if "output_species_frequency" in $include_files:
48 write.table(specnumber(input_abundance, MARGIN=2), "${ output_species_frequency }", col.names=NA, sep="\t" ) 48 write.table(specnumber(input_abundance, MARGIN=2), "${ output_species_frequency }", quote=FALSE, col.names=NA, sep="\t" )
49 #end if 49 #end if
50 50
51 #if "output_species_probabilities" in $include_files: 51 #if "output_species_probabilities" in $include_files:
52 write.table(drarefy(input_abundance, sample=raremax+raremax_offset), "${ output_species_probabilities }", col.names=NA, sep="\t" ) 52 write.table(drarefy(input_abundance, sample=raremax+raremax_offset), "${ output_species_probabilities }", quote=FALSE, col.names=NA, sep="\t" )
53 #end if
54
55 #if "output_random_rarefied" in $include_files:
56 write.table( t( rrarefy(input_abundance, sample=raremax) ), "${ output_random_rarefied }", quote=FALSE, col.names=NA, sep="\t" )
53 #end if 57 #end if
54 58
55 #if "output_plot" in $include_files: 59 #if "output_plot" in $include_files:
56 png('${output_plot}', width=1020, height=800, units='px') 60 png('${output_plot}', width=1020, height=800, units='px')
57 rarecurve(input_abundance, step = ${step_size}, sample = raremax, xlab = "${xlab}", ylab = "${ylab}", label="${label}", col = "blue", cex = 0.6) 61 rarecurve(input_abundance, step = ${step_size}, sample = raremax, xlab = "${xlab}", ylab = "${ylab}", label="${label}", col = "blue", cex = 0.6)
71 <option value="output_species_count" selected="true">Count of species</option> 75 <option value="output_species_count" selected="true">Count of species</option>
72 <option value="output_species_frequency" selected="true">Species frequency</option> 76 <option value="output_species_frequency" selected="true">Species frequency</option>
73 <option value="output_richness" selected="true">Richness</option> 77 <option value="output_richness" selected="true">Richness</option>
74 <option value="output_species_probabilities" selected="true">Species probabilities</option> 78 <option value="output_species_probabilities" selected="true">Species probabilities</option>
75 <option value="output_slope" selected="true">Slope of rarefaction curve</option> 79 <option value="output_slope" selected="true">Slope of rarefaction curve</option>
80 <option value="output_plot" selected="true">Rarefaction plot</option>
81 <option value="output_random_rarefied" selected="true">Randomly rarefied community matrix</option>
76 <option value="output_r_script" selected="false">R script</option> 82 <option value="output_r_script" selected="false">R script</option>
77 <option value="output_plot" selected="true">Rarefaction plot</option>
78 </param> 83 </param>
79 </inputs> 84 </inputs>
80 <outputs> 85 <outputs>
81 <data format="tabular" name="output_species_count" label="${tool.name} on ${on_string} (number of species)"> 86 <data format="tabular" name="output_species_count" label="${tool.name} on ${on_string} (number of species)">
82 <filter>"output_species_count" in include_outputs</filter> 87 <filter>"output_species_count" in include_outputs</filter>
91 <filter>"output_species_probabilities" in include_outputs</filter> 96 <filter>"output_species_probabilities" in include_outputs</filter>
92 </data> 97 </data>
93 <data format="tabular" name="output_slope" label="${tool.name} on ${on_string} (slope of curve)"> 98 <data format="tabular" name="output_slope" label="${tool.name} on ${on_string} (slope of curve)">
94 <filter>"output_slope" in include_outputs</filter> 99 <filter>"output_slope" in include_outputs</filter>
95 </data> 100 </data>
101 <data format="png" name="output_plot" label="${tool.name} on ${on_string} (plot)">
102 <filter>"output_plot" in include_outputs</filter>
103 </data>
104 <data format="tabular" name="output_random_rarefied" label="${tool.name} on ${on_string} (Random rarefied community matrix)">
105 <filter>"output_random_rarefied" in include_outputs</filter>
106 </data>
96 <data format="txt" name="output_r_script" label="${tool.name} on ${on_string} (Rscript)"> 107 <data format="txt" name="output_r_script" label="${tool.name} on ${on_string} (Rscript)">
97 <filter>"output_r_script" in include_outputs</filter> 108 <filter>"output_r_script" in include_outputs</filter>
98 </data>
99 <data format="png" name="output_plot" label="${tool.name} on ${on_string} (plot)">
100 <filter>"output_plot" in include_outputs</filter>
101 </data> 109 </data>
102 </outputs> 110 </outputs>
103 <tests> 111 <tests>
104 <test> 112 <test>
105 <param name="input_abundance" ftype="tabular" value="vegan_in.tabular"/> 113 <param name="input_abundance" ftype="tabular" value="vegan_in.tabular"/>