integrated Python toolkit for pathway based analysis
Install PyPathway via Anaconda is recommended.
- Download and install anaconda from Anaconda site
- Install
PyPathway
by
conda install -c steamedsheep pypathway
NOTE: If you want to install pypathway
via pypi
, please refer to the Installation section
View the docs at github.io
Regular tests and notebook (nbval) tests
- Public databases APIs:
STRING
,BioGRID
,KEGG
,Reactome
andWikiPathway
- Functional set based and network based enrichment analysis algorithms implemented:
ORA
,GSEA
andSPIA
- Performance optimize for denovo enrichment algorithm
MAGI
andHotnet2
. - Network propagation algorithms
random walk
,RWR
andheat kernel
. - Interactive visualization and web page exportation for pathway, graph and analysis result.
- Integrated with
pandas
,networkx
andnumpy
. Most of the methods accept both text file and data structure from these packages - Dynamic visualization for
IPython notebook
. - Most classes implement
__repr__
method for interactive environment.
Intuitive APIs for querying and retrieval interaction network from public database. The return object are stored in networkx.Graph
object.
KEGG
Reactome
WikiPathway
STRING
BioGRID
from pypathway import PublicDatabase
kg = PublicDatabase.search_kegg('CD4')
wp = PublicDatabase.search_wp('CD4')
rt = PublicDatabase.search_reactome('CD4')
pathway = r[0].load()
pathway.draw()
- ORA
- GSEA
- Network enrichment (SPIA and Enrichment)
- denovo enrichment (MAGI and Hotnet2)
- Staticmethod
run()
for the starting of the analysis
r = SPIA.run(all=c.background, de=c.deg, organism='hsa')
table
,plot()
andgraph()
method for the presentation of the analysis
res.table
res.plot()
res.graph()
- the Python Interface and optimize for
MAGI
- several c extension for
Hotnet
permutation performance
Implemented algorithms
- Random walk
random_walk(G, h)
- Random walk with restart
random_walk_with_restart(G, h, rp=0.7, n=-1)
- Heat kernel
diffusion_kernel(G, h, rp=0.8, n=100)
image source: Network propagation: a universal amplifier of genetic associations
- The Id converter
- GMT file manager
- network and expression data sets.
- numpy implementation of SPIA
- node swap c extension for Hotnet2
- multi-threading for MAGI