Mercurial > repos > vmarcon > pcafactominer
diff pcaFactoMineR.xml @ 0:7acfb3bdad66 draft default tip
planemo upload commit a2411926bebc2ca3bb31215899a9f18a67e59556
author | vmarcon |
---|---|
date | Thu, 18 Jan 2018 07:57:36 -0500 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pcaFactoMineR.xml Thu Jan 18 07:57:36 2018 -0500 @@ -0,0 +1,335 @@ +<!--# Copyright (C) 2017 INRA +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +#--> + +<tool id="pcafactominer" name="PCAFactoMineR" version="1.0.0"> + <description>Realize a PCA analysis using FactoMineR package</description> + <requirements> + <requirement type="package" version="1.38" >r-factominer</requirement> + <requirement type="package">r-base</requirement> + <requirement type="package">bioconductor-pcamethods</requirement> + <requirement type="package">r-batch</requirement> + </requirements> + <stdio> + <!-- Anything other than zero is an error --> + <exit_code range="1:" level="fatal" /> + <exit_code range=":-1" level="fatal" /> + </stdio> + <command interpreter="Rscript"><![CDATA[ + pcaFactoMineR_galaxy.R + datafile '${datafile}' + npc '${npc}' + #if str( $condPlot.plotOptions ) == "yes": + + plotev '${condPlot.plotev}' + plotcontrib '${condPlot.plotcontrib}' + plotindiv '${condPlot.condScore.plotindiv}' + + #if str( $condPlot.condScore.plotindiv ) == "yes": + colorfactor '${condPlot.condScore.condColor.colorfactor}' + #if str( $condPlot.condScore.condColor.colorfactor ) == "yes": + samplemetadata '${condPlot.condScore.condColor.samplemetadata}' + factor '${condPlot.condScore.condColor.factor}' + #else : + samplemetadata "None" + factor "None" + #end if + #else : + colorfactor yes + samplemetadata "None" + factor "None" + #end if + + plotvar '${condPlot.condLoading.plotvar}' + + #if str( $condPlot.condLoading.plotvar ) == "yes": + contribh '${condPlot.condLoading.contribh}' + contribv '${condPlot.condLoading.contribv}' + #else : + contribh 0 + contribv 0 + #end if + + #else : + plotev yes + plotcontrib yes + plotindiv yes + colorfactor no + samplemetadata "None" + factor "None" + plotvar yes + contribh 0 + contribv 0 + #end if + + #if str( $condGraphical.graphicalOptions ) == "yes": + title '${condGraphical.title}' + pch '${condGraphical.pch}' + pcv '${condGraphical.pcv}' + tc '${condGraphical.tc}' + #else : + title "PCA" + pch 1 + pcv 2 + tc 1 + #end if + varinline '${varinline}' + + ## Outputs + logOut '${log_file}' + outgraphpdf '${output_file}' + ]]></command> + <inputs> + <param name="datafile" type="data" label="Data matrix" help="Precise below if the variable are in line or column" format="tabular,csv" /> + <param name="npc" label="Number of principal components" type="integer" value="2" min="2" help="" /> + <conditional name="condPlot"> + <param name="plotOptions" type="select" label="Plot Options" help="If no, it will create the 4 plot and take the default parameters"> + <option value="no" selected="true">No</option> + <option value="yes">Yes</option> + </param> + <when value="yes"> + <param name="plotev" type="select" label="Eigenvalue plot" help="Eigenvalue and percentage of explained variance plots"> + <option value="yes" selected="true"> Yes </option> + <option value="no"> No </option> + </param> + <param name="plotcontrib" type="select" label="Contribution plot" help=""> + <option value="yes" selected="true"> Yes </option> + <option value="no"> No </option> + </param> + <conditional name="condScore"> + <param name="plotindiv" label="Score plot" type="select" help=""> + <option value="yes" selected="true"> Yes </option> + <option value="no"> No </option> + </param> + <when value="yes"> + <conditional name="condColor"> + <param name="colorfactor" label="Factor color" type="select" help="Colouring of observations according to levels of qualitative variable (biological factor of interest)"> + <option value="no" selected="true"> No </option> + <option value="yes"> Yes </option> + </param> + <when value="yes"> + <param name="samplemetadata" type="data" label="Factor file" help="File with Biological Factor(s)" format="tabular,csv" /> + <param name="factor" label="Name of the column of the factor matrix corresponding to the qualitative variable" type="text" value="None" help="" /> + </when> + <when value="no"></when> + </conditional> + </when> + <when value="no"></when> + </conditional> + <conditional name="condLoading"> + <param name="plotvar" label="Loading plot" type="select" help=""> + <option value="yes" selected="true"> Yes </option> + <option value="no"> No </option> + </param> + <when value="yes"> + <param name="contribh" label="Contribution threshold (abscissa)" type="float" value="0" help="Contribution threshold for loading plot (Principal component displayed in the abscissa axis)" /> + <param name="contribv" label="Contribution threshold (ordinate)" type="float" value="0" help="Contribution threshold for loading plot (Principal component displayed in the ordinate axis)" /> + </when> + <when value="no"></when> + </conditional> + </when> + <when value="no"></when> + </conditional> + <conditional name="condGraphical"> + <param name="graphicalOptions" type="select" label="GraphicalOptions" help="If not, it will take the default parameters"> + <option value="no" selected="true">No</option> + <option value="yes">Yes</option> + </param> + <when value="yes"> + <param name="title" type="text" label="Title" help="Title printed on all plots; if none, leave 'PCA'" value="PCA" /> + <param name="pch" label="Horizontal Principal Component" type="integer" value="1" help="Principal component displayed on the abscissa" /> + <param name="pcv" label="Vertical Principal Component" help="Principal component displayed on the ordinate" type="integer" value="2" /> + <param name="tc" label="Numeric character expansion factor" type="float" value="1.0" min="0.5" help="A value greater than 1 increases and a value lower than 1 decreases character size" /> + </when> + <when value="no"></when> + </conditional> + <param name="varinline" type="select" multiple="false" display="radio" label="Variable in line or column?"> + <option value="yes">Line</option> + <option value="no">Column</option> + </param> + </inputs> + <outputs> + <data name="log_file" format="html" label="${tool.name}_log" /> + <data name="output_file" label="${tool.name}_graph" format="pdf" /> + </outputs> + <tests> + <test> + <param name="datafile" value="decathlon.tsv"/> + <param name="npc" value="2"/> + <conditional name="condPlot"> + <param name="plotOptions" value="no"/> + </conditional> + <conditional name="condGraphical"> + <param name="graphicalOptions" value="no"/> + </conditional> + <param name="varinline" value="no"/> + <output name="log_file" file="log_file"/> + <output name="output_file" file="output_file" compare="sim_size"/> + </test> + </tests> + <help><![CDATA[ + +=== +PCA +=== + +----------- +Description +----------- + + - This tool is part of a set of statistical tools made by members of the BIOS4BIOL group ("Normalization", "Summary statistics", "Hierarchical clustering" and "PCAFactoMineR"). + - Please use the Normalization module that come with the suite before using this module. + +What it does: + - Principal Component Analysis (PCA) as done in the FactoMineR package + +------ + +----------- +Input files +----------- + ++---------------------------+------------+ +| Parameter : num + label | Format | ++===========================+============+ +| 1 : data matrix | tabular | ++---------------------------+------------+ + +---------- +Parameters +---------- + +Data matrix + | see "Input files" section above + | + +Number of principal component + | How many principal components include in the PCA model? + | + +(?)Plot options + | Show (or not) more options for the plots + | + +Eigenvalue plot + | Eigenvalue and percentage of explained variance plots. Default value is "Yes" + | + +Contribution plot + | Contribution plot. Default value is "Yes" + | + +Score plot + | Score plot" plot. Default value is "Yes" + | + +Factor color + | Colouring of observations. Default value is "Yes" + | + +Factor file + | File containing the biological factor (qualitative variable) to color observations according to levels of this + | + +Factor + | Name of the column containing the biological factor + | + +Loading plot + | Loading plot. Default value is "Yes" + | + +Contribution threshold (abscissa) + | Contribution threshold for loading plot: principal component displayed in the abscissa axis + | + +Contribution threshold (ordinate) + | Contribution threshold for loading plot: principal component displayed in the ordinate axis + | + +(?)Graphical options + | Show (or not) more graphical options + | + +Title + | Title printed on all plots; if none, leave 'PCA'" value="PCA" + | + +Numeric character expansion factor + | A value greater than 1 increases and a value lower than 1 decreases character size + | + +Horizontal Principal Component + | Principal component displayed on the abscissa + | + +Vertical Principal Component + | Principal component displayed on the ordinate + | + +Variable Line/Column + | Variable in line or in column in the input file. Default value is "Line" + | + +------------ +Output files +------------ + +PCAFactoMineR_graph (pdf output) + | + +PCAFactoMineR_log + | + +------ + +**Authors** Marie Tremblay-Franco (marie.tremblay-franco@inra.fr), Jean-Francois Martin (jean-francois.martin@inra.fr), Sandrine Laguerre (laguerre@insa-toulouse.fr) and Valentin Marcon (valentin.marcon@inra.fr) + +Contact : support.sigenae@inra.fr + +E-learning available : Not yet. + +.. class:: infomark + +------------- +Please cite : +------------- + +- (Depending on the help provided you can cite us in acknowledgements, references or both.) + +Acknowledgements + | We wish to thank the SIGENAE group and the statistical CATI BIOS4Biol group : Marie Tremblay-Franco, Jean-Francois Martin, Sandrine Laguerre. + | Re-packaging was provided by Valentin Marcon (INRA, Migale platform http://migale.jouy.inra.fr), as part of the IFB project 'Galaxy For Life Science' (http://www.france-bioinformatique.fr/fr) + | + +References + | SIGENAE [http://www.sigenae.org/] + | + + ]]></help> + <citations> + <citation type="bibtex"> + @article{10.18637/jss.v025.i01, + title = {{FactoMineR}: A Package for Multivariate Analysis}, + author = {S\'ebastien Le and Julie Josse and Fran\c{c}ois Husson}, + journal = {Journal of Statistical Software}, + year = {2008}, + volume = {25}, + number = {1}, + pages = {1--18}, + doi = {10.18637/jss.v025.i01}, + url = {https://dx.doi.org/10.18637/jss.v025.i01}} + </citation> + </citations> +</tool>