Skip to content

Commit

Permalink
improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhuoqing Fang committed Feb 2, 2016
1 parent 4e8870e commit 14cfd18
Show file tree
Hide file tree
Showing 25 changed files with 670 additions and 403 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include LICENSE.txt README.rst
include LICENSE.txt README.rst requirements.txt
Binary file modified docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/_build/doctrees/index.doctree
Binary file not shown.
Binary file added docs/_build/doctrees/introduction.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/run.doctree
Binary file not shown.
3 changes: 1 addition & 2 deletions docs/_build/html/_modules/gseapy/algorithm.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@


<ul>
<li class="toctree-l1"><a class="reference internal" href="../../index.html">Welcome to GSEAPY&#8217;s documentation!</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../index.html#indices-and-tables">Indices and tables</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../introduction.html">Welcome to GSEAPY&#8217;s documentation!</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../run.html">How to Use GSEAPY</a></li>
</ul>

Expand Down
3 changes: 1 addition & 2 deletions docs/_build/html/_modules/gseapy/gsea.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@


<ul>
<li class="toctree-l1"><a class="reference internal" href="../../index.html">Welcome to GSEAPY&#8217;s documentation!</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../index.html#indices-and-tables">Indices and tables</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../introduction.html">Welcome to GSEAPY&#8217;s documentation!</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../run.html">How to Use GSEAPY</a></li>
</ul>

Expand Down
19 changes: 9 additions & 10 deletions docs/_build/html/_modules/gseapy/parser.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@


<ul>
<li class="toctree-l1"><a class="reference internal" href="../../index.html">Welcome to GSEAPY&#8217;s documentation!</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../index.html#indices-and-tables">Indices and tables</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../introduction.html">Welcome to GSEAPY&#8217;s documentation!</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../run.html">How to Use GSEAPY</a></li>
</ul>

