DeepLiver/DeepLiver_Accessibility

Authors: Carmen Bravo , Stein Aerts

License: Other / Non-commercial (see LICENSE.txt)

Contributed by: Carmen Bravo , Stein Aerts

Cite as: Bravo
González-Blas
Carmen.
(2022).
Enhancer
grammar
of
liver
cell
types
and
hepatocyte
zonation
states.
https://doi.org/10.1101/2022.12.08.519575

Type: None

Postprocessing: None

Trained on: Accessible genomic sites in the mouse liver grouped into regulatory topics inferred from scATAC-seq data.

Source files

Specialized deep learning model to predict region accessibility (as topics) across cell types in the mouse liver.

Create a new conda environment with all dependencies installed
kipoi env create DeepLiver/DeepLiver_Accessibility
source activate kipoi-DeepLiver__DeepLiver_Accessibility
Test the model
kipoi test DeepLiver/DeepLiver_Accessibility --source=kipoi
Make a prediction
kipoi get-example DeepLiver/DeepLiver_Accessibility -o example
kipoi predict DeepLiver/DeepLiver_Accessibility \
  --dataloader_args='{"intervals_file": "example/intervals_file", "fasta_file": "example/fasta_file"}' \
  -o '/tmp/DeepLiver|DeepLiver_Accessibility.example_pred.tsv'
# check the results
head '/tmp/DeepLiver|DeepLiver_Accessibility.example_pred.tsv'
Create a new conda environment with all dependencies installed
kipoi env create DeepLiver/DeepLiver_Accessibility
source activate kipoi-DeepLiver__DeepLiver_Accessibility
Get the model
import kipoi
model = kipoi.get_model('DeepLiver/DeepLiver_Accessibility')
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('DeepLiver/DeepLiver_Accessibility')
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
Not available yet
Get the full sized docker image
Not available yet
Get the activated conda environment inside the container
Not available yet
Test the model
Not available yet
Make prediction for custom files directly
Not available yet
Install apptainer
https://apptainer.org/docs/user/main/quick_start.html#quick-installation-steps
Make prediction for custom files directly
Not available yet

Schema

Inputs

List of numpy arrays

Name: None

    Shape: (500, 4) 

    Doc: DNA sequence


Targets

Single numpy array

Name: topic

    Shape: (82,) 

    Doc: Topic Prediction


Dataloader

Defined as: .

Doc: Data-loader returning one-hot encoded sequences given genome intervals

Authors: Carmen Bravo

Type: None

License: MIT


Arguments

intervals_file : intervals file bed3

fasta_file : Reference genome FASTA file path.

ignore_targets (optional): if True, don't return any target variables


Model dependencies
conda:
  • python=3.7
  • numpy==1.19.5
  • h5py==2.10.0

pip:
  • tensorflow==1.15.0
  • protobuf==3.20

Dataloader dependencies
conda:
  • python=3.7
  • bioconda::pybedtools
  • bioconda::pysam
  • bioconda::pyfaidx
  • numpy
  • pandas

pip:
  • kipoiseq