All Projects → kipoi → Kipoi

kipoi / Kipoi

Licence: mit
Kipoi's model zoo API

Projects that are alternatives of or similar to Kipoi

Shared
Code and shared files
Stars: ✭ 171 (-1.72%)
Mutual labels:  jupyter-notebook
Captcha break
验证码识别
Stars: ✭ 2,268 (+1203.45%)
Mutual labels:  jupyter-notebook
Nlp Exercises
Stars: ✭ 174 (+0%)
Mutual labels:  jupyter-notebook
Osvos Caffe
One-Shot Video Object Segmentation
Stars: ✭ 173 (-0.57%)
Mutual labels:  jupyter-notebook
Iocaml
An OCaml kernel for the IPython notebook
Stars: ✭ 173 (-0.57%)
Mutual labels:  jupyter-notebook
Mpld3
mpld3 provides a custom stand-alone javascript library built on D3, which parses JSON representations of plots. The mpld3 python module provides a set of routines which parses matplotlib plots (using the mplexporter framework) and outputs the JSON description readable by mpld3.js.
Stars: ✭ 2,121 (+1118.97%)
Mutual labels:  jupyter-notebook
Personal data science projects
Stars: ✭ 173 (-0.57%)
Mutual labels:  jupyter-notebook
Qnn Mo Pynq
Stars: ✭ 173 (-0.57%)
Mutual labels:  jupyter-notebook
Provingground
Proving Ground: Tools for Automated Mathematics
Stars: ✭ 173 (-0.57%)
Mutual labels:  jupyter-notebook
Time series prediction
This is the code for "Time Series Prediction" By Siraj Raval on Youtube
Stars: ✭ 174 (+0%)
Mutual labels:  jupyter-notebook
Deep Crowd Counting crowdnet
An independent implementation of "CrowdNet: A Deep Convolutional Network for Dense Crowd Counting"
Stars: ✭ 173 (-0.57%)
Mutual labels:  jupyter-notebook
Evolutionary Computation Course
Jupyter/IPython notebooks about evolutionary computation.
Stars: ✭ 173 (-0.57%)
Mutual labels:  jupyter-notebook
Pytorch sac
PyTorch implementation of Soft Actor-Critic (SAC)
Stars: ✭ 174 (+0%)
Mutual labels:  jupyter-notebook
Dfp
Reinforcement Learning with Goals
Stars: ✭ 173 (-0.57%)
Mutual labels:  jupyter-notebook
Kdd18 Gluon
KDD18 Tutorial: Deep Learning and Natural Language Processing with Apache MXNet (Incubating) Gluon
Stars: ✭ 174 (+0%)
Mutual labels:  jupyter-notebook
Deep Math Machine Learning.ai
A blog which talks about machine learning, deep learning algorithms and the Math. and Machine learning algorithms written from scratch.
Stars: ✭ 173 (-0.57%)
Mutual labels:  jupyter-notebook
Annotated Transformer
http://nlp.seas.harvard.edu/2018/04/03/attention.html
Stars: ✭ 2,403 (+1281.03%)
Mutual labels:  jupyter-notebook
Prml
Python implementations (on jupyter notebook) of algorithms described in the book "PRML"
Stars: ✭ 174 (+0%)
Mutual labels:  jupyter-notebook
Machine Learning And Reinforcement Learning In Finance
Machine Learning and Reinforcement Learning in Finance New York University Tandon School of Engineering
Stars: ✭ 173 (-0.57%)
Mutual labels:  jupyter-notebook
Introduction To Time Series Forecasting Python
Introduction to time series preprocessing and forecasting in Python using AR, MA, ARMA, ARIMA, SARIMA and Prophet model with forecast evaluation.
Stars: ✭ 173 (-0.57%)
Mutual labels:  jupyter-notebook

Kipoi: Model zoo for genomics

CircleCI Coverage status Gitter

This repository implements a python package and a command-line interface (CLI) to access and use models from Kipoi-compatible model zoo's.

Links

Installation

Kipoi requires conda to manage model dependencies. Make sure you have either anaconda (download page) or miniconda (download page) installed. If you are using OSX, see Installing python on OSX. Supported python versions: 2.7 and >=3.5.

Install Kipoi using pip:

pip install kipoi

Quick start

Explore available models on https://kipoi.org/groups/. Use-case oriented tutorials are available at https://github.com/kipoi/examples.

Installing all required model dependencies

