extended_coda

Authors: Pang Wei Koh , Emma Pierson , Anshul Kundaje

Version: 0.1

License: MIT

Contributed by: Johnny Israeli

Cite as: https://doi.org/10.1093/bioinformatics/btx243

Trained on: Described in https://academic.oup.com/bioinformatics/article/33/14/i225/3953958#100805343

Type: keras

Postprocessing: None

Single bp resolution ChIP-seq denoising - https://github.com/kundajelab/coda

Create a new conda environment with all dependencies installed
kipoi env create extended_coda
source activate kipoi-extended_coda
Install model dependencies into current environment
kipoi env install extended_coda
Test the model
kipoi test extended_coda --source=kipoi
Make a prediction
cd ~/.kipoi/models/extended_coda
kipoi predict extended_coda \
  --dataloader_args='{'intervals_file': 'example_files/intervals.tsv', 'input_data_sources': OrderedDict([('H3K27AC_subsampled', 'example_files/H3K27AC_subsampled.bw')]), 'batch_size': 4}' \
  -o '/tmp/extended_coda.example_pred.tsv'
# check the results
head '/tmp/extended_coda.example_pred.tsv'
Get the model
import kipoi
model = kipoi.get_model('extended_coda')
Make a prediction for example files
pred = model.pipeline.predict_example()
Use dataloader and model separately
# setup the example dataloader kwargs
dl_kwargs = {'intervals_file': 'example_files/intervals.tsv', 'input_data_sources': OrderedDict([('H3K27AC_subsampled', 'example_files/H3K27AC_subsampled.bw')]), 'batch_size': 4}
import os; os.chdir(os.path.expanduser('~/.kipoi/models/extended_coda'))
# Get the dataloader and instantiate it
dl = model.default_dataloader(**dl_kwargs)
# get a batch iterator
it = dl.batch_iter(batch_size=4)
# predict for a batch
batch = next(it)
model.predict_on_batch(batch['inputs'])
Make predictions for custom files directly
pred = model.pipeline.predict(dl_kwargs, batch_size=4)
Get the model
library(reticulate)
kipoi <- import('kipoi')
model <- kipoi$get_model('extended_coda')
Make a prediction for example files
predictions <- model$pipeline$predict_example()
Use dataloader and model separately
# Get the dataloader
setwd('~/.kipoi/models/extended_coda')
dl <- model$default_dataloader(intervals_file='example_files/intervals.tsv', input_data_sources=list(H3K27AC_subsampled='example_files/H3K27AC_subsampled.bw'), batch_size=4)
# get a batch iterator
it <- dl$batch_iter(batch_size=4)
# predict for a batch
batch <- iter_next(it)
model$predict_on_batch(batch$inputs)
Make predictions for custom files directly
pred <- model$pipeline$predict(dl_kwargs, batch_size=4)

Schema

Inputs

Dictionary of numpy arrays

Name: H3K27AC_subsampled

    Shape: (None, 1) 

    Doc: Track representing ...


Targets

Dictionary of numpy arrays

Name: H3K27ac

    Shape: (None, 1) 

    Doc: Predicted track...


Dataloader

Relative path: .

Version: 0.1

Doc: DataLoader for single bp resolution ChIP-seq denoising

Authors: Johnny Israeli

Type: BatchGenerator

License: MIT


Arguments

intervals_file : tsv file with `chrom start end`

input_data_sources : {data_name: <path to genomelake directory>}

target_data_sources (optional): optional; {data_name: <path to genomelake directory>}

batch_size (optional): batch size. Default = 128


Model dependencies
conda:

pip:
  • tensorflow==1.0.0
  • keras==1.2.2

Dataloader dependencies
conda:
  • bioconda::genomelake
  • cython

pip: