deepTarget

Authors: Byunghan Lee , Junghwan Baek , Seunghyun Park , Sungroh Yoon

License: GPL-v3

Contributed by: Ziga Avsec

Cite as: https://arxiv.org/pdf/1603.09123.pdf

Type: None

Postprocessing: None

Trained on: 4,735 positive and 1,225 negative miRNA-mRNA interactions (Menor et al., 2014)

Source files

deepTarget miRNA target prediction - http://data.snu.ac.kr/pub/deepTarget/

Create a new conda environment with all dependencies installed
kipoi env create deepTarget
source activate kipoi-deepTarget
Test the model
kipoi test deepTarget --source=kipoi
Make a prediction
kipoi get-example deepTarget -o example
kipoi predict deepTarget \
  --dataloader_args='{"mirna_fasta_file": "example/mirna_fasta_file", "mrna_fasta_file": "example/mrna_fasta_file", "query_pair_file": "example/query_pair_file"}' \
  -o '/tmp/deepTarget.example_pred.tsv'
# check the results
head '/tmp/deepTarget.example_pred.tsv'
Create a new conda environment with all dependencies installed
kipoi env create deepTarget
source activate kipoi-deepTarget
Get the model
import kipoi
model = kipoi.get_model('deepTarget')
Make a prediction for example files
pred = model.pipeline.predict_example(batch_size=4)
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
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'])
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('deepTarget')
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)
Get the docker image
docker pull kipoi/kipoi-docker:deeptarget-slim
Get the full sized docker image
docker pull kipoi/kipoi-docker:deeptarget
Get the activated conda environment inside the container
docker run -it kipoi/kipoi-docker:deeptarget-slim
Test the model
docker run kipoi/kipoi-docker:deeptarget-slim kipoi test deepTarget --source=kipoi
Make prediction for custom files directly
# 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:deeptarget-slim \
kipoi get-example deepTarget -o /app/example 
docker run -v $PWD/kipoi-example:/app/ kipoi/kipoi-docker:deeptarget-slim \
kipoi predict deepTarget \
--dataloader_args='{'mirna_fasta_file': '/app/example/mirna_fasta_file', 'mrna_fasta_file': '/app/example/mrna_fasta_file', 'query_pair_file': '/app/example/query_pair_file'}' \
-o '/app/deepTarget.example_pred.tsv' 
# check the results
head $PWD/kipoi-example/deepTarget.example_pred.tsv
    
Install apptainer
https://apptainer.org/docs/user/main/quick_start.html#quick-installation-steps
Make prediction for custom files directly
kipoi get-example deepTarget -o example
kipoi predict deepTarget \
--dataloader_args='{"mirna_fasta_file": "example/mirna_fasta_file", "mrna_fasta_file": "example/mrna_fasta_file", "query_pair_file": "example/query_pair_file"}' \
-o 'deepTarget.example_pred.tsv' \
--singularity 
# check the results
head deepTarget.example_pred.tsv

Schema

Inputs

Dictionary of numpy arrays

Name: mirna_int_seq

    Shape: (40,) 

    Doc: miRNA query sequences in the integer form: A:1, C:2, G:3, T:4, U:4.

Name: mrna_int_seq

    Shape: (40,) 

    Doc: mRNA target sequence in the integer form: A:1, C:2, G:3, T:4, U:4.


Targets

Single numpy array

Name: None

    Shape: (1,) 

    Doc: Prediction probability


Dataloader

Defined as: .

Doc: deepTarget miRNA target prediction - http://data.snu.ac.kr/pub/deepTarget/

Authors: Byunghan Lee , Junghwan Baek , Seunghyun Park , Sungroh Yoon

Type: PreloadedDataset

License: GPL-v3


Arguments

mirna_fasta_file : mirna fasta file

mrna_fasta_file : mrna fasta file of interest

query_pair_file : ??mapping between mrna and mirna fasta


Model dependencies
conda:
  • python=3.7
  • pip=21.0.1
  • numpy=1.19.5
  • theano=1.0.5

pip:
  • keras==0.3.3

Dataloader dependencies
conda:
  • python=3.7
  • bioconda::biopython=1.79
  • theano=1.0.5

pip:
  • scikit-learn==0.19.2
  • keras==0.3.3