Skip to content

Commit

Permalink
ENH: Add multi-read and VBZ compression FAST5 support
Browse files Browse the repository at this point in the history
  • Loading branch information
jonperdomo authored Feb 10, 2023
1 parent a0248f2 commit 6bb5af5
Show file tree
Hide file tree
Showing 12 changed files with 541 additions and 445 deletions.
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ WORKDIR /longreadsum
# Install build tools
RUN apt-get update && apt-get install build-essential -y

# Install VBZ compression
RUN wget https://github.com/nanoporetech/vbz_compression/releases/download/v1.0.1/ont-vbz-hdf-plugin-1.0.1-Linux-x86_64.tar.gz
RUN tar -xf ont-vbz-hdf-plugin-1.0.1-Linux-x86_64.tar.gz

# Create the environment
RUN conda env create -f environment.yml

Expand All @@ -22,6 +26,11 @@ RUN which python
# Build LongReadSum
RUN make

# Set up the HDF5 plugin path
#RUN export HDF5_PLUGIN_PATH=/longreadsum/ont-vbz-hdf-plugin-1.0.1-Linux/usr/local/hdf5/lib/plugin/
ENV HDF5_PLUGIN_PATH="/longreadsum/ont-vbz-hdf-plugin-1.0.1-Linux/usr/local/hdf5/lib/plugin/"
RUN echo "The HDF5_PLUGIN_PATH is $HDF5_PLUGIN_PATH"

# The code to run when container is started:
WORKDIR /
ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "lrst_py39", "python", "longreadsum"]
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ docker pull genomicslab/longreadsum

On Unix/Linux:
```
docker run -v local/inputs/:/inputs/ -it genomicslab/longreadsum bam -i /inputs/input.bam
docker run -v C:/Users/.../DataDirectory:/mnt/ -it genomicslab/longreadsum bam -i /mnt/input.bam -o /mnt/output
```
Note that the `-v` command is required for Docker to find the input file. In the above BAM file example, the local directory `local/inputs/` containing the input file is mapped to a directory `/inputs/` in the Docker container. Thus, the input file is specified as `/inputs/input.bam`
Note that the `-v` command is required for Docker to find the input file. Use a directory under `C:/Users/` to ensure volume files are mounted correctly. In the above example, the local directory `C:/Users/.../DataDirectory` containing the input file `input.bam` is mapped to a directory `/mnt/` in the Docker container. Thus, the input file and output directory arguments are relative to the `/mnt/` directory, but the output files will also be saved locally in `C:/Users/.../DataDirectory` under the specified subdirectory `output`.


# Installation using Anaconda
First install [Anaconda](https://www.anaconda.com/). Then follow the instructions below to install LongReadSum and its dependencies:
Expand All @@ -47,6 +48,23 @@ conda activate lrst_py39
make
```

If you are using FAST5 files with VBZ compression, you will need to download and install the VBZ plugin corresponding to your architecture:
https://github.com/nanoporetech/vbz_compression/releases

For example:

```
wget https://github.com/nanoporetech/vbz_compression/releases/download/v1.0.1/ont-vbz-hdf-plugin-1.0.1-Linux-x86_64.tar.gz
tar -xf ont-vbz-hdf-plugin-1.0.1-Linux-x86_64.tar.gz
```

Finally, add the plugin to your path:
```
export HDF5_PLUGIN_PATH=/full/path/to/ont-vbz-hdf-plugin-1.0.1-Linux/usr/local/hdf5/lib/plugin
```


## Running
Activate the conda environment:

Expand Down
1 change: 0 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ dependencies:
- hdf5
- htslib
- samtools
- minimap2
- swig
- matplotlib
- plotly=4.14
Expand Down
1 change: 1 addition & 0 deletions include/FAST5_module.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "InputStructure.h"
#include "OutputStructures.h"


int generateQCForFAST5(Input_Para &_input_data, Output_FAST5 &output_data);

#endif
106 changes: 0 additions & 106 deletions lib/hdf5-1_12_1/COPYING

This file was deleted.

Binary file removed lib/hdf5-1_12_1/libhdf5_cpp.so
Binary file not shown.
Loading

0 comments on commit 6bb5af5

Please sign in to comment.