CleTimer/customBP
Linear model predicting intron donor and acceptor cleavage time.
kipoi env create CleTimer/customBP
source activate kipoi-CleTimer__customBP
kipoi test CleTimer/customBP --source=kipoi
kipoi get-example CleTimer/customBP -o example
kipoi predict CleTimer/customBP \
--dataloader_args='{"gtf_file": "example/gtf_file", "fasta_file": "example/fasta_file", "bp_idx_file": "example/bp_idx_file", "create_introns": true}' \
-o '/tmp/CleTimer|customBP.example_pred.tsv'
# check the results
head '/tmp/CleTimer|customBP.example_pred.tsv'
kipoi env create CleTimer/customBP
source activate kipoi-CleTimer__customBP
import kipoi
model = kipoi.get_model('CleTimer/customBP')
pred = model.pipeline.predict_example(batch_size=4)
# 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
batch_iterator = dl.batch_iter(batch_size=4)
for batch in batch_iterator:
# predict for a batch
batch_pred = model.predict_on_batch(batch['inputs'])
pred = model.pipeline.predict(dl_kwargs, batch_size=4)
library(reticulate)
kipoi <- import('kipoi')
model <- kipoi$get_model('CleTimer/customBP')
predictions <- model$pipeline$predict_example()
# 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)
pred <- model$pipeline$predict(dl_kwargs, batch_size=4)
docker pull kipoi/kipoi-docker:sharedpy3keras2tf1-slim
docker pull kipoi/kipoi-docker:sharedpy3keras2tf1
docker run -it kipoi/kipoi-docker:sharedpy3keras2tf1-slim
docker run kipoi/kipoi-docker:sharedpy3keras2tf1-slim kipoi test CleTimer/customBP --source=kipoi
# 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/ kipoi/kipoi-docker:sharedpy3keras2tf1-slim \
kipoi get-example CleTimer/customBP -o /app/example
docker run -v $PWD/kipoi-example:/app/ kipoi/kipoi-docker:sharedpy3keras2tf1-slim \
kipoi predict CleTimer/customBP \
--dataloader_args='{'gtf_file': '/app/example/gtf_file', 'fasta_file': '/app/example/fasta_file', 'bp_idx_file': '/app/example/bp_idx_file', 'create_introns': True}' \
-o '/app/CleTimer_customBP.example_pred.tsv'
# check the results
head $PWD/kipoi-example/CleTimer_customBP.example_pred.tsv
https://apptainer.org/docs/user/main/quick_start.html#quick-installation-steps
kipoi get-example CleTimer/customBP -o example
kipoi predict CleTimer/customBP \
--dataloader_args='{"gtf_file": "example/gtf_file", "fasta_file": "example/fasta_file", "bp_idx_file": "example/bp_idx_file", "create_introns": true}' \
-o 'CleTimer_customBP.example_pred.tsv' \
--singularity
# check the results
head CleTimer_customBP.example_pred.tsv
Inputs
Dictionary of numpy arrays
Name: soi
Doc: Intronic sequence of interest - defined as 3 bases before and 21 base after the intron inclusive.
Name: bp_index
Doc: Index of the branchpoint in the SOI
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.
bp_idx_file : Relative path to file containing the branchpoint indexes for introns. One index per line and the order corresponds to genetic order.
create_introns (optional): Should dataloader infer introns from exons and transcripts? Default False.
- pip=20.3.3
- scikit-learn==0.22.2.post1
- python=3.7
- bioconda::gffutils
- scipy