diff goseq.xml @ 7:9ffae7bc23c2 draft

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/goseq_1_22_0 commit f95b47ed1a09ce14d3b565e8ea56d8bf12c35814-dirty
author mvdbeek
date Mon, 07 Mar 2016 13:57:32 -0500
parents 0e9424413ab0
children 04b9c519d3e1
line wrap: on
line diff
--- a/goseq.xml	Thu Mar 03 09:56:51 2016 -0500
+++ b/goseq.xml	Mon Mar 07 13:57:32 2016 -0500
@@ -1,4 +1,4 @@
-<tool id="goseq" name="goseq" version="0.2.0">
+<tool id="goseq" name="goseq" version="0.2.2">
     <description>tests for overrepresented gene categories</description>
     <macros>
         <import>go_macros.xml</import>
@@ -7,43 +7,62 @@
     <expand macro="stdio" />
     <command interpreter="Rscript">
         goseq.r --dge_file "$dge_file"
-        --p_adj_column "$p_adj_column"
-        --cutoff "$p_adj_cutoff"
         --length_file "$length_file"
         --category_file "$category_file"
+        #if "$methods['wallenius']":
         --wallenius_tab "$wallenius_tab"
+        #end if
+        #if "$methods['hypergeometric']":
+        --nobias_tab "$nobias_tab"
+        #end if
+        --repcnt "$methods.repcnt"
         --sampling_tab "$sampling_tab"
-        --nobias_tab "$nobias_tab"
+        --p_adj_method "$p_adj_method"
+        --use_genes_without_cat "$use_genes_without_cat"
+        --make_plots "$make_plots"
         --length_bias_plot "$length_bias_plot"
         --sample_vs_wallenius_plot "$sample_vs_wallenius_plot"
-        --repcnt "$repcnt"
-        --use_genes_without_cat "$use_genes_without_cat"
-        --make_plots "$make_plots"
     </command>
     <inputs>
-        <param help="deseq2/edger/limma differential gene expression list" label="DGE list" name="dge_file" type="data" format="tabular" />
-        <param help="Select the column that contains the multiple-testing corrected p-value" label="p adjust column" name="p_adj_column" type="data_column" numeric="true" data_ref="dge_file"/>
+        <param help="A tabular file with gene names in the first column, and TRUE or FALSE in the last column. TRUE means a gene is differentially expressed. See help section for details." label="Differentially expressed gene file" name="dge_file" type="data" format="tabular" />
         <param label="Gene length file for length bias correction" help="You can calculate the gene length using the get length and gc content tool" name="length_file" type="data" format="tabular" required="true" />
         <param label="Gene category file" help="You can obtain a mapping of gene id to gene ontology using the getgo tool" name="category_file" type="data" format="tabular" required="true" />
         <param help="For example, a large number of gene may have no GO term annotated. If this option is set to FALSE, those genes will be ignored in the calculation of p-values. If this option is set to TRUE, then these genes will count towards the total number of genes outside the category being tested"
                name="use_genes_without_cat" label="Count genes without any category?" type="boolean"/>
-        <param help="Typically 0.05 after multiple testing correction" max="1" label="Minimum p adjust value to consider genes as differentially expressed" name="p_adj_cutoff" type="float" value="0.05" />
+        <section name="methods" title="Method options" expanded="True">
+            <param name="wallenius" type="boolean" checked="true" label="Use wallenius method" help="See help for details" />
+            <param name="hypergeometric" type="boolean" checked="false" label="Use hypergeometric method" help="Does not use gene length information. See help for details" />
+            <param help="Draw this many random control gene sets. Set to 0 to not do sampling. Larger values take a long time" label="sampling depth" name="repcnt" size="3" type="integer" min="0" max="10000" value="0" />
+        </section>
+        <param name="p_adj_method" type="select" label="Select a method for multiple hypothesis testing correction">
+            <option value="BH" selected="true">Benjamini-Hochberg [FDR] (1995)</option>
+            <option value="holm">Holm (1979)</option>
+            <option value="hommel">Hommel (1988)</option>
+            <option value="hochberg">Hochberg (1988)</option>
+            <option value="bonferroni">Bonferroni</option>
+            <option value="BY">Benjamini - Yekutieli (2001)</option>
+        </param>
         <param help="These plots may help you compare the different p-value estimation methods that goseq can use." label="Produce diagnostic plots?" name="make_plots" type="boolean"></param>
