rbp_eclip/NCBP2
License: MIT
Type: keras
Postprocessing: None
Trained on: RBP occupancy peaks measured by eCLIP-seq (Van Nostrand et al., 2016 - https://doi.org/10.1038/nmeth.3810), https://github.com/gagneurlab/Manuscript_Avsec_Bioinformatics_2017 4000 training samples, 1000 validation sites, 1000 testing samples.
'RBP binding model from Avsec et al: "Modeling positional effects of regulatory sequences with spline transformations increases prediction accuracy of deep neural networks". '
112 eCLIP models from: https://doi.org/10.1093/bioinformatics/btx727
Associated code is located at: github.com/gagneurlab/Manuscript_Avsec_Bioinformatics_2017
kipoi env create rbp_eclip
source activate kipoi-rbp_eclip
kipoi test rbp_eclip/NCBP2 --source=kipoi
kipoi get-example rbp_eclip/NCBP2 -o example
kipoi predict rbp_eclip/NCBP2 \
--dataloader_args='{"intervals_file": "example/intervals_file", "fasta_file": "example/fasta_file", "gtf_file": "example/gtf_file", "target_file": "example/target_file", "filter_protein_coding": true}' \
-o '/tmp/rbp_eclip|NCBP2.example_pred.tsv'
# check the results
head '/tmp/rbp_eclip|NCBP2.example_pred.tsv'
kipoi env create rbp_eclip
source activate kipoi-rbp_eclip
import kipoi
model = kipoi.get_model('rbp_eclip/NCBP2')
pred = model.pipeline.predict_example(batch_size=4)
# 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
batch_iterator = dl.batch_iter(batch_size=4)
for batch in batch_iterator:
# predict for a batch
batch_pred = model.predict_on_batch(batch['inputs'])
pred = model.pipeline.predict(dl_kwargs, batch_size=4)
library(reticulate)
kipoi <- import('kipoi')
model <- kipoi$get_model('rbp_eclip/NCBP2')
predictions <- model$pipeline$predict_example()
# 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)
pred <- model$pipeline$predict(dl_kwargs, batch_size=4)
docker pull kipoi/kipoi-docker:sharedpy3keras2tf1-slim
docker pull kipoi/kipoi-docker:sharedpy3keras2tf1
docker run -it kipoi/kipoi-docker:sharedpy3keras2tf1-slim
docker run kipoi/kipoi-docker:sharedpy3keras2tf1-slim kipoi test rbp_eclip/NCBP2 --source=kipoi
# Create an example directory containing the data
mkdir -p $PWD/kipoi-example
# You can replace $PWD/kipoi-example with a different absolute path containing the data
docker run -v $PWD/kipoi-example:/app/ kipoi/kipoi-docker:sharedpy3keras2tf1-slim \
kipoi get-example rbp_eclip/NCBP2 -o /app/example
docker run -v $PWD/kipoi-example:/app/ kipoi/kipoi-docker:sharedpy3keras2tf1-slim \
kipoi predict rbp_eclip/NCBP2 \
--dataloader_args='{'intervals_file': '/app/example/intervals_file', 'fasta_file': '/app/example/fasta_file', 'gtf_file': '/app/example/gtf_file', 'target_file': '/app/example/target_file', 'filter_protein_coding': True}' \
-o '/app/rbp_eclip_NCBP2.example_pred.tsv'
# check the results
head $PWD/kipoi-example/rbp_eclip_NCBP2.example_pred.tsv
https://apptainer.org/docs/user/main/quick_start.html#quick-installation-steps
kipoi get-example rbp_eclip/NCBP2 -o example
kipoi predict rbp_eclip/NCBP2 \
--dataloader_args='{"intervals_file": "example/intervals_file", "fasta_file": "example/fasta_file", "gtf_file": "example/gtf_file", "target_file": "example/target_file", "filter_protein_coding": true}' \
-o 'rbp_eclip_NCBP2.example_pred.tsv' \
--singularity
# check the results
head rbp_eclip_NCBP2.example_pred.tsv
Inputs
Dictionary of numpy arrays
Name: seq
Doc: One-hot encoded RNA sequence
Name: dist_tss
Doc: Distance the nearest TSS site transformed with B-splines
Name: dist_polya
Doc: Distance the nearest Poly-A site transformed with B-splines
Name: dist_exon_intron
Doc: Distance the nearest exon_intron (splice donor) site transformed with B-splines
Name: dist_intron_exon
Doc: Distance the nearest intron_exon (splice acceptor) site transformed with B-splines
Name: dist_start_codon
Doc: Distance the nearest start codon transformed with B-splines
Name: dist_stop_codon
Doc: Distance the nearest stop codon transformed with B-splines
Name: dist_gene_start
Doc: Distance the nearest gene start transformed with B-splines
Name: dist_gene_end
Doc: Distance the nearest gene end transformed with B-splines
Defined as: .
Doc: RBP binding model taking as input 101nt long sequence as well as 8 distances to nearest genomic landmarks - tss, poly-A, exon-intron boundary, intron-exon boundary, start codon, stop codon, gene start, gene end
Type: None
License: MIT
Arguments
intervals_file : bed6 file with `chrom start end id score strand` columns
fasta_file : Reference genome sequence
gtf_file : file path; Genome annotation GTF file
target_file (optional): path to the targets (txt) file
filter_protein_coding (optional): Considering genomic landmarks only for protein coding genes when computing the distances to the nearest genomic landmark.
position_transformer_file : Provided file for each dataloader obtained from https://sandbox.zenodo.org/record/248594/files/NCBP2.dataloader.pkl?download=1
use_linecache (optional): if True, use linecache https://docs.python.org/3/library/linecache.html to access bed file rows
- pip=20.3.3
- concise
- tensorflow==1.15
- keras==2.1.6
- h5py==2.10.0
- protobuf==3.20
- bioconda::pybedtools
- bioconda::pysam=0.15.3
- bioconda::genomelake
- bioconda::pybigwig
- bioconda::pyfaidx
- bioconda::gtfparse=1.0.7
- python=3.7
- cython
- pip=20.3.3
- concise>=0.6.6
- scikit-learn==0.19.2