diff vegan_rarefaction.xml @ 1:2cf7de21bff0 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/vegan/vegan_rarefaction commit e5a5ad091c621348dc6ce2df861475ebc54a380e
author iuc
date Tue, 13 Oct 2015 17:29:38 -0400
parents 02103b6ed681
children 559d2b7062ad
line wrap: on
line diff
--- a/vegan_rarefaction.xml	Thu Aug 27 13:48:52 2015 -0400
+++ b/vegan_rarefaction.xml	Tue Oct 13 17:29:38 2015 -0400
@@ -2,14 +2,12 @@
     <description>
         curve and statistics
     </description>
-    <requirements>
-        <requirement type="package" version="3.2.1">R</requirement>
-        <requirement type="package" version="2.3-0">vegan</requirement>
-    </requirements>
-    <stdio>
-        <exit_code range="1:" />
-        <exit_code range=":-1" />
-    </stdio>
+    <macros>
+        <import>vegan_macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <expand macro="stdio" />
+    <expand macro="version_command" />
     <command><![CDATA[
         #if "output_r_script" in str( $include_outputs ).split( "," ):
             cp "${vegan_rarefaction_script}" "${output_r_script}" &&
@@ -19,18 +17,8 @@
     </command>
     <configfiles>
         <configfile name="vegan_rarefaction_script"><![CDATA[
+@RSCRIPT_LOAD_TABULAR_FILE@
 #set $include_files = str( $include_outputs ).split( "," )
-#set $int_species_column = int( str( $species_column ) )
-#set $fixed_sample_columns = []
-#for $sample_col in map( int, str( $sample_columns ).split( "," ) ):
-#assert $sample_col != $int_species_column, "Sample label column and sample count columns must not be the same."
-#silent $fixed_sample_columns.append( str( $sample_col if $sample_col < $int_species_column else $sample_col-1 ) )
-#end for
-options(bitmapType='cairo')## No X11, so we'll use cairo
-library(vegan)
-input_abundance <- read.table("${input_abundance}", sep="\t", row.names=${ species_column }, header=${header} )
-
-input_abundance <- t( input_abundance[ c( ${ ",".join( $fixed_sample_columns ) } )] )
 
 #if str( $sample_size ) == '':
 raremax <- min(rowSums(input_abundance))
@@ -72,10 +60,7 @@
         </configfile>
     </configfiles>
     <inputs>
-        <param name="input_abundance" type="data" format="tabular" label="File with abundance values for community" help="Rows are samples; columns are species/phyla/community classifier"/>
-        <param name="species_column" label="Group name column" type="data_column" data_ref="input_abundance" value="6" help="Species, phylum, etc"/>
-        <param name="sample_columns" label="Sample count columns" type="data_column" multiple="True" value="2" data_ref="input_abundance" help="Select each column that contains counts"/>
-        <param name="header" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="False" label="Input has a header line"/>
+        <expand macro="params_load_tabular_file" />
         <param name="sample_size" type="integer" value="" min="1" optional="True" label="Subsample size for rarefying community" help="Leave empty to subsample by community size for the smallest sample."/>
         <param name="step_size" type="integer" value="1" min="1" label="Step size for sample sizes"/>
         <param name="xlab" type="text" value="Sample Size" label="X-axis label"/>