diff mixomics_blocksplsda.xml @ 0:bea08702ed51 draft

planemo upload for repository https://github.com/bilille/galaxy-mixomics-blocksplsda commit 7595141b2b760d3c9781f350abd2aa76a0644b1a
author ppericard
date Fri, 17 May 2019 05:00:22 -0400
parents
children 6595c17673cb
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mixomics_blocksplsda.xml	Fri May 17 05:00:22 2019 -0400
@@ -0,0 +1,224 @@
+<tool id="mixomics_blocksplsda" name="mixOmics block.splsda" version="0.1.0" profile="16.04" workflow_compatible="true">
+
+    <description>performs N-integration and feature selection with Projection to Latent Structures models (PLS) with sparse Discriminant Analysis</description>
+    
+    <requirements>
+        <requirement type="package" version="6.8">bioconductor-mixomics</requirement>
+        <requirement type="package" version="2.0">r-argparse</requirement>
+    </requirements>
+    
+<!--     <stdio>
+        <exit_code range="1:" level="fatal" />
+    </stdio> -->
+
+    <command detect_errors="aggressive">
+        <![CDATA[
+        mkdir outdir
+        && Rscript
+        ${__tool_directory__}/mixomics_blocksplsda_script.R
+        #for $b in $blocks
+            --block
+            #if $b.block_name
+                ${b.block_name}
+            #else
+                ${b.data_matrix.name}
+            #end if
+            ${b.keep}
+            ${b.data_matrix}
+            ${b.variable_metadata}
+        #end for
+        --sample_metadata_in ${sample_metadata_in}
+        --sample_description_col ${sample_description_col}
+        --ncomp ${ncomp}
+        ${correlation}
+        --scheme ${adv.scheme}
+        --mode ${adv.mode}
+        --maxiter ${adv.maxiter}
+        ${adv.scale}
+        --init ${adv.init}
+        --tol ${adv.tol}
+        ${adv.nearzerovar}
+        --rdata_out ${rdata_out}
+        --sample_metadata_out ${sample_metadata_out}
+        --variable_metadata_outdir outdir
+        ]]>
+    </command>
+
+    <inputs>
+        <repeat name="blocks" title="Blocks">
+            <param name="block_name" type="text" label="Block name" />
+            <param name="keep" type="integer" value="0" min="0" label="Number of variables to select for each component" help="Default is to keep all variables" />
+            <param name="data_matrix" type="data" format="tabular" label="Data matrix" help="rows = variables, columns = samples" />
+            <param name="variable_metadata" type="data" format="tabular" optional="true" label="Variables metadata" help="rows = variables" />
+        </repeat>
+        <param name="sample_metadata_in" type="data" format="tabular" label="Samples metadata matrix" />
+        <param name="sample_description_col" type="integer" value="0" min="0" label="Sample description column number" help="Use the last column by default" />
+        <param name="ncomp" type="integer" value="2" min="1" label="Number of components to include in the model" />
+        <param name="correlation" type="boolean" truevalue="--correlation" falsevalue="" checked="false" label="Correlation between all blocks"/>
+        <section name="adv" title="Advanced Options" expanded="false">
+            <param name="scheme" type="select" label="Scheme">
+                <option value="horst" selected="true">horst</option>
+                <option value="factorial"            >factorial</option>
+                <option value="centroid"             >centroid</option>
+            </param>
+            <param name="mode" type="select" label="Mode">
+                <option value="regression" selected="true">regression</option>
+                <option value="canonical"                 >canonical</option>
+                <option value="invariant"                 >invariant</option>
+                <option value="classic"                   >classic</option>
+            </param>
+            <param name="maxiter" type="integer" value="100" min="1" label="Maximum number of iterations" />
+            <param name="scale" type="boolean" truevalue="--scale" falsevalue="" checked="true" label="Scale" help="if checked, each block is standardized to zero means and unit variances" />
+            <param name="init" type="select" label="Init">
+                <option value="svd" selected="true">svd</option>
+                <option value="svd.single"         >svd.single</option>
+            </param>
+            <param name="tol" type="float" value="1e-06" min="0" label="Convergence stopping value (tol)" />
+            <param name="nearzerovar" type="boolean" truevalue="--nearzerovar" falsevalue="" checked="false" label="Should be set to TRUE in particular for data with many zero values" />
+        </section>
+    </inputs>
+
+    <outputs>
+        <data name="rdata_out" format="rdata" label="${tool.id}_output.rdata" />
+        <data name="sample_metadata_out" format="tabular" label="${tool.id}_${sample_metadata_in.name}" />
+        <collection name="blocks_output" type="list" label="${tool.id}_blocks_output">
+            <discover_datasets pattern="(?P&lt;designation&gt;.+)\.tsv" directory="outdir" format="tabular" />
+        </collection>
+    </outputs>
+
+    <tests>
+        <test>
+            <repeat name="blocks">
+                <param name="block_name" value="Block1" />
+                <param name="data_matrix" value="in_block1_data.tabular" />
+            </repeat>
+            <repeat name="blocks">
+                <param name="block_name" value="Block2" />
+                <param name="data_matrix" value="in_block2_data.tabular" />
+            </repeat>
+            <param name="sample_metadata_in" value="in_sample_meta.tabular" />
+            <output name="rdata_out" value="out_rdata.rdata" />
+            <output name="sample_metadata_out" value="out_sample_meta.tabular" />
+        </test>
+    </tests>
+
+    <help>
+        <![CDATA[
+.. class:: infomark
+
+**Authors** Pierre Pericard (pierre.pericard@pasteur-lille.fr)
+
+---------------------------------------------------
+
+.. class:: infomark
+
+**Please cite**
+
+Rohart F, Gautier B, Singh A, Lê Cao KA (2017) mixOmics: An R package for ‘omics feature selection and multiple data integration.
+PLOS Computational Biology 13(11): e1005752. https://doi.org/10.1371/journal.pcbi.1005752
+
+---------------------------------------------------
+
+======================
+mixOmics blocks.splsda
+======================
+
+-----------
+Description
+-----------
+
+The blocks.splsda function is part of the mixOmics package for exploration and integration of Omics datasets.
+Performs N-integration and feature selection with Projection to Latent Structures models (PLS) with sparse Discriminant Analysis.
+
+-----------
+Input files
+-----------
+
+For each block (min 2 blocks):
+==============================
+
++------------------------------+------------+
+| Parameter : num + label      |   Format   |
++==============================+============+
+| 1 : Data matrix              |   tabular  |
++------------------------------+------------+
+| 2 : [opt] Variables metadata |   tabular  |
++------------------------------+------------+
+
+Variables metadata files are optional.
+If a file is provided, output metadata will be appended to the input file, otherwise a new output file will be created.
+
+Global input files:
+===================
+
++-----------------------------+------------+
+| Parameter : num + label     |   Format   |
++=============================+============+
+| 1 : Samples metadata        |   tabular  |
++-----------------------------+------------+
+
+By default, the last column of the samples metadata matrix will be used as samples description factors.
+If it's not the case, the column number can be inputed in the `Sample description column number` parameter.
+
+----------
+Parameters
+----------
+
+For each block (min 2 blocks):
+==============================
+
+Block name
+    Name of the block. If not provided, this will default to the input filename
+
+Number of variables to select for each component
+    If set to 0 (default), all variables will be considered in the model
+
+Global parameters:
+==================
+
+Sample description column number
+
+Number of components to include in the model
+
+Correlation between all blocks
+
+Advanced options:
+=================
+
+Scheme
+
+Mode
+
+Maximum number of iterations
+
+Scale
+
+Init
+
+Convergence stopping value (tol)
+
+Near zero var
+
+------------
+Output files
+------------
+
+mixomics_blocksplsda_output.rdata
+    | rData output
+    | Contains the `mixomics_result` R object containing the result of the block.splsda function
+
+mixomics_blocksplsda_{input_sample_metadata_name}
+    | tabular output
+    | Identical to the input Sample metadata file with appended columns from the result of block.splsda function
+
+mixomics_blocksplsda_blocks_output
+    A collection with the variable metadata output files (mixomics_blocksplsda_block_{block name}_variable_metadata) for each input block
+
+        ]]>
+    </help>
+
+    <citations>
+        <citation type="doi">10.1371/journal.pcbi.1005752</citation>
+    </citations>
+
+</tool>
\ No newline at end of file