-        <param help="Draw this many random control gene sets. Set to 0 to not do sampling. Larger values take a long time" label="sampling depth" name="repcnt" size="3" type="integer" min="0" max="10000" value="0" />
     </inputs>
     <outputs>
         <data format="pdf" label="length bias plot" name="length_bias_plot">
             <filter>make_plots</filter>
+            <filter>methods['hypergeometric']</filter>
         </data>
         <data format="pdf" label="Plot P-value from sampling against wallenius distribution" name="sample_vs_wallenius_plot">
-            <filter>repcnt != 0</filter>
+            <filter>methods['repcnt'] != 0</filter>
+            <filter>methods['wallenius']</filter>
             <filter>make_plots</filter>
         </data>
-        <data format="tabular" label="Ranked category list - no length bias correction" name="nobias_tab" />
+        <data format="tabular" label="Ranked category list - no length bias correction" name="nobias_tab">
+            <filter>methods['hypergeometric']</filter>
+        </data>
         <data format="tabular" label="Ranked category list - sampling" name="sampling_tab">
-            <filter>repcnt != 0</filter>
+            <filter>methods['repcnt'] != 0</filter>
         </data>
-        <data format="tabular" label="Ranked category list - wallenius approx. of p-values" name="wallenius_tab" />
+        <data format="tabular" label="Ranked category list - wallenius method" name="wallenius_tab">
+            <filter>methods['wallenius']</filter>
+        </data>
     </outputs>
     <tests>
         <test>
@@ -66,14 +85,39 @@
 
         **Input files**
 
-        goseq needs information about the length of a gene to correct for potential length bias in differentially expressed genes.
+        *DGE list:*
+        goseq needs a tabular file with genes in the first column, and TRUE or FALSE in the last column.
+        TRUE means the gene should count as differentially expressed, FALSE means it is not differentially expressed.
+        You can use the "Compute an expression on every row" tool to create a TRUE / FALSE column for your dataset.
+
+        *Gene length file:*
+        goseq needs information about the length of a gene to correct for potential length bias in differentially expressed genes
+        using a prodbability weight function (PWF).
         The format of this file is tabular, with gene_id in the first column and length in the second column.
         The "get length and gc content" tool can produce such a file.
 
+        *Gene category file:*
         You will also need a file describing the membership of genes in categories. The format of this file is gene_id in the first column,
         category name in the second column. If you are interested in gene ontology categories you can use the getgo file to retrive
         gene ontologies for model organisms, or you can construct your own file.
 
+        **Method options**
+
+        3 methods, "Wallenius", "Sampling" and "Hypergeometric", can be used to calculate the p-values as follows.
+
+        *"Wallenius"* approximates the true distribution of numbers of members of a category amongst DE genes by the Wallenius non-central hypergeometric distribution.
+        This distribution assumes that within a category all genes have the same probability of being chosen.
+        Therefore, this approximation works best when the range in probabilities obtained by the probability weighting function is small.
+
+        *"Sampling"* uses random sampling to approximate the true distribution and uses it to calculate the p-values for over (and under) representation of categories.
+        Although this is the most accurate method given a high enough value of sampling depth, its use quickly becomes computationally prohibitive.
+
+        *"Hypergeometric"* assumes there is no bias in power to detect differential expression at all and calculates the p-values using a standard hypergeometric distribution.
+        Useful if you wish to test the effect of selection bias on your results.
+
+        CAUTION:  "Hypergeometric" should NEVER be used for producing results for biological interpretation.
+        If there is genuinely no bias in power to detect DE in your experiment, the PWF will reflect this and the other methods will produce accuracte results.
+
         .. _manual: https://bioconductor.org/packages/release/bioc/vignettes/goseq/inst/doc/goseq.pdf