Authors: Nancy Xu

Version: 0.1

License: MIT

Contributed by:

Cite as:

Trained on:

Type: keras

Postprocessing: None

Large-scale multi-task convolutional model for predicting chromatin accessility model. Model was trained genome-wide accessibility measures across 421 cell types.

Create a new conda environment with all dependencies installed
kipoi env create Divergent421
source activate kipoi-Divergent421
Install model dependencies into current environment
kipoi env install Divergent421
Test the model
kipoi test Divergent421 --source=kipoi
Make a prediction
cd ~/.kipoi/models/Divergent421
kipoi predict Divergent421 \
  --dataloader_args='{'intervals_file': 'example_files/intervals_files_ENCSR000EMT_chr21_10000.tsv', 'fasta_file': 'example_files/chr21.fa'}' \
  -o '/tmp/Divergent421.example_pred.tsv'
# check the results
head '/tmp/Divergent421.example_pred.tsv'
Get the model
import kipoi
model = kipoi.get_model('Divergent421')
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_files_ENCSR000EMT_chr21_10000.tsv', 'fasta_file': 'example_files/chr21.fa'}
import os; os.chdir(os.path.expanduser('~/.kipoi/models/Divergent421'))
# 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)
Make predictions for custom files directly
pred = model.pipeline.predict(dl_kwargs, batch_size=4)
Get the model
kipoi <- import('kipoi')
model <- kipoi$get_model('Divergent421')
Make a prediction for example files
predictions <- model$pipeline$predict_example()
Use dataloader and model separately
# Get the dataloader
dl <- model$default_dataloader(intervals_file='example_files/intervals_files_ENCSR000EMT_chr21_10000.tsv', fasta_file='example_files/chr21.fa')
# get a batch iterator
it <- dl$batch_iter(batch_size=4)
# predict for a batch
batch <- iter_next(it)
Make predictions for custom files directly
pred <- model$pipeline$predict(dl_kwargs, batch_size=4)



Dictionary of numpy arrays

Name: data/genome_data_dir

    Shape: (1000, 4) 

    Doc: 1000 base pair sequence of one-hot encoding ACGT


Single numpy array

Name: None

    Shape: (421,) 

    Doc: Binary 0/1 output for chromatin accessibility in the designated range. 0 = inaccessible, 1 = accessible.


Relative path: .

Version: 0.1

Doc: test

Authors: Nancy Xu , Ziga Avsec

Type: Dataset

License: MIT


intervals_file : tsv file containing dna interval indices (chr, start, end) and binary 0/1 label for accessibility of 430 cell types.

fasta_file (optional): chr21 fasta file for dna intervals

num_chr_fasta (optional): True, the tsv-loader will make sure that the chromosomes don't start with chr.

Model dependencies
  • h5py

  • tensorflow
  • keras==1.2.2

Dataloader dependencies
  • bioconda::genomelake
  • bioconda::pybedtools
  • numpy
  • pandas