Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker image for DRAGMAP #36

Closed
skchronicles opened this issue Jun 15, 2022 · 6 comments
Closed

Docker image for DRAGMAP #36

skchronicles opened this issue Jun 15, 2022 · 6 comments

Comments

@skchronicles
Copy link

Hello there,

Thank you for maintaining this awesome open-source version of Dragen's aligner! I was planning on replacing bwa-mem2 with dragmap for its slightly higher accuracy. We have internally benchmarked it, and it seems to perform better.

I just have a quick question. Do you have a Dockerfile for building an image of this tool? I peeked around Dockerhub and saw a few images exist for DRAGMAP, but they didn't look too promising after taking a closer look. I was planning on building an image for our pipeline if one does not exist. If you want, I can send you the final Dockerfile.

Please let me know what you think.

Best Regards,
@skchronicles

@skchronicles
Copy link
Author

Here is a Dockerfile using Ubuntu:

# Dragmap Dockerfile
# Using Ubuntu Focal (20.04 LTS) as base image
FROM ubuntu:20.04
LABEL [email protected]

# Overview of Dependencies
#  • C++17 compatible compiler (e.g gcc-c++ >= 7.1)
#  • GNU make >= 3.82 and cmake
#  • Compression Library: zlib
#  • Boost library: libboost-all-dev
#  • For unit tests: googletest (>= v1.6) and libgtest-dev
#  • Git: get version information

# Define release with --build-arg VERSION=$RELEASE_VERSION
# where the default = 1.3.0
ARG VERSION=1.3.0

# Create Container filesystem specific 
# working directory and opt directories
# to avoid collisions with host filesyetem 
RUN mkdir -p /opt2 && mkdir -p /data2
WORKDIR /opt2 

# Set time zone to US east coast 
ENV TZ=America/New_York
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \
    && echo $TZ > /etc/timezone

# This section installs system packages 
# required for your project. If you need 
# extra system packages add them here.
RUN apt-get update \
    && apt-get -y upgrade \
    && DEBIAN_FRONTEND=noninteractive apt-get install -y \
        build-essential \
        libboost-all-dev \
        libgtest-dev \
        libz-dev \
        g++ \
        gcc \
        git \
        googletest \
        locales \
        cmake \
        make \
        wget \
    && apt-get clean && apt-get purge \
    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Set the locale
RUN localedef -i en_US -f UTF-8 en_US.UTF-8

# Install DRAGMAP from official release
RUN wget --no-check-certificate https://github.com/Illumina/DRAGMAP/archive/refs/tags/${VERSION}.tar.gz \
    && tar -xvf ${VERSION}.tar.gz \
    && rm ${VERSION}.tar.gz \
    && cd DRAGMAP-${VERSION} \
    && make \
    && make install \
    && dragen-os --help

WORKDIR /opt2 

# Add Dockerfile and export env variables
ADD Dockerfile /opt2/Dockerfile
RUN chmod -R a+rX /opt2 
ENV PATH="/opt2:$PATH"
WORKDIR /data2

In the process of building this tool, I found a bug related to how version information is gathered. It looks like you are using git describe to get version information. This is problematic when building the tool from source from a versioned release because the tarball is missing the .git directory. It may be better to store version information in a separate VERISON file, or in using another method.

Here is an example within the Docker container:
image

@skchronicles
Copy link
Author

Here is where the issue may be arising from:
image

@rizkg
Copy link
Collaborator

rizkg commented Jun 21, 2022

Hi,
Thanks for the dockerfile, that might be useful to some other users. The other install options are currently only form source or with bioconda.
Thanks also for reporting the version string issue !

@skchronicles
Copy link
Author

Sure, no problem, and thank you for your response!

I ended up pushing the final image to Dockerhub here. Please feel free to use it if you want.

@yangyxt
Copy link

yangyxt commented Oct 21, 2022

Hi, thank you very much for sharing the docker image.

I have an issue with the 1.3.0 version and tried your docker image with singularity and the issue continues.
I put the issue here but unfortunately, DragMap developers seem to not have time to look into these issue posts.

I checked the function in src/lib/workflow/Input2SamWorkflow.cpp, it catches the error of boost::iostream::gzip_error. So I figured it might be a gzip format error with my input Fastq File.

However, I checked the input file with gzip -t -v, and here is the log:
image

It does not seem problematic to me. I really had no clue what was going on. If you have run into similar issues, could you pls share some ideas about what might go wrong with my data or commands?

Much appreciated!

@floriankreten
Copy link

This docker should be placed more popular on the homepage. Saved my day, and dockers are always welcome :)

When installing dragmap from bioconda in a fresh environment with python3.12, the alignment on the same data results in

...
When maskLen < 15, the function ssw_align doesn't return 2nd best alignment information.
When maskLen < 15, the function ssw_align doesn't return 2nd best alignment information.
When maskLen < 15, the function ssw_align doesn't return 2nd best alignment information.
Speicherzugriffsfehler (Speicherabzug geschrieben) (Memory Access Error)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants