view fgsea.xml @ 0:9bb7943b5263 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/fgsea commit 9a6eda48463d6c19e9c5f3f2f8109f33de74855d-dirty
author iuc
date Sat, 20 Oct 2018 05:47:18 -0400
parents
children 101b208a3e1a
line wrap: on
line source

<tool id="fgsea" name="fgsea" version="1.6.0">
    <description>- fast preranked gene set enrichment analysis</description>
    <requirements>
        <requirement type="package" version="1.6.0">bioconductor-fgsea</requirement>
        <requirement type="package" version="1.6.0">r-optparse</requirement>
    </requirements>
    <version_command><![CDATA[
echo $(R --version | grep version | grep -v GNU)", fgsea version" $(R --vanilla --slave -e "library(fgsea); cat(sessionInfo()\$otherPkgs\$fgsea\$Version)" 2> /dev/null | grep -v -i "WARNING: ")", optparse version" $(R --vanilla --slave -e "library(optparse); cat(sessionInfo()\$otherPkgs\$optparse\$Version)" 2> /dev/null | grep -v -i "WARNING: ")
    ]]></version_command>
    <command detect_errors="exit_code"><![CDATA[
#set $gmt = True
#if $sets_file.is_of_type("rdata"):
     #set $gmt = False
#end if

Rscript '$__tool_directory__/fgsea.R'
--rnk_file '$rnk_file'
--header $header
--sets_file '$sets_file'
--gmt $gmt
--min_size $min_size
--max_size $max_size
--n_perm $n_perm
--out_tab '$out_tab'
--plot_opt $plot_opt
--top_num $top_num
--rda_opt $rda_opt

    ]]></command>
    <inputs>
        <param name="rnk_file" type="data" format="tabular" label="Ranked Genes" help="A tabular file with gene symbols in the first column, and a ranked statistic (e.g. t-statistic or log fold-change) in the second column"/>
        <param name="header" type="boolean" truevalue="True" falsevalue="False" checked="True" label="File has header?" help="If this option is set to Yes, the tool will assume that the ranked genes file has a column header in the first row and the identifers commence on the second line. Default: Yes" />
        <param name="sets_file" type="data" format="tabular,rdata" label="Gene Sets" help="A tabular file in GMT file or an RData file containing a list of gene sets, see below for more information"/>
        <param name="min_size" type="integer" min="0" value="1" label="Minimum Size of Gene Set" help="Minimal size of a gene set to test. All pathways below the threshold are excluded. Default: 1" />
        <param name="max_size" type="integer"  value="500" label="Maximal Size of Gene Set" help="Maximal size of a gene set to test. All pathways above the threshold are excluded. Default: 500" />
        <param name="n_perm" type="integer" min="0" value="1000" label="Number of Permutations" help="Number of permutations to do. Minimial possible nominal p-value is about 1/nperm. Default: 1000" />
        <param name="plot_opt" type="boolean" truevalue="True" falsevalue="False" checked="False" label="Output plots" help="Output a PDF file containing plots for top pathways by P value significance. Default: No"/>
        <param name="top_num" type="integer" value="10" label="Plot top most significant pathways" help="If Output plots is selected the number of top pathways to plot can be specified. Default: 10"/>
        <param name="rda_opt" type="boolean" truevalue="True" falsevalue="False" checked="False" label="Output RData file?" help="Output all the data used by R in the fgsea analysis, can be loaded into R. Default: No" />
    </inputs>

    <outputs>
        <data name="out_tab" format="tabular" label="${tool.name} on ${on_string}: Ranked category list" />
        <data name="out_pdf" format="pdf" from_work_dir="fgsea_plots.pdf" label="${tool.name} on ${on_string}: Plots">
            <filter>plot_opt is True</filter>
        </data>
        <data name="out_rdata" format="rdata" from_work_dir="fgsea_analysis.RData" label="${tool.name} on ${on_string}: RData file">
            <filter>rda_opt is True</filter>
        </data>
    </outputs>

    <tests>
        <test>
            <param name="rnk_file" ftype="tabular" value="t47d_Treatment_DEA_Prog-vs-Control_all_for_GSEA.rnk" />
            <param name="sets_file" ftype="tabular" value="h.all.v6.2.symbols.gmt"/>
            <param name="plot_opt" value="True"/>
            <output name="out_tab" >
                <assert_contents>
                    <has_text_matching expression="pathway.*pval.*padj.*ES.*NES.*nMoreExtreme.*size.*leadingEdge" />
                    <has_text_matching expression="HALLMARK_TNFA_SIGNALING_VIA_NFKB.*0.001" />
                </assert_contents>
            </output>
            <output name="out_pdf" value="out_t47d.pdf" compare="sim_size" delta="12000"/>
        </test>
        <test>
            <param name="rnk_file" ftype="tabular" value="t47d_entrez_ids.rnk" />
            <param name="sets_file" ftype="rdata" value="human_H_v5p2.rdata"/>
            <param name="plot_opt" value="True"/>
            <output name="out_tab" >
                <assert_contents>
                    <has_text_matching expression="pathway.*pval.*padj.*ES.*NES.*nMoreExtreme.*size.*leadingEdge" />
                    <has_text_matching expression="HALLMARK_TNFA_SIGNALING_VIA_NFKB.*0.001" />
                </assert_contents>
            </output>
            <output name="out_pdf" value="out_t47d.pdf" compare="sim_size"/>
        </test>
    </tests>

    <help><![CDATA[
fgsea_ is a Bioconductor package for fast preranked gene set enrichment analysis (GSEA). The performance is achieved by using an algorithm for cumulative GSEA-statistic calculation. This allows to reuse samples between different gene set sizes. See the preprint_ for algorithmic details.

-----

**Inputs**

**Ranked Genes**

A two-column file containing a ranked list of genes is required. The first column must contain the gene identifiers and the second column the statistic used to rank. Gene identifiers must be unique (not repeated) within the file and must be the same type as the identifiers in the Gene Sets file.

Example:

    =========  ============
    Symbol     Ranked Stat
    =========  ============
    VDR        67.198
    IL20RA     65.963
    MPHOSPH10  51.353
    RCAN1      50.269
    HILPDA     50.015
    TSC22D3    47.496
    FAM107B    45.926
    =========  ============

**Gene Sets**

A Gene Sets file is required. This can be a tabular file in Gene Matrix Transposed (GMT) format. In GMT format, each row represents a gene set, with the set name in the first column, a description in the second, then the identifiers of the genes in the set in the following columns, see the example below. GMT files with any identifiers (e.g. Entrez IDs, Symbols) can be used but the same type of identifiers must be present in the Ranked Genes file. More information on `GMT format`_ can be found at the Broad website. GMT files for human gene sets can be obtained from the Broad's MSigDB_ collections.

Example:
    ==================  ==================================================================  ======  =====   ====
    HALLMARK_APOPTOSIS  http://www.broadinstitute.org/gsea/msigdb/cards/HALLMARK_APOPTOSIS  CASP3   CASP9   ...
    HALLMARK_HYPOXIA    http://www.broadinstitute.org/gsea/msigdb/cards/HALLMARK_HYPOXIA    PGK1    PDK1    ...
    ==================  ==================================================================  ======  =====   ====


Alternatively, an RData file containing a collection of gene sets can be input, like the ones provided here_ containing mouse versions of the MSigDB collections.

-----

**Outputs**

* A Tabular file of gene set rankings
* A PDF with plots of top pathways (optional)

-----

Wrapper released under MIT License. Copyright (c) 2017 Mark Dunning

.. _fgsea: https://bioconductor.org/packages/release/bioc/html/fgsea.html
.. _preprint: http://biorxiv.org/content/early/2016/06/20/060012
.. _GMT format: https://software.broadinstitute.org/cancer/software/gsea/wiki/index.php/Data_formats#GMT:_Gene_Matrix_Transposed_file_format_.28.2A.gmt.29
.. _MSigDB: http://software.broadinstitute.org/gsea/msigdb/collections.jsp
.. _here: http://bioinf.wehi.edu.au/software/MSigDB/index.html

    ]]></help>
    <citations>
        <citation type="doi">10.1101/060012</citation>
    </citations>
</tool>