# HG changeset patch # User galaxytrakr # Date 1773673327 0 # Node ID 719889ec4e14438e3784ccfd219ec15deaa45bb3 # Parent dcf6c2409ebb42c33a27b42779d60314c2464df1 planemo upload commit 92689f52a93241194941ecf374629245c8fb9093 diff -r dcf6c2409ebb -r 719889ec4e14 Dockerfile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Dockerfile Mon Mar 16 15:02:07 2026 +0000 @@ -0,0 +1,74 @@ +# ============================================================= +# Dockerfile for refchooser (compatible with Galaxy) +# ============================================================= + +# ---------- Build Stage 1: The "Builder" ---------- +# This stage downloads and prepares all our dependencies. +FROM ubuntu:20.04 AS builder + +# Set versions for our tools to make updates easy. +ARG MASH_VER="2.3" +ARG PYTHON_VER="3.8" + +# Avoid interactive prompts during apt-get install. +ENV DEBIAN_FRONTEND=noninteractive + +# Install all the dependencies needed to build our tools. +RUN apt-get update && apt-get install -y --no-install-recommends \ + wget \ + tar \ + gzip \ + python${PYTHON_VER} \ + python${PYTHON_VER}-venv \ + && rm -rf /var/lib/apt/lists/* + +# Set a working directory for our downloads. +WORKDIR /build + +# --- Install Mash --- +# Download the pre-compiled Linux binary for Mash. +ADD https://github.com/marbl/Mash/releases/download/v${MASH_VER}/mash-Linux64-v${MASH_VER}.tar . +# Unpack the tarball, find the 'mash' executable, and install it to a standard location. +RUN tar -xvf mash-Linux64-v${MASH_VER}.tar && \ + install -m 0755 mash-Linux64-v${MASH_VER}/mash /usr/local/bin/mash + +# --- Install refchooser --- +# Create a Python virtual environment in a standard location. +RUN python${PYTHON_VER} -m venv /opt/venv +# Activate the venv and install refchooser and its dependencies using pip. +ENV PATH="/opt/venv/bin:$PATH" +RUN pip install --no-cache-dir refchooser + + +# ---------- Build Stage 2: The "Runtime" Stage ---------- +# This is our final, lean image that will be used by Galaxy. +FROM ubuntu:20.04 AS runtime + +# Avoid interactive prompts. +ENV DEBIAN_FRONTEND=noninteractive + +# Install only the essential runtime libraries needed by Mash and Python. +RUN apt-get update && apt-get install -y --no-install-recommends \ + libgomp1 \ + python3.8-venv \ + && rm -rf /var/lib/apt/lists/* + +# --- Copy Binaries and Environment from Builder Stage --- + +# Copy the compiled 'mash' binary from the builder stage. +COPY --from=builder /usr/local/bin/mash /usr/local/bin/mash + +# Copy the entire Python virtual environment containing 'refchooser'. +COPY --from=builder /opt/venv /opt/venv + +# --- Final Configuration --- + +# Set the PATH environment variable so the system can find 'mash' and 'refchooser'. +ENV PATH="/opt/venv/bin:$PATH" + +# As a best practice for Galaxy, ensure all users can read and execute the tools. +RUN chmod -R a+rX /opt/venv && \ + chmod a+rx /usr/local/bin/mash + +# IMPORTANT: No ENTRYPOINT. Set a neutral CMD for Galaxy compatibility. +CMD ["/bin/bash"] diff -r dcf6c2409ebb -r 719889ec4e14 job_conf.yml --- a/job_conf.yml Mon Dec 08 20:28:57 2025 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -runners: - local: - load: galaxy.jobs.runners.local:LocalJobRunner - workers: 16 - -# handling: -# processes: -# handler0: - -execution: - default: local - environments: - local: - runner: local - docker_local: - runner: local - docker_enabled: true - # container: "auto" - docker_volumes: $defaults - # docker_set_user: null - docker_run_extra_arguments: "--entrypoint ''" - docker_set_user: root - -tools: -- id: refchooser - # handler: handler0 - environment: docker_local - -limits: -- - # Amount of time a job can run (in any environment) before it - # will be terminated by Galaxy. - type: walltime - value: '01:00:00' \ No newline at end of file diff -r dcf6c2409ebb -r 719889ec4e14 refchooser.xml --- a/refchooser.xml Mon Dec 08 20:28:57 2025 +0000 +++ b/refchooser.xml Mon Mar 16 15:02:07 2026 +0000 @@ -1,7 +1,8 @@ - + Select centroidal assembly from a collection of closely-related assemblies, for reference purposes - quay.io/galaxytrakr/refchooser:0.2.3 + cfsanbiostatistics/refchooser:0.2.1 + &2 && mkdir output && - cp ./assemblies/\$BEST.fasta output/\$BEST.fasta && - ls -l output/ + cp ./assemblies/\$BEST.fasta output/\$BEST.fasta ]]> diff -r dcf6c2409ebb -r 719889ec4e14 test-data/.gitmodules --- a/test-data/.gitmodules Mon Dec 08 20:28:57 2025 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -[submodule "test/csp2"] - path = test/csp2 - url = https://github.com/CFSAN-Biostatistics/CSP2_TestData.git diff -r dcf6c2409ebb -r 719889ec4e14 tool-data/all_fasta.loc.sample