Optimus_5Prime

Authors: Paul J. Sample , Ban Wang , David W Reid , Vladimir Presnyak , Iain McFadyen , David R Morris , Georg Seelig

License: MIT

Contributed by: Ban Wang

Cite as: https://doi.org/10.1101/310375

Type: None

Postprocessing: variant_effects

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.

Source files

Model from Sample et al: Human 5 prime UTR design and variant effect prediction from a massively parallel translation assay.

Create a new conda environment with all dependencies installed
kipoi env create Optimus_5Prime
source activate kipoi-Optimus_5Prime
Install model dependencies into current environment
kipoi env install Optimus_5Prime
Test the model
kipoi test Optimus_5Prime --source=kipoi
Make a prediction
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'
Get the model
import kipoi
model = kipoi.get_model('Optimus_5Prime')
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('Optimus_5Prime')
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)

Schema

Inputs

Single numpy array

Name: seq

    Shape: (50, 4) 

    Doc: 50nt 5 prime UTR sequence


Targets

Single numpy array

Name: None

    Shape: (1,) 

    Doc: Predicted mean ribosome load


Dataloader

Defined as: .

Doc: Dataloader for 5-prime UTR

Authors: Ziga Avsec

Type: Dataset

License: MIT


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.


Model dependencies
conda:

pip:
  • tensorflow>=1.0.0
  • keras>=2.0.4

Dataloader dependencies
conda:
  • bioconda::pybedtools

pip:
  • kipoi
  • kipoiseq
  • gffutils