comparison mannwhitney_de.xml @ 0:c67dba545a37 draft

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_mannwhitney_de commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
author artbio
date Mon, 24 Jun 2019 13:39:39 -0400
parents
children aef09ac6d0a5
comparison
equal deleted inserted replaced
-1:000000000000 0:c67dba545a37
1 <tool id="mannwhitney_de" name="Perform a differential analysis" version="0.9.0">
2 <description>using a Mann-Whitney test</description>
3 <requirements>
4 <requirement type="package" version="1.3.2=r3.3.2_0">r-optparse</requirement>
5 </requirements>
6 <stdio>
7 <exit_code range="1:" level="fatal" description="Tool exception" />
8 </stdio>
9 <command detect_errors="exit_code"><![CDATA[
10 Rscript $__tool_directory__/MannWhitney_DE.R
11 --input '$input'
12 --sep
13 #if $sep == 'tab':
14 'tab'
15 #elif $sep == 'comma':
16 'comma'
17 #end if
18 --colnames '$colnames'
19 --factor1 '$factor1'
20 --factor2 '$factor2'
21 --comparison_factor_file '$comparison_factor_file'
22 --fdr '$fdr'
23 $log
24 --output '$output'
25 ]]></command>
26 <inputs>
27 <param name="input" type="data" format="txt,tabular" label="Expression data" help="a csv or tsv table file" />
28 <param name="sep" type="select" label="Indicate column separator">
29 <option value="tab" selected="true">Tabs</option>
30 <option value="comma">Comma</option>
31 </param>
32 <param name="colnames" type="select" label="Firt row contains column names">
33 <option value="TRUE" selected="true">Yes</option>
34 <option value="FALSE">No</option>
35 </param>
36 <param name="comparison_factor_file" type="data" format="tabular" label="Comparison factor table"
37 help="A tsv table file with two columns : cell identifiers and a column that split cells into two categories." />
38 <param name="factor1" type="text" label="Condition-1. The first level (value) that the comparison factor can take." help="typical values could be 'LOW', 'wt', 't1', etc."/>
39 <param name="factor2" type="text" label="Condition-2. The second level (value) that the comparison factor can take." help="typical values could be 'HIGH', 'mutant', 't2', etc."/>
40 <param name="fdr" type="float" value="0.01" label="FDR threshold"
41 help="Reject H0 of no differential expression if adjusted p-values (Benjamini-Hochberg correction) is higher than the FDR cut-off."/>
42 <param name="log" type="boolean" checked="false" label="Expression data are log-transformed" truevalue="--log" falsevalue=""/>
43
44 </inputs>
45 <outputs>
46 <data name="output" format="tabular" label="Results of Mann-Whitney differential analysis from ${on_string}" />
47 </outputs>
48 <tests>
49 <test>
50 <param name="input" value="filtered-0.05.tab" ftype="txt"/>
51 <param name="sep" value="tab" />
52 <param name="colnames" value="TRUE"/>
53 <param name="comparison_factor_file" value="signature_2columns.tsv" ftype="tabular"/>
54 <param name="factor1" value="LOW"/>
55 <param name="factor2" value="HIGH"/>
56 <param name="fdr" value="0.01"/>
57 <param name="log" value="true"/>
58 <output name="output" file="geneMetadata_log.tsv" ftype="tabular"/>
59 </test>
60 <test>
61 <param name="input" value="filterCells_100.tsv" ftype="txt"/>
62 <param name="sep" value="tab" />
63 <param name="colnames" value="TRUE"/>
64 <param name="comparison_factor_file" value="signature_2columns.tsv" ftype="tabular"/>
65 <param name="factor1" value="LOW"/>
66 <param name="factor2" value="HIGH"/>
67 <param name="fdr" value="0.01"/>
68 <param name="log" value="false"/>
69 <output name="output" file="geneMetadata_nolog.tsv" ftype="tabular"/>
70 </test>
71 </tests>
72 <help>
73
74 **What it does**
75
76 The tools takes a table of gene expression values (e.E. log2(CPM+1), etc...) from single cell RNAseq sequencing libraries (columns)
77
78 and a metadata file that contains at least two columns :
79 * Cell identifiers
80 * A Column that differentiates cell in two groups (the two levels of a comparison factor). It must be a column with only values (the factor levels).
81
82 For each gene (rows in expression data file), this script perform a 2-sided Mann-Whitney test between
83 the two groups of cells (high/low, mutant/wild type) and then adjust the returned p-values by using the
84 Benjamini-Hochberg (BH) correction. A False Discovery Rate (FDR) threshold is used to determine if gene expression
85 can be considered as significantly deviant for the H0 hypothesis of no-differential-expression (p-adjust below FDR cut-off) or not (p-adjust above the FDR cut-off).
86
87 .. class:: warningmark
88
89 **Comparison plan**
90
91 Note that log2Fold-Changes computed by the tool are based on the comparison of condition-2 (level-2) versus condition-1 (level-1) i.e.
92 the tools returns the log2FC in condition-2 **relative** to condition-1.
93
94 **Output**
95
96 The tools returns a result table. For each row (genes) :
97
98 ==================== ======================================================================================================
99 Column Description
100 -------------------- ------------------------------------------------------------------------------------------------------
101 mean mean expression across all cells
102 SD standard deviation of its expression across all cells
103 variance variance of expression across all cells
104 Percentage_detection (number of cells where the gene is detected (expression value superior to 0) / number of cells) * 100
105 mean_factor2 mean expression across cells of the second group (of log transformed expression values)
106 mean_factor1 mean expression across cells of the first group (of log transformed expression values)
107 fold_change mean_factor1 - mean_factor2 (difference of log)
108 statistic W statistic of Mann-Whitney test
109 p.value p-value of Mann-Whitney test
110 p.adjust p-values adjusted from the BH correction
111 Significant TRUE/FALSE vector (if p-adjust inferior to FDR cut-off then the value is TRUE)
112 ==================== ======================================================================================================
113
114 </help>
115 <citations>
116 <citation type="bibtex">
117 @Manual{,
118 title = {R: A Language and Environment for Statistical Computing},
119 author = {{R Core Team}},
120 organization = {R Foundation for Statistical Computing},
121 address = {Vienna, Austria},
122 year = {2014},
123 url = {http://www.R-project.org/},
124 }
125 </citation>
126 </citations>
127 </tool>