MaxEntScan/5prime
5prime MaxEnt Splicing Model (http://genes.mit.edu/burgelab/maxent/Xmaxentscan_scoreseq_acc.html) implemented in the maxentpy conda package https://github.com/kepbod/maxentpy.
http://genes.mit.edu/burgelab/maxent/Xmaxentscan_scoreseq_acc.html http://genes.mit.edu/burgelab/maxent/Xmaxentscan_scoreseq.html https://github.com/kepbod/maxentpy
kipoi env create MaxEntScan
source activate kipoi-MaxEntScan
kipoi test MaxEntScan/5prime --source=kipoi
kipoi get-example MaxEntScan/5prime -o example
kipoi predict MaxEntScan/5prime \
--dataloader_args='{"fasta_file": "example/fasta_file", "gtf_file": "example/gtf_file"}' \
-o '/tmp/MaxEntScan|5prime.example_pred.tsv'
# check the results
head '/tmp/MaxEntScan|5prime.example_pred.tsv'
kipoi env create MaxEntScan
source activate kipoi-MaxEntScan
import kipoi
model = kipoi.get_model('MaxEntScan/5prime')
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('MaxEntScan/5prime')
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:sharedpy3keras2tf2-slim
docker pull kipoi/kipoi-docker:sharedpy3keras2tf2
docker run -it kipoi/kipoi-docker:sharedpy3keras2tf2-slim
docker run kipoi/kipoi-docker:sharedpy3keras2tf2-slim kipoi test MaxEntScan/5prime --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:sharedpy3keras2tf2-slim \
kipoi get-example MaxEntScan/5prime -o /app/example
docker run -v $PWD/kipoi-example:/app/ kipoi/kipoi-docker:sharedpy3keras2tf2-slim \
kipoi predict MaxEntScan/5prime \
--dataloader_args='{'fasta_file': '/app/example/fasta_file', 'gtf_file': '/app/example/gtf_file'}' \
-o '/app/MaxEntScan_5prime.example_pred.tsv'
# check the results
head $PWD/kipoi-example/MaxEntScan_5prime.example_pred.tsv
https://apptainer.org/docs/user/main/quick_start.html#quick-installation-steps
kipoi get-example MaxEntScan/5prime -o example
kipoi predict MaxEntScan/5prime \
--dataloader_args='{"fasta_file": "example/fasta_file", "gtf_file": "example/gtf_file"}' \
-o 'MaxEntScan_5prime.example_pred.tsv' \
--singularity
# check the results
head MaxEntScan_5prime.example_pred.tsv
Defined as: dataloader.SplicingMaxEntDataset
Doc: MaxEnt Splicing Model
Type: Dataset
License: MIT
Arguments
MISO_AS : Whether the given annotation file is MISO alternative splicing annotation. default False.
fasta_file : Reference Genome sequence in fasta format
gtf_file (optional): file path; Genome annotation GTF file
label_col (optional): response label column name
target_file (optional): path to the targets (txt) file
- pip=22.0.4
- bioconda::maxentpy=0.0.1
- kipoi
- bioconda::pysam=0.17
- python=3.8