Use kipoi env create <model> to create a new conda environment for the model. You can use the following two commands to create common environments suitable for multiple models.

kipoi env create shared/envs/kipoi-py3-keras2   # add --gpu to install gpu-compatible deps
kipoi env create shared/envs/kipoi-py3-keras1.2

Before using a model in any way, activate the right conda enviroment:

source activate $(kipoi env get <model>)

Alternatively, you can use the Singularity or Docker containers with all dependencies installed. Singularity containers can be seamlessly used with the CLI by adding the --singularity flag to kipoi commands.

Python

Before using a model from python in any way, activate the right conda enviroment:

source activate $(kipoi env get <model>)
import kipoi

kipoi.list_models() # list available models

model = kipoi.get_model("Basset") # load the model

model = kipoi.get_model(  # load the model from a past commit
    "https://github.com/kipoi/models/tree/<commit>/<model>",
    source='github-permalink'
)

# main attributes
model.model # wrapped model (say keras.models.Model)
model.default_dataloader # dataloader
model.info # description, authors, paper link, ...

# main methods
model.predict_on_batch(x) # implemented by all the models regardless of the framework
model.pipeline.predict(dict(fasta_file="hg19.fa",
                            intervals_file="intervals.bed"))
# runs: raw files -[dataloader]-> numpy arrays -[model]-> predictions 

For more information see: notebooks/python-api.ipynb and docs/using/python

Command-line

$ kipoi
usage: kipoi <command> [-h] ...

    # Kipoi model-zoo command line tool. Available sub-commands:
    # - using models:
    ls               List all the available models
    list_plugins     List all the available plugins
    info             Print dataloader keyword argument info
    get-example      Download example files
    predict          Run the model prediction
    pull             Download the directory associated with the model
    preproc          Run the dataloader and save the results to an hdf5 array
    env              Tools for managing Kipoi conda environments

    # - contributing models:
    init             Initialize a new Kipoi model
    test             Runs a set of unit-tests for the model
    test-source      Runs a set of unit-tests for many/all models in a source
    
    # - plugin commands:
    veff             Variant effect prediction
    interpret        Model interpretation using feature importance scores like ISM, grad*input or DeepLIFT
# Run model predictions and save the results
# sequentially into an HDF5 file
kipoi predict <Model> --dataloader_args='{
  "intervals_file": "intervals.bed",
  "fasta_file": "hg38.fa"}' \
  --singularity \
  -o '<Model>.preds.h5'

Explore the CLI usage by running kipoi <command> -h. Also, see docs/using/cli/ for more information.

Configure Kipoi in .kipoi/config.yaml

You can add your own (private) model sources. See docs/using/03_Model_sources/.

Contributing models

See docs/contributing getting started and docs/tutorials/contributing/models for more information.

Plugins

Kipoi supports plug-ins which are published as additional python packages. Two plug-ins that are available are:

kipoi_veff

Variant effect prediction plugin compatible with (DNA) sequence based models. It allows to annotate a vcf file using model predictions for the reference and alternative alleles. The output is written to a new VCF file. For more information see https://kipoi.org/veff-docs/.

pip install kipoi_veff

kipoi_interpret

Model interpretation plugin for Kipoi. Allows to use feature importance scores like in-silico mutagenesis (ISM), saliency maps or DeepLift with a wide range of Kipoi models. example notebook

pip install kipoi_interpret

Documentation

Tutorials

Citing Kipoi

If you use Kipoi for your research, please cite the publication of the model you are using (see model's cite_as entry) and the paper describing Kipoi: https://doi.org/10.1038/s41587-019-0140-0.

@article{kipoi,
  title={The Kipoi repository accelerates community exchange and reuse of predictive models for genomics},
  author={Avsec, Ziga and Kreuzhuber, Roman and Israeli, Johnny and Xu, Nancy and Cheng, Jun and Shrikumar, Avanti and Banerjee, Abhimanyu and Kim, Daniel S and Beier, Thorsten and Urban, Lara and others},
  journal={Nature biotechnology},
  pages={1},
  year={2019},
  publisher={Nature Publishing Group}
}

Development

If you want to help with the development of Kipoi, you are more than welcome to join in!

For the local setup for development, you should install kipoi using:

conda install pytorch-cpu
pip install -e '.[develop]'

This will install some additional packages like pytest. You can test the package by running py.test.

If you wish to run tests in parallel, run py.test -n 6.

License

Kipoi is MIT-style licensed, as found in the LICENSE file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].