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

adding piranha version 1.4.2 #1222

Merged
merged 2 commits into from
Mar 20, 2025
Merged

Conversation

erinyoung
Copy link
Contributor

There's a new version of piranha! (Well... a few of them)

According to the release notes there are more minimap2 options.

I copied the files from 1.0.4 and made some changes

  • base changed to mambaorg/micromamba:2.0.5-ubuntu22.04
  • updated version ARG
  • adjusted how pip installs piranha
  • install pyabpoa with pip to suppress warning (likely a medaka thing)
  • adjusted paths in test
  • added conda install to path so that mamba environmental variables aren't needed
  • added CMD line
  • fixed website URL
  • adjusted tabs for my linter
  • changed as to AS for my linter

The full diff:

$ diff build-files/piranha/1.*/Dockerfile
1c1,5
< FROM mambaorg/micromamba:0.27.0 as app
---
> ARG PIRANHA_VER="1.4.2"
> 
> FROM mambaorg/micromamba:2.0.5-ubuntu22.04 AS app
> 
> ARG PIRANHA_VER
8,10d11
< # ARG variables only persist during build time
< ARG PIRANHA_VER="1.0.4"
< 
12c13
< LABEL base.image="mambaorg/micromamba:0.27.0"
---
> LABEL base.image="mambaorg/micromamba:2.0.5-ubuntu22.04"
17c18
< LABEL website="https://github.com/cov-lineages/piranha"
---
> LABEL website="https://github.com/polio-nanopore/piranha"
20,21c21,22
< LABEL maintainer1="Curtis Kapsak"
< LABEL maintainer1.email="curtis.kapsak@theiagen.com"
---
> LABEL maintainer="Curtis Kapsak"
> LABEL maintainer.email="curtis.kapsak@theiagen.com"
27,32c28,32
<  wget \
<  ca-certificates \
<  git \
<  procps \
<  build-essential && \
<  apt-get autoclean && rm -rf /var/lib/apt/lists/*
---
>     wget \
>     ca-certificates \
>     procps \
>     build-essential && \
>     apt-get autoclean && rm -rf /var/lib/apt/lists/*
35,56c35,40
< RUN wget "https://github.com/polio-nanopore/piranha/archive/refs/tags/${PIRANHA_VER}.tar.gz" && \
<  tar -xf ${PIRANHA_VER}.tar.gz && \
<  rm ${PIRANHA_VER}.tar.gz && \
<  mv -v piranha-* piranha && \
<  micromamba create -n piranha -y -f /piranha/environment.yml
< 
< # set the environment; PATH unneccessary at this point, for easy changes later; LC_ALL is for singularity compatibility
< ENV PATH="${PATH}" \
<  LC_ALL=C.UTF-8
< 
< # so that mamba/conda env is active when running below commands
< ENV ENV_NAME="piranha"
< ARG MAMBA_DOCKERFILE_ACTIVATE=1
< 
< WORKDIR /piranha
< 
< # run pip install step
< # clean up micromamba/conda garbage
< # make /data directory
< RUN pip install . && \
<  micromamba clean -a -y && \
<  mkdir /data 
---
> RUN wget -q https://github.com/polio-nanopore/piranha/archive/refs/tags/${PIRANHA_VER}.tar.gz && \
>     tar -xf ${PIRANHA_VER}.tar.gz && \
>     micromamba create -n piranha -y -f /piranha-${PIRANHA_VER}/environment.yml && \
>     /opt/conda/envs/piranha/bin/pip install ${PIRANHA_VER}.tar.gz --no-cache-dir && \
>     rm ${PIRANHA_VER}.tar.gz && \
>     mkdir /data 
62c46,51
< ENV PATH="${PATH}:/opt/conda/envs/piranha/bin/"
---
> ENV PATH="${PATH}:/opt/conda/envs/piranha/bin/" \
>     LC_ALL=C.UTF-8
> 
> RUN pip install pyabpoa
> 
> CMD ["piranha" ,"--help"]
65c54
< FROM app as test
---
> FROM app AS test
67,69c56
< # # so that mamba/conda env is active when running below commands
< ENV ENV_NAME="piranha"
< ARG MAMBA_DOCKERFILE_ACTIVATE=1
---
> ARG PIRANHA_VER
75c62
< WORKDIR /piranha
---
> WORKDIR /test
80,81c67,68
< RUN piranha -i piranha/test/pak_run/demultiplexed --verbose -b piranha/test/pak_run/barcodes01.csv -t 2 2>&1 | tee piranha.log && \
<  piranha -i piranha/test/pak_run/demultiplexed --verbose -b piranha/test/pak_run/barcodes.csv -t 2 2>&1 | tee piranha_all.log
---
> RUN piranha -i /piranha-${PIRANHA_VER}/piranha/test/pak_run/demultiplexed --verbose -b /piranha-${PIRANHA_VER}/piranha/test/pak_run/barcodes01.csv -t 2 2>&1 | tee piranha.log && \
>     piranha -i /piranha-${PIRANHA_VER}/piranha/test/pak_run/demultiplexed --verbose -b /piranha-${PIRANHA_VER}/piranha/test/pak_run/barcodes.csv -t 2 2>&1 | tee piranha_all.log

Pull Request (PR) checklist:

  • Include a description of what is in this pull request in this message.
  • The dockerfile successfully builds to a test target for the user creating the PR. (i.e. docker build --tag samtools:1.15test --target test docker-builds/build-files/samtools/1.15 )
  • Directory structure as name of the tool in lower case with special characters removed with a subdirectory of the version number in build-files (i.e. docker-builds/build-files/spades/3.12.0/Dockerfile)
    • (optional) All test files are located in same directory as the Dockerfile (i.e. build-files/shigatyper/2.0.1/test.sh)
  • Create a simple container-specific README.md in the same directory as the Dockerfile (i.e. docker-builds/build-files/spades/3.12.0/README.md)
    • If this README is longer than 30 lines, there is an explanation as to why more detail was needed
  • Dockerfile includes the recommended LABELS
  • Main README.md has been updated to include the tool and/or version of the dockerfile(s) in this PR
  • Program_Licenses.md contains the tool(s) used in this PR and has been updated for any missing

Copy link
Collaborator

@kapsakcj kapsakcj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

everything looks good and the tests passed. They did take 10 min, but not much we can do about that 🤷

I'm going to merge and deploy

@kapsakcj kapsakcj merged commit 4a789ea into StaPH-B:master Mar 20, 2025
2 checks passed
@kapsakcj
Copy link
Collaborator

deploy workflow here: https://github.com/StaPH-B/docker-builds/actions/runs/13961562371

thank you for the PR!

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

Successfully merging this pull request may close these issues.

2 participants