HAL

Authors: Alexander B. Rosenberg , Rupali P. Patwardhan , Jay Shendure , Georg Seelig

License: MIT

Contributed by: Jun Cheng , Ziga Avsec

Cite as: https://doi.org/10.1016/j.cell.2015.09.054

Type: None

Postprocessing: variant_effects

Trained on: MPRA data of 2M synthetic alternatively spliced mini-genes. Data was split into training and test sets (90%/10% split).

Source files

Model from Rosenberg et al: Learning the Sequence Determinants of Alternative Splicing from Millions of Random Sequences

http://splicing.cs.washington.edu/

https://github.com/Alex-Rosenberg/cell-2015

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

    Doc: K-mer counts


Targets

Single numpy array

Name: psi

    Shape: (1,) 

    Doc: Predicted 3' psi


Dataloader

Defined as: .

Doc: Model from Rosenberg

Authors: Jun Cheng , Ziga Avsec

Type: Dataset

License: MIT


Arguments

MISO_AS (optional): Whether the given annotation file is MISO alternative splicing annotation. Default False.

fasta_file : Reference Genome sequence in fasta format

gtf_file : file path; Genome annotation GTF file

overhang (optional): Length of sequence overhang to take around splice junction


Model dependencies
conda:
  • numpy

pip:

Dataloader dependencies
conda:
  • bioconda::pysam
  • python=3.5

pip: