Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tools/univariate/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.Rproj.user
12 changes: 12 additions & 0 deletions tools/univariate/.shed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: univariate
owner: ethevenot
description: '[W4M][Metabolomics][LC-MS][GC-MS][NMR] Univariate statistics.'
homepage_url: http://workflow4metabolomics.org
long_description: 'The module performs two sample tests (t-test and Wilcoxon rank test), analysis of variance and Kruskal-Wallis rank test, and correlation tests (by using either the pearson or the spearman correlation).'
remote_repository_url: https://github.com/workflow4metabolomics/tools-metabolomics/
homepage_url: https://github.com/odisce/
categories:
- Metabolomics
- Transcriptomics
- Proteomics
- Statistics
517 changes: 517 additions & 0 deletions tools/univariate/LICENSE.md

Large diffs are not rendered by default.

93 changes: 93 additions & 0 deletions tools/univariate/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
Univariate parametric and non-parametric hypothesis testing with correction for multiple testing
================================================================================================

A Galaxy module from the [Workflow4metabolomics](http://workflow4metabolomics.org) infrastructure

Status: [![Build Status](https://travis-ci.org/workflow4metabolomics/univariate.svg?branch=master)](https://travis-ci.org/workflow4metabolomics/univariate).

### Description

**Version:** 2.2.4
**Date:** 2018-01-11
**Author:** Marie Tremblay-Franco (INRA, MetaToul, MetaboHUB, W4M Core Development Team) and Etienne A. Thevenot (CEA, LIST, MetaboHUB, W4M Core Development Team)
**Email:** [marie.tremblay-franco(at)toulouse.inra.fr](mailto:[email protected]); [etienne.thevenot(at)cea.fr](mailto:[email protected])
**Citation:** Thevenot E.A., Roux A., Xu Y., Ezan E. and Junot C. (2015). Analysis of the human adult urinary metabolome variations with age, body mass index and gender by implementing a comprehensive workflow for univariate and OPLS statistical analyses. *Journal of Proteome Research*, **14**:3322-3335. [doi:10.1021/acs.jproteome.5b00354](http://dx.doi.org/10.1021/acs.jproteome.5b00354)
**Reference history:** [W4M00001a_sacurine-subset-statistics](http://galaxy.workflow4metabolomics.org/history/list_published), [W4M00004_mtbls1](http://galaxy.workflow4metabolomics.org/history/list_published)
**Licence:** CeCILL
**Funding:** Agence Nationale de la Recherche ([MetaboHUB](http://www.metabohub.fr/index.php?lang=en&Itemid=473) national infrastructure for metabolomics and fluxomics, ANR-11-INBS-0010 grant)

### Installation

* Configuration file: `univariate_config.xml`
* Image file:
+ `static/images/univariate_workflowPositionImage.png`
* Wrapper file: `univariate_wrapper.R`
* Script file: `univariate_script.R`
* R packages
+ **batch** from CRAN

```r
install.packages("batch", dep=TRUE)
```
+ **PMCMR** from CRAN

```r
install.packages("PMCMR", dep=TRUE)
```

### Tests

The code in the wrapper can be tested by running the `runit/univariate_runtests.R` R file

You will need to install **RUnit** package in order to make it run:
```r
install.packages('RUnit', dependencies = TRUE)
```

### Working example

See the **W4M00001a_sacurine-subset-statistics**, **W4M00001b_sacurine-subset-complete**, **W4M00002_mtbls2**, **W4M00003_diaplasma** shared histories in the **Shared Data/Published Histories** menu (https://galaxy.workflow4metabolomics.org/history/list_published)

### News

###### CHANGES IN VERSION 2.2.4

MINOR MODIFICATION

* Internal minor modifications for building and testing

###### CHANGES IN VERSION 2.2.0

MAJOR MODIFICATION

* ANOVA and Kruskal-Wallis: The p-values of the post-hoc tests (i.e. from pairwise comparisons) are now further corrected for multiple testing over all variables (previously, only the p-value of the -first- omnibus test was corrected over all variables)

MINOR MODIFICATION

* All values in the 'dif', adjusted p-value, and 'sig' columns are now displayed (previously, the values were set to NA when the p-value of the omnibus test was not significant)

NEW FEATURE

* Graphic: a single pdf file containing the graphics of all significant tests is now produced as '_figure.pdf' output: boxplots (respectively scatterplots with the regression line in red and the R2 value) are displayed when the factor of interest is qualitative (respectively quantitative). The corrected p-value is indicated in the title of each plot

###### CHANGES IN VERSION 2.1.4

NEW FEATURE

* Level names are now separated by '.' instead of '-' previously in the column names of the output variableMetadata table (e.g., 'jour_ttest_J3.J10_fdr' instead of 'jour_ttest_J3-J10_fdr' previously)

INTERNAL MODIFICATION

* Minor internal changes

###### CHANGES IN VERSION 2.1.2

INTERNAL MODIFICATION

* Minor internal changes in .shed.yml for toolshed export

###### CHANGES IN VERSION 2.1.1

INTERNAL MODIFICATION

* Internal handling of 'NA' p-values (e.g. when intensities are identical in all samples).
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions tools/univariate/test-data/dataMatrix.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
dataMatrix s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 s32
v1 7.416640524 6.9916690517 7.3404441347 7.0128372669 7.1702617447 6.820858055 7.2648178466 6.9561684785 7.2966652122 7.2695129676 7.2695129676 6.7986507145 6.9749720403 6.7788745443 7.0791812822 7.3617278549 7.4281348102 6.967548023 7.2304489469 6.6608655728 6.9614211415 6.8959747875 7.1398791179 7.2201081142 7.1673173643 6.6857418281 7.1789769761 6.7788745443 6.7291648707 6.7466342768 6.8954226013 6.9454686344
v2 7.4563660483 6.9014583759 7.3873898441 6.9599948859 7.2095150414 6.7007038037 7.3159703664 6.8876173566 7.3010300174 7.2966652122 7.3138672415 6.7275413384 6.9863238219 6.7435098431 7.1038037552 7.3838153839 7.4409090978 6.7737865181 7.2174839705 6.48995862 6.8494194752 6.8344207673 7.1238516736 7.212187631 7.2041200098 6.6910815806 7.2900346336 6.7427252098 6.7185017719 6.6180482014 6.8512584099 6.9329808726
v3 6.8785218529 6.7839036507 6.9025468337 7.0086002143 6.9314579215 6.8129134235 6.8305887328 7.0374265378 6.8767950339 6.8457180799 6.7888751864 6.9929951426 7.0374265378 6.8215135939 7.0718820441 6.809559782 6.8122447637 6.7795965634 6.8129134235 6.9599948859 6.8014037786 6.7355989795 6.8075350957 6.9929951426 6.7686381752 6.9339932144 6.7611758884 6.9740509489 6.9768083831 6.7058637978 6.9790929462 6.7032914641
v4 7.1303338007 7.1398791179 7.0899051467 7.110589744 6.9947569885 6.9978231244 7.0374265378 7.1003705796 6.9698816903 6.8048207468 6.8543061025 6.6655810848 6.705008045 6.7275413384 6.7442930614 6.9498777528 7.1583625223 7.2013971516 7.1673173643 6.9169800999 7.1003705796 7.0453230179 7.0606978781 7.1003705796 7.0492180614 6.7693773999 6.7774268949 6.9211661027 6.8561245047 6.9656720182 7.0086002143 6.9758911823
v5 7.0530784819 6.99122612 7.0569048894 6.9698816903 6.8603380665 6.8375885014 6.9633155586 7.0170333811 7.0681858989 6.9633155586 6.95375974 6.7481881046 6.7686381752 6.8175654357 6.8394781102 7.0492180614 7.1038037552 7.0681858989 7.0755469979 6.7259117139 6.9339932144 6.8948697121 6.9464523141 7.0043214168 6.9009131223 6.6875290504 6.7634280684 6.7209858267 6.6454223676 6.7923917595 6.7902852344 6.8312297579
v6 6.9876663096 7.0969100478 7.1072100036 7.0569048894 7.0000000434 6.9973864281 7.0644580267 7.0863598663 7.0043214168 6.9772662582 6.9434945654 6.9680157607 6.9556877984 7.1553360678 6.9454686344 6.9309490821 7.0086002143 7.0334237957 7.0086002143 6.9206450535 7.0043214168 6.9749720403 6.9489018098 6.9400182049 6.8750613213 6.9434945654 6.9057959343 6.9614211415 6.9518230838 6.9415114823 6.9304396457 6.9304396457
7 changes: 7 additions & 0 deletions tools/univariate/test-data/output-variableMetadata.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
variableMetadata sample_mean qual_kruskal_fdr qual_kruskal_sig qual_kruskal_B.A_dif qual_kruskal_C.A_dif qual_kruskal_D.A_dif qual_kruskal_C.B_dif qual_kruskal_D.B_dif qual_kruskal_D.C_dif qual_kruskal_B.A_fdr qual_kruskal_C.A_fdr qual_kruskal_D.A_fdr qual_kruskal_C.B_fdr qual_kruskal_D.B_fdr qual_kruskal_D.C_fdr qual_kruskal_B.A_sig qual_kruskal_C.A_sig qual_kruskal_D.A_sig qual_kruskal_C.B_sig qual_kruskal_D.B_sig qual_kruskal_D.C_sig
v1 12620948.56 0.147579228303049 0 0.0827976191000008 -0.0378359353499995 -0.254400932999999 -0.12063355445 -0.3371985521 -0.21656499765 0.999945671392641 0.99999320349658 0.185342280966466 0.997174540126794 0.401201067449129 0.580170916884995 0 0 0 0 0 0
v2 12661823.42 0.246364577097618 0 0.11547952005 -0.0981193892499999 -0.2877631538 -0.2135989093 -0.40324267385 -0.18964376455 0.999945671392641 0.99999320349658 0.291618067987092 0.997174540126794 0.401201067449129 0.890397531402986 0 0 0 0 0 0
v3 7680621.526 0.293234285978368 0 -0.0292777863999998 -0.0806444136 -0.0392186484999995 -0.0513666272000002 -0.00994086209999967 0.0414257651000005 0.999945671392641 0.99999320349658 0.593281055056761 0.997174540126794 0.593281055056761 0.999155846185138 0 0 0 0 0 0
v4 9901182.687 0.000819466212247517 1 -0.32058095905 0.00523271645000012 -0.1517188027 0.3258136755 0.16886215635 -0.15695151915 0.0133536911280914 0.99999320349658 0.185342280966466 0.00430289478770107 0.593281055056761 0.143731083414931 1 0 0 1 0 0
v5 8311866.237 0.0115079177714078 1 -0.0839349800499996 -0.00516703969999988 -0.203697253750001 0.0787679403499997 -0.119762273700001 -0.198530214050001 0.999945671392641 0.99999320349658 0.0336157236420893 0.997174540126794 0.401201067449129 0.073221827596323 0 0 1 0 0 0
v6 9792909.819 0.00429379409695042 1 -0.0988296785000005 -0.0710347295000009 -0.124705894050001 0.0277949489999996 -0.0258762155500003 -0.0536711645499999 0.535700151485478 0.99999320349658 0.00294595180681068 0.997174540126794 0.401201067449129 0.302648332248575 0 0 1 0 0 0
33 changes: 33 additions & 0 deletions tools/univariate/test-data/sampleMetadata.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
sampleMetadata quant qual
s1 56 A
s2 24 A
s3 35 A
s4 32 A
s5 54 A
s6 53 A
s7 30 A
s8 20 A
s9 41 B
s10 34 B
s11 44 B
s12 43 B
s13 52 B
s14 46 B
s15 51 B
s16 36 B
s17 31 C
s18 25 C
s19 40 C
s20 50 C
s21 22 C
s22 29 C
s23 49 C
s24 19 C
s25 55 D
s26 39 D
s27 45 D
s28 26 D
s29 23 D
s30 42 D
s31 33 D
s32 21 D
7 changes: 7 additions & 0 deletions tools/univariate/test-data/variableMetadata.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
variableMetadata sample_mean
v1 12620948.56
v2 12661823.42
v3 7680621.526
v4 9901182.687
v5 8311866.237
v6 9792909.819
1 change: 1 addition & 0 deletions tools/univariate/test/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.tsv
16 changes: 16 additions & 0 deletions tools/univariate/test/test-univ
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

# Constants {{{1
################################################################

PROG_PATH=$(dirname $0)

# MAIN {{{1
################################################################

$PROG_PATH/../univariate_wrapper.R dataMatrix_in $PROG_PATH/../test-data/dataMatrix.tsv sampleMetadata_in $PROG_PATH/../test-data/sampleMetadata.tsv variableMetadata_in $PROG_PATH/../test-data/variableMetadata.tsv facC qual tesC kruskal adjC fdr thrN 0.05 variableMetadata_out $PROG_PATH/outputVariableMetadata.tsv

if ! diff "$PROG_PATH/outputVariableMetadata.tsv" "$PROG_PATH/../test-data/output-variableMetadata.tsv" ; then
echo "Incorrect output variable metadata." >&2
exit 1
fi
15 changes: 15 additions & 0 deletions tools/univariate/univariate.Rproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Version: 1.0

RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default

EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8

RnwWeave: knitr
LaTeX: pdfLaTeX

BuildType: Makefile
Loading
Loading