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

Version: 0.1

License: MIT

Contributed by: Lara Urban

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

Trained on:

Type: keras

Postprocessing: None

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
cd ~/.kipoi/models/SiSp
kipoi predict SiSp \
  --dataloader_args='{'anno_file': 'example_files/SE_chr22.gtf', 'fasta_file': 'example_files/hg19_chr22.fa', 'meth_file': 'example_files/meth_chr22.bedGraph.sorted.gz', 'target_file': 'example_files/y_chr22.csv'}' \
  -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
# setup the example dataloader kwargs
dl_kwargs = {'anno_file': 'example_files/SE_chr22.gtf', 'fasta_file': 'example_files/hg19_chr22.fa', 'meth_file': 'example_files/meth_chr22.bedGraph.sorted.gz', 'target_file': 'example_files/y_chr22.csv'}
import os; os.chdir(os.path.expanduser('~/.kipoi/models/SiSp'))
# 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
# Get the dataloader
setwd('~/.kipoi/models/SiSp')
dl <- model$default_dataloader(anno_file='example_files/SE_chr22.gtf', fasta_file='example_files/hg19_chr22.fa', meth_file='example_files/meth_chr22.bedGraph.sorted.gz', target_file='example_files/y_chr22.csv')
# 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

Relative path: .

Version: 0.1

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: