Mercurial > repos > iuc > ampvis2_alpha_diversity
comparison alpha_diversity.xml @ 0:b54f72135f58 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ampvis2 commit 7c0ecbffdb5e993f5af7e3b52c424c2761fb91d3"
author | iuc |
---|---|
date | Mon, 04 Apr 2022 10:26:31 +0000 |
parents | |
children | 21b85417e4c3 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:b54f72135f58 |
---|---|
1 <tool id="ampvis2_alpha_diversity" name="ampvis2 alpha diversity" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@" license="MIT"> | |
2 <description></description> | |
3 <macros> | |
4 <import>macros.xml</import> | |
5 </macros> | |
6 <expand macro="header"/> | |
7 <command detect_errors="exit_code"><![CDATA[ | |
8 Rscript '$rscript' | |
9 ]]></command> | |
10 <configfiles> | |
11 <configfile name="rscript"><![CDATA[ | |
12 #set m='"' + '", "'.join(str($measure).split(",")) + '"' | |
13 library(ampvis2, quietly = TRUE) | |
14 d <- readRDS("$data") | |
15 a <- amp_alphadiv(d, | |
16 measure = c($m), | |
17 richness = $richness | |
18 @RAREFY_TOKEN@ | |
19 ) | |
20 write.table(a, file='$alphadiv', quote=FALSE, sep='\t', row.names=FALSE) | |
21 ]]></configfile> | |
22 </configfiles> | |
23 <inputs> | |
24 <expand macro="rds_input_macro"/> | |
25 <param argument="measure" type="select" multiple="true" optional="false" label="Alpha-diversity measure(s) to be included"> | |
26 <option value="observed" selected="true">observed</option> | |
27 <option value="shannon" selected="true">shannon</option> | |
28 <option value="simpson" selected="true">simpson</option> | |
29 <option value="invsimpson" selected="true">invsimpson</option> | |
30 </param> | |
31 <param argument="richness" type="boolean" truevalue="TRUE" falsevalue="FALSE" label="Calculate sample richness estimates" help="Chao1 and ACE"/> | |
32 <expand macro="rarefy_macro" help="before calculating alpha diversity and/or richnes"/> | |
33 </inputs> | |
34 <outputs> | |
35 <data name="alphadiv" format="tabular"/> | |
36 </outputs> | |
37 <tests> | |
38 <test> | |
39 <param name="data" value="AalborgWWTPs.rds" ftype="ampvis2"/> | |
40 <output name="alphadiv"> | |
41 <assert_contents> | |
42 <has_line line="SampleID	Plant	Date	Year	Period	Reads	ObservedOTUs	Shannon	Simpson	invSimpson"/> | |
43 <has_text text="16SAMP-536	"/> | |
44 <has_text text="	Aalborg West	"/> | |
45 <has_n_lines n="68"/> | |
46 <has_n_columns n="10"/> | |
47 </assert_contents> | |
48 </output> | |
49 </test> | |
50 <test> | |
51 <param name="data" value="AalborgWWTPs.rds" ftype="ampvis2"/> | |
52 <param name="measure" value="observed,shannon"/> | |
53 <param name="richness" value="true"/> | |
54 <param name="rarefy" value="500"/> | |
55 <output name="alphadiv"> | |
56 <assert_contents> | |
57 <has_line line="SampleID	Plant	Date	Year	Period	RawReads	Reads	ObservedOTUs	Shannon	Chao1	ACE"/> | |
58 <has_text text="16SAMP-536	"/> | |
59 <has_text text="	Aalborg West	"/> | |
60 <has_n_lines n="68"/> | |
61 <has_n_columns n="11"/> | |
62 <has_text text="	500	"/> | |
63 </assert_contents> | |
64 </output> | |
65 </test> | |
66 </tests> | |
67 <help><![CDATA[ | |
68 | |
69 What it does | |
70 ============ | |
71 | |
72 Calculate alpha-diversity indices for each sample and combines with the metadata. | |
73 | |
74 The Galaxy tool calls the `amp_alpha_diversity | |
75 <https://madsalbertsen.github.io/ampvis2/reference/amp_alphadiv.html>`_ function | |
76 of the ampvis2 package. | |
77 | |
78 Usage | |
79 ===== | |
80 | |
81 The alpha-diversity indices are calculated per sample using the vegan function `diversity <https://rdrr.io/pkg/vegan/man/diversity.html>`_, | |
82 where the read abundances are first rarefied using `rrarefy <https://rdrr.io/pkg/vegan/man/rarefy.html>`_ by the size of the rarefy argument. | |
83 Refer to the vegan documentation for details about the different indices and how they are | |
84 calculated. | |
85 | |
86 | |
87 Input | |
88 ===== | |
89 | |
90 @HELP_RDS_INPUT@ | |
91 | |
92 Output | |
93 ====== | |
94 | |
95 A tabular dataset containing the chosen alpha-diversity measures per sample. | |
96 | |
97 ]]></help> | |
98 <expand macro="citations"> | |
99 <citation type="doi">10.1371/journal.pcbi.1003531</citation> | |
100 </expand> | |
101 </tool> |