Expand Down Expand Up @@ -142,7 +141,7 @@ <h1>Source code for gseapy.parser</h1><div class="highlight"><pre>
<div class="viewcode-block" id="gsea_cls_parser"><a class="viewcode-back" href="../../run.html#gseapy.parser.gsea_cls_parser">[docs]</a><span class="k">def</span> <span class="nf">gsea_cls_parser</span><span class="p">(</span><span class="n">cls</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Extact class(phenotype) name from .cls file.</span>
<span class="sd"> </span>
<span class="sd"> :param cls: the location of GSEA-P .cls file.</span>
<span class="sd"> :param cls: the .cls file where located inside edb folder.</span>
<span class="sd"> :return: phenotype name and a list of class vector. </span>
<span class="sd"> &quot;&quot;&quot;</span>

Expand All @@ -160,7 +159,7 @@ <h1>Source code for gseapy.parser</h1><div class="highlight"><pre>
<div class="viewcode-block" id="gsea_edb_parser"><a class="viewcode-back" href="../../run.html#gseapy.parser.gsea_edb_parser">[docs]</a><span class="k">def</span> <span class="nf">gsea_edb_parser</span><span class="p">(</span><span class="n">results_path</span><span class="p">,</span><span class="n">index</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,):</span>
<span class="sd">&quot;&quot;&quot;Parse results.edb file stored under **edb** file folder. </span>

<span class="sd"> :param results_path: location of GSEA Desktop results.</span>
<span class="sd"> :param results_path: the .results file where lcoated inside edb folder.</span>
<span class="sd"> :param index: gene_set index of gmt database, used for iterating items.</span>
<span class="sd"> </span>
<span class="sd"> :return: enrichment_term, hit_index,nes, pval, fdr.</span>
Expand Down Expand Up @@ -197,9 +196,9 @@ <h1>Source code for gseapy.parser</h1><div class="highlight"><pre>

</div>
<div class="viewcode-block" id="gsea_rank_metric"><a class="viewcode-back" href="../../run.html#gseapy.parser.gsea_rank_metric">[docs]</a><span class="k">def</span> <span class="nf">gsea_rank_metric</span><span class="p">(</span><span class="n">rnk</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;parse .rnk file. This file contains ranking correlation vector and gene names or ids. </span>
<span class="sd">&quot;&quot;&quot;Parse .rnk file. This file contains ranking correlation vector and gene names or ids. </span>
<span class="sd"> </span>
<span class="sd"> :param rnk: location of GSEA-P .rnk file</span>
<span class="sd"> :param rnk: the .rnk file where located inside the edb folder.</span>
<span class="sd"> :return: a pandas DataFrame with 3 columns names are::</span>
<span class="sd"> </span>
<span class="sd"> &#39;gene_name&#39;,&#39;rank&#39;,rank2&#39;</span>
Expand All @@ -214,15 +213,15 @@ <h1>Source code for gseapy.parser</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="n">rank_metric</span>
</div>
<div class="viewcode-block" id="gsea_gmt_parser"><a class="viewcode-back" href="../../run.html#gseapy.parser.gsea_gmt_parser">[docs]</a><span class="k">def</span> <span class="nf">gsea_gmt_parser</span><span class="p">(</span><span class="n">gmt</span><span class="p">,</span> <span class="n">min_size</span> <span class="o">=</span> <span class="mi">3</span><span class="p">,</span> <span class="n">max_size</span> <span class="o">=</span> <span class="mi">5000</span><span class="p">,</span> <span class="n">gene_list</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;parser gene_sets.gmt(gene set database) file. </span>
<span class="sd">&quot;&quot;&quot;Parse gene_sets.gmt(gene set database) file. </span>
<span class="sd"> </span>
<span class="sd"> :param gmt: Location of gene_sets.gmt file.</span>
<span class="sd"> :param gmt: the gene_sets.gmt file where loacated inside edb folder.</span>
<span class="sd"> :param min_size: Minimum allowed number of genes from gene set also the data set. Default: 3. </span>
<span class="sd"> :param max_size: Maximum allowed number of genes from gene set also the data set. Default: 5000.</span>
<span class="sd"> :gene_list: Used for filtering gene set. Only used this argument for :func:`run` method.</span>
<span class="sd"> :param gene_list: Used for filtering gene set. Only used this argument for :func:`run` method.</span>
<span class="sd"> :return: Return a new filtered gene set database dictionary. </span>

<span class="sd"> **DO NOT** filtering gene sets, when use :func:`replot`. Because ``GSEA`` Desktop have already</span>
<span class="sd"> **DO NOT** filter gene sets, when use :func:`replot`. Because ``GSEA`` Desktop have already</span>
<span class="sd"> do this for you.</span>
<span class="sd"> </span>
<span class="sd"> &quot;&quot;&quot;</span>
Expand Down
3 changes: 1 addition & 2 deletions docs/_build/html/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@


<ul>
<li class="toctree-l1"><a class="reference internal" href="../index.html">Welcome to GSEAPY&#8217;s documentation!</a></li>
<li class="toctree-l1"><a class="reference internal" href="../index.html#indices-and-tables">Indices and tables</a></li>
<li class="toctree-l1"><a class="reference internal" href="../introduction.html">Welcome to GSEAPY&#8217;s documentation!</a></li>
<li class="toctree-l1"><a class="reference internal" href="../run.html">How to Use GSEAPY</a></li>
</ul>

Expand Down
127 changes: 13 additions & 114 deletions docs/_build/html/_sources/index.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.. GSEAPY documentation master file, created by
sphinx-quickstart on Mon Feb 1 13:52:57 2016.
You can adapt this file completely to your liking, but it should at least
You can adapt this file completely to your linking, but it should at least
contain the root `toctree` directive.

Welcome to GSEAPY's documentation!
==================================
=====================================================

GSEAPY: Gene Set Enrichment Analysis in Python.

Expand All @@ -13,10 +13,16 @@ GSEAPY: Gene Set Enrichment Analysis in Python.
.. image:: https://travis-ci.org/BioNinja/gseapy.svg?branch=master
:target: https://travis-ci.org/BioNinja/gseapy

.. image:: https://readthedocs.org/projects/gseapy/badge/?version=latest
:target: http://gseapy.readthedocs.org/en/latest/?badge=latest
:alt: Documentation Status


.. image:: https://img.shields.io/github/license/mashape/apistatus.svg




GSEAPY is a python wrapper for **GESA**.It's used for convenient GO enrichments
and produce **publishable quality figures** from python. GSEAPY could be used for **RNA-seq, ChIP-seq, Microarry** data.

Expand All @@ -28,127 +34,20 @@ statistically significant, concordant differences between two biological states
The full ``GSEA`` is far too extensive to describe here; see
`GSEA <http://www.broadinstitute.org/cancer/software/gsea/wiki/index.php/Main_Page>`_ documentation for more information.

Why GSEAPY
-----------------------------------------------------

For Gene Enrichment Analysis, ``GSEA`` is still the one of best choice.

However, When you have large number of expression tables, or ``GO`` terms to enrich, ``GSEA`` desktop
version is inconvinient. What's more, the R version of GSEA has not been updated since 2006.
What's worse, ``GSEA`` desktop version do not provide means to modify plots,
like legends, ticks......

As a researcher of life science, I want a modern ``GSEA`` with lastest features. It can produce pubilishable
figures, and do many jobs at the same time without using mouse to select differrent data table,
differrent gene sets repeatly.





Features of GSEAPY
------------------------------------------------------

#. GSEAPY could reproduce the GSEA figures using GSEA desktop version results.

#. GSEAPY could be used directly to perform enrichment anlysis. All parameters are same with ``GSEA``

#. GSEAPY is written in ``python``, using the same algorithm of ``GSEA`` Desktop version.

#. GSEAPY produce figures in pdf format by default, which are ready for publishing and easy to modifiy.

#. GSEAPY Enhancement will be considered. If you would like to contribute, please @BioNinja on ``Github``.



GSEA desktop version output:
-------------------------------------------------
This is an example of GSEA desktop application output

.. figure:: GSEA_OCT4_KD.png




GSEAPY output
-----------------------------------------------
Using the same algorithm by ``GSEA``, GSEAPY reproduce the example above.

.. figure:: gseapy_OCT4_KD.png
.. toctree::
:maxdepth: 2



Generated by GSEAPY

**GSEAPY figures are PDF formats by default.** Other matplotlib figures formats are supported, too.

You can modify ``GSEA`` plots easily in .pdf files. Please Enjoy.





Installation
----------------

| Install gseapy package from pypi and download

.. code:: bash

$ pip install gseapy

| You may instead want to use the development version from Github, by running

.. code:: bash

$ pip install git+git://github.com/BioNinja/gseapy.git#egg=gseapy


Dependency
--------------
* Python 2.7 or 3.3+


Mandatory
~~~~~~~~~~~~~~~~
introduction.rst
run.rst

* Numpy
* Pandas
* Matplotlib
* Beautifulsoup4

You may also need **lxml, html5lib**, if you could not parse xml files.



Run GSEAPY
-----------------

| GSEAPY has two subcommands: ``replot``, ``call``.

| The ``replot`` command will parse the GSEA desktop results directory(the path contains edb file folder).

| The ``call`` command will compute es,nes,pval,fdr and generates plots, *de novo*.


| For more information to use this library,see the :ref:`run`.










.. toctree::
:maxdepth: 2
:hidden:

index.rst
run.rst




Indices and tables
Expand Down
131 changes: 131 additions & 0 deletions docs/_build/html/_sources/introduction.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@


Welcome to GSEAPY's documentation!
=====================================================

GSEAPY: Gene Set Enrichment Analysis in Python.

.. image:: https://badge.fury.io/py/gseapy.svg
:target: https://badge.fury.io/py/gseapy
.. image:: https://travis-ci.org/BioNinja/gseapy.svg?branch=master
:target: https://travis-ci.org/BioNinja/gseapy

.. image:: https://img.shields.io/github/license/mashape/apistatus.svg



GSEAPY is a python wrapper for **GESA**.It's used for convenient GO enrichments
and produce **publishable quality figures** from python. GSEAPY could be used for **RNA-seq, ChIP-seq, Microarry** data.


`Gene Set Enrichment Analysis <http://software.broadinstitute.org/gsea/index.jsp>`_ (GSEA)
is a computational method that determines whether an a priori defined set of genes shows
statistically significant, concordant differences between two biological states (e.g. phenotypes).

The full ``GSEA`` is far too extensive to describe here; see
`GSEA <http://www.broadinstitute.org/cancer/software/gsea/wiki/index.php/Main_Page>`_ documentation for more information.

Why GSEAPY
-----------------------------------------------------

For Gene Enrichment Analysis, ``GSEA`` is still the one of best choice.

However, When you have large number of expression tables, or ``GO`` terms to enrich, ``GSEA`` desktop
version is inconvinient. What's more, the R version of GSEA has not been updated since 2006.
What's worse, ``GSEA`` desktop version do not provide means to modify plots,
like legends, ticks......

As a researcher of life science, I want a modern ``GSEA`` with lastest features. It can produce pubilishable
figures, and do many jobs at the same time without using mouse to select differrent data table,
differrent gene sets repeatly.





Features of GSEAPY
------------------------------------------------------

#. GSEAPY could reproduce the GSEA figures using GSEA desktop version results.

#. GSEAPY could be used directly to perform enrichment anlysis. All parameters are same with ``GSEA``

#. GSEAPY is written in ``python``, using the same algorithm of ``GSEA`` Desktop version.

#. GSEAPY produce figures in pdf format by default, which are ready for publishing and easy to modifiy.

#. GSEAPY Enhancement will be considered. If you would like to contribute, please @BioNinja on ``Github``.



GSEA desktop version output:
-------------------------------------------------
This is an example of GSEA desktop application output

.. figure:: GSEA_OCT4_KD.png




GSEAPY output
-----------------------------------------------
Using the same algorithm by ``GSEA``, GSEAPY reproduce the example above.

.. figure:: gseapy_OCT4_KD.png



Generated by GSEAPY

**GSEAPY figures are PDF formats by default.** Other matplotlib figures formats are supported, too.

You can modify ``GSEA`` plots easily in .pdf files. Please Enjoy.





Installation
----------------

| Install gseapy package from pypi and download

.. code:: bash

$ pip install gseapy

| You may instead want to use the development version from Github, by running

.. code:: bash

$ pip install git+git://github.com/BioNinja/gseapy.git#egg=gseapy


Dependency
--------------
* Python 2.7 or 3.3+


Mandatory
~~~~~~~~~~~~~~~~

* Numpy
* Pandas
* Matplotlib
* Beautifulsoup4

You may also need **lxml, html5lib**, if you could not parse xml files.



Run GSEAPY
-----------------

| GSEAPY has two subcommands: ``replot``, ``call``.

| The ``replot`` command will parse the GSEA desktop results directory(the path contains edb file folder).

| The ``call`` command will compute es,nes,pval,fdr and generates plots, *de novo*.


| For more information to use this library,see the :ref:`run`.

0 comments on commit 14cfd18

Please sign in to comment.