Mercurial > repos > fabio > iwtomics
view testandplot.xml @ 88:422189e4041e draft
Deleted selected files
author | fabio |
---|---|
date | Fri, 06 Oct 2017 14:34:37 -0400 |
parents | f81d72e482cf |
children |
line wrap: on
line source
<tool id="iwtomics_testandplot" name="IWTomics Test" version="@VERSION@.0"> <description>and Plot</description> <macros> <import>macros.xml</import> </macros> <expand macro="requirements" /> <command detect_errors="exit_code"> <![CDATA[ Rscript '$__tool_directory__/testandplot.R' adjustedpvaluematrix='${adjustedpvaluematrix}' iwtomicsrespdf='${iwtomicsrespdf}' iwtomicssumpdf='${iwtomicssumpdf}' iwtomicsrdata='${iwtomicsrdata}' iwtomicstests='${iwtomicstests}' iwtomicsselectedfeatures='${iwtomicsselectedfeatures}' regionids='${regionids}' featureids='${featureids}' rdatafile='${rdata}' #set region1 = ','.join( [ str( $r.region0 ) for $r in $regionssection.regions ] ) #set region2 = ','.join( [ str( $r.region1 ) for $r in $regionssection.regions ] ) region1='c(${region1})' region2='c(${region2})' features_subset='c(${featureslist})' statistics="'${conditionalstatistics.statistics}'" #if $conditionalstatistics.statistics == "quantile": #set probabilities = ','.join( [ str( $p.qprob ) for $p in $conditionalstatistics.quantilesection.qprobabilities ] ) testprobs='c(${probabilities})' #end if B='${permutations}' testalpha='${plotres.alpha}' average='${plotres.average}' size='${plotres.size}' plottype="'${plotres.conditionalplottype.plottype}'" #if $plotres.conditionalplottype.plottype == "boxplot": #set probs = ','.join( [ str( $p.prob ) for $p in $plotres.conditionalplottype.probabilitiessection.probabilities ] ) #if $probs != "": probs='c(${plotres.conditionalplottype.probabilitiessection.prob0},${plotres.conditionalplottype.probabilitiessection.prob1},${plotres.conditionalplottype.probabilitiessection.prob2},${probs})' #else: probs='c(${plotres.conditionalplottype.probabilitiessection.prob0},${plotres.conditionalplottype.probabilitiessection.prob1},${plotres.conditionalplottype.probabilitiessection.prob2})' #end if #end if groupby="'${plotsum.conditionalgroupby.groupby}'" #if $plotsum.conditionalgroupby.groupby == "test": summaryalpha='${plotsum.conditionalgroupby.testalphaplot}' only_significant='${plotsum.conditionalgroupby.testonlysig}' #elif $plotsum.conditionalgroupby.groupby == "feature": summaryalpha='${plotsum.conditionalgroupby.featurealphaplot}' only_significant='${plotsum.conditionalgroupby.featureonlysig}' #end if ]]> </command> <inputs> <!-- RData --> <param format="rdata" name="rdata" type="data" label="Select IWTomicsData object" help="File created by 'IWTomics Load Smooth and Plot'." /> <!-- region IDs --> <param format="tabular" name="regionids" type="data" label="Select region dataset IDs" help="File created by 'IWTomics Load Smooth and Plot'." /> <!-- feature IDs --> <param format="tabular" name="featureids" type="data" label="Select feature IDs" help="File created by 'IWTomics Load Smooth and Plot'." /> <!-- repeat region ids --> <section name="regionssection" title="Select regions for Interval-Wise Testing" expanded="True" help="IDs of the region datasets to be tested."> <repeat name="regions" title="Two-sample test" min="1"> <param name="region0" type="data_column" data_ref="regionids" numerical="False" label="Region 1" multiple="False" use_header_names="True" /> <param name="region1" type="data_column" data_ref="regionids" numerical="False" label="Region 2" multiple="False" use_header_names="True" /> </repeat> </section> <!-- feature ids list --> <param name="featureslist" type="data_column" data_ref="featureids" numerical="False" label="Select features" multiple="True" use_header_names="True" help="IDs of the features to be tested." /> <!-- conditional statistics --> <conditional name="conditionalstatistics"> <!-- statistics --> <param name="statistics" type="select" label="Test statistics"> <option value="mean">Mean difference</option> <option value="median">Median difference</option> <option value="variance">Variance ratio</option> <option value="quantile">Quantile difference(s)</option> </param> <!-- conditional choice: statistics=quantile --> <when value="quantile"> <section name="quantilesection" title="Probabilities" expanded="True" help="Probabilities corresponding to the quantiles in test statistics."> <repeat name="qprobabilities" title="Probabilities" min="1"> <param name="qprob" size="4" type="float" value="0.5" min="0.0" max="1.0" label="Probability" /> </repeat> </section> </when> </conditional> <!-- permutations --> <param name="permutations" type="integer" value="1000" min="1" label="Number of permutations" /> <!-- plot IWTomics results --> <section name="plotres" title="Plot IWTomics test results" expanded="True"> <!-- alpha --> <param name="alpha" size="3" type="float" value="0.05" min="0.0" max="1.0" label="Level of the test (alpha)" /> <expand macro="plot-params" /> </section> <!-- summary plot --> <expand macro="plot-sum" /> </inputs> <outputs> <data format="txt" name="adjustedpvaluematrix" label="${tool.name} on ${on_string}: Adjusted p-value Matrix" from_work_dir="iwtomics.testandplot.adjustedpvalue.matrix.txt" /> <data format="pdf" name="iwtomicsrespdf" label="${tool.name} on ${on_string}: Plotted Test Results" from_work_dir="iwtomics.testandplot.iwtomicstestresults.pdf" /> <data format="pdf" name="iwtomicssumpdf" label="${tool.name} on ${on_string}: Summary Plot" from_work_dir="iwtomics.testandplot.summaryplot.pdf" /> <data format="rdata" name="iwtomicsrdata" label="${tool.name} on ${on_string}: IWTomicsData Object with Test Results" from_work_dir="iwtomics.testandplot.RData" /> <data format="tabular" name="iwtomicstests" label="${tool.name} on ${on_string}: Test IDs" from_work_dir="iwtomics.testandplot.tests.txt" /> <data format="tabular" name="iwtomicsselectedfeatures" label="${tool.name} on ${on_string}: Feature IDs" from_work_dir="iwtomics.testandplot.selectedfeatures.txt" /> </outputs> <tests> <test> <param name="rdata" value="output_loadandplot/iwtomics.loadandplot.RData" ftype="rdata" /> <param name="regionids" value="output_loadandplot/iwtomics.loadandplot.regions.txt" ftype="tabular" /> <param name="featureids" value="output_loadandplot/iwtomics.loadandplot.features.txt" ftype="tabular" /> <repeat name="regions"> <param name="region0" value="2" /> <param name="region1" value="1" /> </repeat> <repeat name="regions"> <param name="region0" value="3" /> <param name="region1" value="1" /> </repeat> <repeat name="regions"> <param name="region0" value="4" /> <param name="region1" value="1" /> </repeat> <param name="featureslist" value="1,2" /> <param name="statistics" value="mean" /> <param name="permutations" value="1000" /> <param name="alpha" value="0.05" /> <param name="average" value="TRUE" /> <param name="size" value="TRUE" /> <param name="plottype" value="boxplot" /> <param name="prob0" value="0.25" /> <param name="prob1" value="0.5" /> <param name="prob2" value="0.75" /> <param name="groupby" value="feature" /> <param name="featurealphaplot" value="0.05" /> <param name="featureonlysig" value="TRUE" /> <output name="adjustedpvaluematrix" file="output_testandplot/iwtomics.testandplot.adjustedpvalue.matrix.txt" compare="sim_size" /> <output name="iwtomicsrespdf" file="output_testandplot/iwtomics.testandplot.iwtomicstestresults.pdf" compare="sim_size" /> <output name="iwtomicssumpdf" file="output_testandplot/iwtomics.testandplot.summaryplot.pdf" compare="sim_size" /> <output name="iwtomicsrdata" file="output_testandplot/iwtomics.testandplot.RData" compare="sim_size" /> <output name="iwtomicstests" file="output_testandplot/iwtomics.testandplot.tests.txt" /> <output name="iwtomicsselectedfeatures" file="output_testandplot/iwtomics.testandplot.selectedfeatures.txt" /> </test> </tests> <help><![CDATA[ This tool statistically evaluates differences in genomic features between groups of regions along the genome. In particular, it implements the Interval-Wise Testing for omics data, an extended version of the Interval-Wise Testing for functional data presented in Pini and Vantini (2017). It allows to perform multiple two sample permutation tests between pairs of region datasets, on several features. It returns the adjusted p-value curves for every test and all possible scales. Moreover, it creates a graphical representation of the Interval-Wise Testing results and a summary plot (optional) with p-values at the maximum scale. The tool *IWTomics Plot with Threshold on Test Scale* permits to select the scale to be used in the plots. ----- **Input files** RData file with the IWTomicsData object, tabular files with region dataset IDs and feature IDs. These files are created by the tool *IWTomics Load Smooth and Plot*. ----- **Output** The tool returns: 1. TXT file with an adjusted p-value matrix for every test performed. Each matrix contains a p-value curve (row) for every scale considered in the test; 2. PDF file with the plotted test results; 3. PDF file with the summary plot; 4. RData with the IWTomicsData object with the test results; 5. Test identifiers; 6. Feature identifiers. 4-6 can be used as input of the tool *IWTomics Plot with Threshold on Test Scale* ----- .. class:: infomark **Notes** This Galaxy tool has been developed by Fabio Cumbo (Third University of Rome, Italy) and Marzia A. Cremona (The Pennsylvania State University, USA). It implements a simplified version of the function *IWTomicsTest*, *plotTest* and *plotSummary* for *IWTomicsData* objects. The complete version can be found in the *R/Bioconductor* package *IWTomics* (see vignette_). .. _vignette: https://bioconductor.org/packages/release/bioc/vignettes/IWTomics/inst/doc/IWTomics.pdf ]]></help> <expand macro="citations" /> </tool>