CleTimer/default
Linear model predicting intron donor and acceptor cleavage time.
Create a new conda environment with all dependencies installed
kipoi env create CleTimer/default
source activate kipoi-CleTimer__default
Install model dependencies into current environment
kipoi env install CleTimer/default
Test the model
kipoi test CleTimer/default --source=kipoi
Make a prediction
kipoi get-example CleTimer/default -o example
kipoi predict CleTimer/default \
--dataloader_args='{"gtf_file": "example/gtf_file", "fasta_file": "example/fasta_file", "create_introns": true}' \
-o '/tmp/CleTimer|default.example_pred.tsv'
# check the results
head '/tmp/CleTimer|default.example_pred.tsv'
Get the model
import kipoi
model = kipoi.get_model('CleTimer/default')
Make a prediction for example files
pred = model.pipeline.predict_example()
Use dataloader and model separately
# Download example dataloader kwargs
dl_kwargs = model.default_dataloader.download_example('example')
# 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('CleTimer/default')
Make a prediction for example files
predictions <- model$pipeline$predict_example()
Use dataloader and model separately
# Download example dataloader kwargs
dl_kwargs <- model$default_dataloader$download_example('example')
# Get the dataloader
dl <- model$default_dataloader(dl_kwargs)
# 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)
Get the docker image
docker pull haimasree/kipoi-docker:sharedpy3keras2
Get the activated conda environment inside the container
docker run -it haimasree/kipoi-docker:sharedpy3keras2
Test the model
docker run haimasree/kipoi-docker:sharedpy3keras2 kipoi test CleTimer/default --source=kipoi
Make prediction for custom files directly
# Create an example directory containing the data
mkdir -p $PWD/kipoi-example
# You can replace $PWD/kipoi-example with a different absolute path containing the data
docker run -v $PWD/kipoi-example:/app/ haimasree/kipoi-docker:sharedpy3keras2 \
kipoi get-example CleTimer/default -o /app/example
docker run -v $PWD/kipoi-example:/app/ haimasree/kipoi-docker:sharedpy3keras2 \
kipoi predict CleTimer/default \
--dataloader_args='{'gtf_file': '/app/example/gtf_file', 'fasta_file': '/app/example/fasta_file', 'create_introns': True}' \
-o '/app/CleTimer_default.example_pred.tsv'
# check the results
head $PWD/kipoi-example/CleTimer_default.example_pred.tsv
Schema
Inputs
Single numpy array
Name: soi
Doc: Intronic sequence of interest - defined as 3 bases before and 21 base after the intron inclusive.
Dataloader
Defined as: .
Doc: Linear model predicting intron donor and acceptor cleavage time.
Type: Dataset
License: MIT
Arguments
gtf_file : Path to GTF file containing annotation. If there are no introns in file, they get constructed automatically.
fasta_file : Path to FASTA file containing sequences. Should include all motifs listed in the GTF file.
create_introns (optional): Should dataloader infer introns from exons and transcripts? Default False.
Model dependencies
conda:
- pip=20.3.3
pip:
- numpy==1.16.2
- scikit-learn==0.22.2.post1
- keras==2.2.4
- tensorflow==1.14.0
Dataloader dependencies
conda:
- python=3.5
- bioconda::gffutils
- scipy
pip: