labranchor

Authors: Joseph M. Paggi , Gill Bejerano

License: CC BY-NC 4.0

Contributed by: Jun Cheng

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

Type: keras

Postprocessing: variant_effects

Trained on: High confidence set of branchpoints reported by Mercer et. al. 2015. Chromosome 1 was used for testing, chromosomes 2, 3, 4 for model selection and the remaining data were used for model training.

Source files

LaBranchoR (LSTM Branchpoint Retriever) uses a LSTM network built with keras to predict the position of RNA splicing branchpoints relative to a three prime splice site. Precisely evaluating LaBranchoR was challenging due to pervasive noise in the experimental data, but as we show in our paper, we estimate that LaBranchoR correcty predicts a branchpoint for over 90% of 3\''ss. Github link https://github.com/jpaggi/labranchor.

LaBranchoR predicts RNA splicing branchpoints using a Long Short-Term Memory network.

Description

A model to predict branchpoint from sequence by Paggi et al.. 2017(http://bejerano.stanford.edu/labranchor/).

Input of the model is one-hot-encoded 70bp sequence upstream a 3' acceptor site. Output are scores per basepair the probability to be a branchpoint.

Create a new conda environment with all dependencies installed
kipoi env create labranchor
source activate kipoi-labranchor
Install model dependencies into current environment
kipoi env install labranchor
Test the model
kipoi test labranchor --source=kipoi
Make a prediction
kipoi get-example labranchor -o example
kipoi predict labranchor \
  --dataloader_args='{"fasta_file": "example/fasta_file", "gtf_file": "example/gtf_file", "length": 70}' \
  -o '/tmp/labranchor.example_pred.tsv'
# check the results
head '/tmp/labranchor.example_pred.tsv'
Get the model
import kipoi
model = kipoi.get_model('labranchor')
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('labranchor')
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

Dictionary of numpy arrays

Name: bidirectional_1_input

    Shape: (70, 4) 

    Doc: One-hot encoded RNA sequence


Targets

Single numpy array

Name: None

    Shape: (70,) 

    Doc: Predicted probability of being branchpoint along the sequence


Dataloader

Defined as: .

Doc: LaBranchoR predicts RNA splicing branchpoints using a Long Short-Term Memory network

Authors: Jun Cheng

Type: Dataset

License: MIT


Arguments

fasta_file : Reference genome sequence

gtf_file : file path; Genome annotation GTF file

length : length of considered candidate branchpoint region, upstream of 3'ss


Model dependencies
conda:

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

Dataloader dependencies
conda:
  • python>=3.5,<3.7

pip:
  • pysam
  • numpy