BPNet-OSKN
Authors: Žiga Avsec , Melanie Weilert , Avanti Shrikumar , Sabrina Krueger , Amr Alexandari , Khyati Dalal , Robin Fropf , Charles McAnany , Julien Gagneur , Anshul Kundaje , Julia Zeitlinger
License: MIT
Cite as: https://doi.org/10.1101/737981
Type: None
Postprocessing: None
Trained on: ChIP-nexus data in mm10. test chromosomes 1, 8, 9, validation chromosomes 2, 3, 4
BPNet model predicting the ChIP-nexus profiles of Oct4, Sox2, Nanog and Klf4
kipoi env create BPNet-OSKN
source activate kipoi-BPNet-OSKN
kipoi env install BPNet-OSKN
kipoi test BPNet-OSKN --source=kipoi
kipoi get-example BPNet-OSKN -o example
kipoi predict BPNet-OSKN \
--dataloader_args='{"intervals_file": "example/intervals_file", "fasta_file": "example/fasta_file"}' \
-o '/tmp/BPNet-OSKN.example_pred.tsv'
# check the results
head '/tmp/BPNet-OSKN.example_pred.tsv'
import kipoi
model = kipoi.get_model('BPNet-OSKN')
pred = model.pipeline.predict_example()
# 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
it = dl.batch_iter(batch_size=4)
# predict for a batch
batch = next(it)
model.predict_on_batch(batch['inputs'])
pred = model.pipeline.predict(dl_kwargs, batch_size=4)
library(reticulate)
kipoi <- import('kipoi')
model <- kipoi$get_model('BPNet-OSKN')
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 haimasree/kipoi-docker:bpnet-oskn
docker run -it haimasree/kipoi-docker:bpnet-oskn
docker run haimasree/kipoi-docker:bpnet-oskn kipoi test BPNet-OSKN --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/ haimasree/kipoi-docker:bpnet-oskn \
kipoi get-example BPNet-OSKN -o /app/example
docker run -v $PWD/kipoi-example:/app/ haimasree/kipoi-docker:bpnet-oskn \
kipoi predict BPNet-OSKN \
--dataloader_args='{'intervals_file': '/app/example/intervals_file', 'fasta_file': '/app/example/fasta_file'}' \
-o '/app/BPNet-OSKN.example_pred.tsv'
# check the results
head $PWD/kipoi-example/BPNet-OSKN.example_pred.tsv
Targets
Dictionary of numpy arrays
Name: Oct4
Doc: Strand-specific ChIP-nexus data for Oct4.
Name: Sox2
Doc: Strand-specific ChIP-nexus data for Sox2.
Name: Nanog
Doc: Strand-specific ChIP-nexus data for Nanog.
Name: Klf4
Doc: Strand-specific ChIP-nexus data for Klf4.
Defined as: kipoiseq.dataloaders.SeqIntervalDl
Doc: Dataloader for a combination of fasta and tab-delimited input files such as bed files. The dataloader extracts regions from the fasta file as defined in the tab-delimited `intervals_file` and converts them into one-hot encoded format. Returned sequences are of the type np.array with the shape inferred from the arguments: `alphabet_axis` and `dummy_axis`.
Authors: Ziga Avsec , Roman Kreuzhuber
Type: Dataset
License: MIT
Arguments
intervals_file : bed3+<columns> file path containing intervals + (optionally) labels
fasta_file : Reference genome FASTA file path.
num_chr_fasta (optional): True, the the dataloader will make sure that the chromosomes don't start with chr.
use_strand (optional): reverse-complement fasta sequence if bed file defines negative strand. Requires a bed6 file
- python=3.6
- bioconda::pybedtools>=0.7.10
- bioconda::bedtools>=2.27.1
- bioconda::pybigwig>=0.3.10
- bioconda::pysam>=0.14.0
- bioconda::genomelake==0.1.4
- pytorch::pytorch
- cython
- h5py>=2.7.0
- numpy
- pandas>=0.23.0
- fastparquet
- python-snappy
- nb_conda
- tensorflow>=1.0,<1.15
- git+https://github.com/kundajelab/DeepExplain.git
- keras==2.2.4
- git+https://github.com/kundajelab/[email protected]
- bioconda::pybedtools
- bioconda::pyfaidx
- numpy
- pandas
- kipoiseq