Giter VIP home page Giter VIP logo

pypathway's Introduction

PyPathway

integrated Python toolkit for pathway based analysis

PyPI version Build Status

Installation

Install PyPathway via Anaconda is recommended.

  1. Download and install anaconda from Anaconda site
  2. Install PyPathway by
conda install -c steamedsheep pypathway

NOTE: If you want to install pypathway via pypi, please refer to the Installation section

Documentation and tests

View the docs at github.io

Regular tests and notebook (nbval) tests

Features

  • Public databases APIs: STRING, BioGRID, KEGG, Reactome and WikiPathway
  • Functional set based and network based enrichment analysis algorithms implemented: ORA, GSEA and SPIA
  • Performance optimize for denovo enrichment algorithm MAGI and Hotnet2.
  • Network propagation algorithms random walk, RWR and heat kernel.
  • Interactive visualization and web page exportation for pathway, graph and analysis result.
  • Integrated with pandas, networkx and numpy. 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.

Network process

Intuitive APIs for querying and retrieval interaction network from public database. The return object are stored in networkx.Graph object.

Support databases

  • KEGG
  • Reactome
  • WikiPathway
  • STRING
  • BioGRID

Search

from pypathway import PublicDatabase
kg = PublicDatabase.search_kegg('CD4')
wp = PublicDatabase.search_wp('CD4')
rt = PublicDatabase.search_reactome('CD4')

Load

pathway = r[0].load()

Plot

pathway.draw()

IPython notebook examples

Enrichment Analysis

Support methods

  • ORA
  • GSEA
  • Network enrichment (SPIA and Enrichment)
  • denovo enrichment (MAGI and Hotnet2)

Implementation / Interface

  • Staticmethod run() for the starting of the analysis
r = SPIA.run(all=c.background, de=c.deg, organism='hsa')
  • table, plot() and graph() method for the presentation of the analysis
res.table

res.plot()

res.graph()

IPython examples

Modeling

  • the Python Interface and optimize for MAGI
  • several c extension for Hotnet permutation performance

Propagation

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)

Implementation detail

image source: Network propagation: a universal amplifier of genetic associations

IPython notebook examples

Utility and Performance

  • 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

pypathway's People

Contributors

iseekwonderful avatar

Watchers

 avatar

Forkers

tryweirder

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.