SiSp

Authors: Stephanie Maria Linker , Lara Urban , Stephen Clark , Mariya Chhatriwala , Shradha Amatya , Davis McCarthy , Ingo Ebersberger , Ludovic Vallier , Wolf Reik , Oliver Stegle , Marc Jan Bonder

License: MIT

Contributed by: Lara Urban

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

Type: keras

Postprocessing: None

Trained on: Line joxm_1 from single donor in HipSci (Kilpinen 2016) using scM&T-seq. The cassette exons were split into training, validation and test set (60%, 20%, 20%).

Source files

The SiSp model predicts splicing patterns based on a genomic sequence (800bp) at the center of the alternative exon of a cassette exon. It takes methylation into account by handling methylated cytosine as 5th base, and operates on a single-cell level.

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

    Doc: DNA sequence


Targets

Single numpy array

Name: targets

    Shape: (1,) 

    Doc: Probability of exluded exon in a cassette exon setting


Dataloader

Defined as: .

Doc: The SiSp model predicts splicing patterns based on a genomic sequence of 800bp centered on the alternative exon. It takes methylation into account and operates on a single-cell level.

Authors: Lara Urban

Type: PreloadedDataset

License: MIT


Arguments

anno_file : gtf file with chr, start, end and orientation of an exon/a gene

fasta_file : reference genome sequence

meth_file : bedGraph file with single-base methylation information

target_file (optional): path to the targets (.csv) file


Model dependencies
conda:
  • python=3.6
  • numpy
  • pandas

pip:
  • keras>=2.0.4
  • tensorflow

Dataloader dependencies
conda:
  • bioconda::pysam
  • bioconda::tabix
  • python=3.6
  • numpy
  • pandas

pip: