comparison alpha_diversity.xml @ 8:77000428c613 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ampvis2 commit cb7f20bd60570b9115fb8a9ce793dbe9b3fd65f5
author iuc
date Fri, 01 Nov 2024 17:09:34 +0000
parents 289d6299bd2e
children
comparison
equal deleted inserted replaced
7:c14c7fd4d1be 8:77000428c613
1 <tool id="ampvis2_alpha_diversity" name="ampvis2 alpha diversity" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@" license="MIT"> 1 <tool id="ampvis2_alpha_diversity" name="ampvis2 alpha diversity" version="@TOOL_VERSION@+galaxy1" profile="@PROFILE@" license="MIT">
2 <description></description> 2 <description></description>
3 <macros> 3 <macros>
4 <import>macros.xml</import> 4 <import>macros.xml</import>
5 </macros> 5 </macros>
6 <expand macro="header"/> 6 <expand macro="header"/>
9 ]]></command> 9 ]]></command>
10 <configfiles> 10 <configfiles>
11 <configfile name="rscript"><![CDATA[ 11 <configfile name="rscript"><![CDATA[
12 #set m='"' + '", "'.join(str($measure).split(",")) + '"' 12 #set m='"' + '", "'.join(str($measure).split(",")) + '"'
13 library(ampvis2, quietly = TRUE) 13 library(ampvis2, quietly = TRUE)
14
14 d <- readRDS("$data") 15 d <- readRDS("$data")
15 a <- amp_alphadiv(d, 16 table <- amp_alphadiv(d,
16 measure = c($m), 17 measure = c($m),
17 richness = $richness 18 richness = $richness
18 @RAREFY_TOKEN@ 19 @RAREFY_TOKEN@,
19 ) 20 )
20 write.table(a, file='$alphadiv', quote=FALSE, sep='\t', row.names=FALSE) 21 plot <- amp_alphadiv(d,
22 measure = c($m),
23 richness = $richness
24 @RAREFY_TOKEN@,
25 plot = TRUE,
26 plot_group_by = "$group_by",
27 plot_scatter = $plot_scatter
28 )
29 write.table(table, file='$alphadiv', quote=FALSE, sep='\t', row.names=FALSE)
30 ggsave("$alphadiv_plot",
31 plot = plot,
32 device = "$output_options.out_format"
33 #if str($output_options.plot_width) != ''
34 , width = $output_options.plot_width
35 #end if
36 #if str($output_options.plot_height) != ''
37 , height = $output_options.plot_height
38 #end if
39 )
21 ]]></configfile> 40 ]]></configfile>
22 </configfiles> 41 </configfiles>
23 <inputs> 42 <inputs>
24 <expand macro="rds_input_macro"/> 43 <expand macro="rds_input_macro"/>
25 <param argument="measure" type="select" multiple="true" optional="false" label="Alpha-diversity measure(s) to be included"> 44 <param argument="measure" type="select" multiple="true" optional="false" label="Alpha-diversity measure(s) to be included">
28 <option value="simpson" selected="true">simpson</option> 47 <option value="simpson" selected="true">simpson</option>
29 <option value="invsimpson" selected="true">invsimpson</option> 48 <option value="invsimpson" selected="true">invsimpson</option>
30 </param> 49 </param>
31 <param argument="richness" type="boolean" truevalue="TRUE" falsevalue="FALSE" label="Calculate sample richness estimates" help="Chao1 and ACE"/> 50 <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"/> 51 <expand macro="rarefy_macro" help="before calculating alpha diversity and/or richnes"/>
52 <param argument="group_by" type="text" label="Group by metadata field (for plotting)" help="Specify the metadata field to group the plot by"/>
53 <param argument="plot_scatter" type="boolean" truevalue="TRUE" falsevalue="FALSE" label="Scatter plot instead of boxplot?" help="Select to generate a scatter plot instead of a boxplot"/>
54 <expand macro="out_format_macro"/>
33 </inputs> 55 </inputs>
34 <outputs> 56 <outputs>
35 <data name="alphadiv" format="tabular"/> 57 <data name="alphadiv" format="tabular"/>
58 <expand macro="out_macro" name="alphadiv_plot" label=": plot"/>
36 </outputs> 59 </outputs>
37 <tests> 60 <tests>
38 <test> 61 <test>
39 <param name="data" value="AalborgWWTPs.rds" ftype="ampvis2"/> 62 <param name="data" value="AalborgWWTPs.rds" ftype="ampvis2"/>
63 <param name="group_by" value="Plant"/>
64 <param name="plot_scatter" value="false"/>
40 <output name="alphadiv"> 65 <output name="alphadiv">
41 <assert_contents> 66 <assert_contents>
42 <has_line line="SampleID&#9;Plant&#9;Date&#9;Year&#9;Period&#9;Reads&#9;uniqueOTUs&#9;Shannon&#9;Simpson&#9;invSimpson"/> 67 <has_line line="SampleID&#9;Plant&#9;Date&#9;Year&#9;Period&#9;Reads&#9;uniqueOTUs&#9;Shannon&#9;Simpson&#9;invSimpson"/>
43 <has_text text="16SAMP-536&#9;"/> 68 <has_text text="16SAMP-536&#9;"/>
44 <has_text text="&#9;Aalborg West&#9;"/> 69 <has_text text="&#9;Aalborg West&#9;"/>
45 <has_n_lines n="68"/> 70 <has_n_lines n="68"/>
46 <has_n_columns n="10"/> 71 <has_n_columns n="10"/>
47 </assert_contents> 72 </assert_contents>
48 </output> 73 </output>
74 <output name="alphadiv_plot" ftype="pdf">
75 <assert_contents>
76 <has_size min="1"/>
77 </assert_contents>
78 </output>
49 </test> 79 </test>
50 <test> 80 <test>
51 <param name="data" value="AalborgWWTPs.rds" ftype="ampvis2"/> 81 <param name="data" value="AalborgWWTPs.rds" ftype="ampvis2"/>
52 <param name="measure" value="observed,shannon"/> 82 <param name="measure" value="observed,shannon"/>
53 <param name="richness" value="true"/> 83 <param name="richness" value="true"/>
54 <param name="rarefy" value="500"/> 84 <param name="rarefy" value="500"/>
85 <param name="group_by" value="Plant"/>
86 <param name="plot_scatter" value="true"/>
55 <output name="alphadiv"> 87 <output name="alphadiv">
56 <assert_contents> 88 <assert_contents>
57 <has_line line="SampleID&#9;Plant&#9;Date&#9;Year&#9;Period&#9;RawReads&#9;Reads&#9;uniqueOTUs&#9;Shannon&#9;Simpson&#9;invSimpson&#9;Chao1&#9;ACE"/> 89 <has_line line="SampleID&#9;Plant&#9;Date&#9;Year&#9;Period&#9;RawReads&#9;Reads&#9;uniqueOTUs&#9;Shannon&#9;Simpson&#9;invSimpson&#9;Chao1&#9;ACE"/>
58 <has_text text="16SAMP-536&#9;"/> 90 <has_text text="16SAMP-536&#9;"/>
59 <has_text text="&#9;Aalborg West&#9;"/> 91 <has_text text="&#9;Aalborg West&#9;"/>
60 <has_n_lines n="68"/> 92 <has_n_lines n="68"/>
61 <has_n_columns n="13"/> 93 <has_n_columns n="13"/>
62 <has_text text="&#9;500&#9;"/> 94 <has_text text="&#9;500&#9;"/>
95 </assert_contents>
96 </output>
97 <output name="alphadiv_plot">
98 <assert_contents>
99 <has_size min="1"/>
63 </assert_contents> 100 </assert_contents>
64 </output> 101 </output>
65 </test> 102 </test>
66 </tests> 103 </tests>
67 <help><![CDATA[ 104 <help><![CDATA[