Skip to content

3. Additional requirements

nemitheasura edited this page Nov 23, 2023 · 2 revisions

Tensorflow & keras for R/Python

The neural network in Ninetails uses the tensorflow backend. Instructions for installing tensorflow & keras in R can be found here: https://tensorflow.rstudio.com/install/

Please be aware that the same versions of tensorflow & keras have to be installed in Python.

HDF resources

Since fast5 is a binary format based on the HDF5, handling it requires installation of certain utilities in the operating system. Most of the necessary resources can be downloaded from the HDF5 Group website: https://www.hdfgroup.org/downloads/hdf5/.

Ninetails requires also rhdf5 package and its dependencies for accessing & browsing files in fast5 format in R. It can be installed from Bioconductor (version available on CRAN is incompatible with newer R versions). The complete guide is available here: https://bioconductor.org/packages/release/bioc/html/rhdf5.html

install.packages("BiocManager")
BiocManager::install("rhdf5")

As a result, 3 packages are installed: rhdf5, rhdf5filters and Rhdf5lib.

Depending on your Bioconductor version, rhdf5filters` could be broken (have non-zero exit status during installation). In this case, it has to be reinstalled from the Github repo: https://github.com/grimbough/rhdf5filters, which can be done with following command in R/RStudio:

devtools::install_github('grimbough/rhdf5filters')

VBZ compression plugin

Nanopore sequencing data produced with newer versions of the MinKNOW software are compressed with the VBZ algorithm which allows for more efficient compression than the formerly used GZIP. In order for the ninetails package to work with VBZ-compressed data, it is necessary to install an ont-vbz-hdf-plugin from the following repo: https://github.com/nanoporetech/vbz_compression/releases

Then it is necessary to navigate to the folder where the ONT VBZ compression plug-in was installed. On Linux operating systems, the default path is /usr/local/hdf5/lib/plugin/, whereas on Windows operating systems it might be C:\Program Files\OxfordNanopore\ont-vbz-hdf-plugin\hdf5\lib\plugin. The file(s) found there (libvbz_hdf_plugin.so on Linux and vbz_hdf_plugin.dll, vbz_hdf_plugin.lib on Windows) must be copied to the rhdf5filters folder (rhdf5filters/lib/) where the R libraries are stored.

The above dependencies can be installed/configured by the user manually, python dependencies can be installed in a virtual environment with provided r-ninetails.yml file or launched directly from provided docker image - depending on user's convenience.For more details see: Installation section