Optimus_5Prime
License: MIT
Cite as: https://doi.org/10.1101/310375
Type: None
Postprocessing: None
Trained on: Data from MPRA experiment using eGFP library on HEK293T cells. Trained on 280,000 of the 300,000-member eGFP library. The remaining 20,000 sequences were withheld for testing.
Model from Sample et al: Human 5 prime UTR design and variant effect prediction from a massively parallel translation assay.
kipoi env create Optimus_5Prime
source activate kipoi-Optimus_5Prime
kipoi test Optimus_5Prime --source=kipoi
kipoi get-example Optimus_5Prime -o example
kipoi predict Optimus_5Prime \
--dataloader_args='{"gtf_file": "example/gtf_file", "fasta_file": "example/fasta_file"}' \
-o '/tmp/Optimus_5Prime.example_pred.tsv'
# check the results
head '/tmp/Optimus_5Prime.example_pred.tsv'
kipoi env create Optimus_5Prime
source activate kipoi-Optimus_5Prime
import kipoi
model = kipoi.get_model('Optimus_5Prime')
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('Optimus_5Prime')
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:sharedpy3keras2tf2-slim
docker pull kipoi/kipoi-docker:sharedpy3keras2tf2
docker run -it kipoi/kipoi-docker:sharedpy3keras2tf2-slim
docker run kipoi/kipoi-docker:sharedpy3keras2tf2-slim kipoi test Optimus_5Prime --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:sharedpy3keras2tf2-slim \
kipoi get-example Optimus_5Prime -o /app/example
docker run -v $PWD/kipoi-example:/app/ kipoi/kipoi-docker:sharedpy3keras2tf2-slim \
kipoi predict Optimus_5Prime \
--dataloader_args='{'gtf_file': '/app/example/gtf_file', 'fasta_file': '/app/example/fasta_file'}' \
-o '/app/Optimus_5Prime.example_pred.tsv'
# check the results
head $PWD/kipoi-example/Optimus_5Prime.example_pred.tsv
https://apptainer.org/docs/user/main/quick_start.html#quick-installation-steps
kipoi get-example Optimus_5Prime -o example
kipoi predict Optimus_5Prime \
--dataloader_args='{"gtf_file": "example/gtf_file", "fasta_file": "example/fasta_file"}' \
-o 'Optimus_5Prime.example_pred.tsv' \
--singularity
# check the results
head Optimus_5Prime.example_pred.tsv
Arguments
gtf_file : file path; Genome annotation GTF file
fasta_file : Reference genome sequence
disable_infer_transcripts : option to disable infering transcripts. Can be True if the gtf file has transcripts annotated.
disable_infer_genes : option to disable infering genes. Can be True if the gtf file has genes annotated.
- tensorflow=1.4.1
- keras=2.1.6
- python=3.6
- pip=21.0.0
- kipoi
- python=3.6
- pip=21.0.0
- bioconda::pybedtools
- kipoi
- kipoiseq
- gffutils==0.10.1