Skip to content

Add facets_tools_2n 3.0.0 container - #65

Open
price0416 wants to merge 1 commit into
developfrom
feature/facets_tools_2n
Open

Add facets_tools_2n 3.0.0 container#65
price0416 wants to merge 1 commit into
developfrom
feature/facets_tools_2n

Conversation

@price0416

Copy link
Copy Markdown
Collaborator

What

Adds containers/facets_tools_2n/3.0.0/Dockerfile — the FACETS copy number suite for the unmatched-normal (2N) workflow. This is the counterpart to the existing containers/facets_tools, which packages stock facets-suite; the 2N path needs a different suite (facets-suite-2n) and a different engine (facets2n), so it ships as a separate image rather than a variant tag.

Used by the 2N subworkflow in CADENCE (nf_impact), which currently points at a personal Docker Hub image.

Contents

Component Version Pinned to
facets-suite-2n 3.0.0 d66ad19499181b1f8c557619e5b7e0652c94ea5c
facets2n 0.4.1 34016dcbbfdc8dc5583388a782bd442a545a683c
facets-preview 2.2 a78fe1708665c17223893c63084805bb2639217d
facets 0.5.14 release tag
pctGCdata 0.3.0 release tag
htslib / snp-pileup / ppflag-fixer 1.5 / 0.1.1 release tags

facets2n, facets-suite-2n and facets-preview have no release tags at these versions, so each is pinned to an explicit commit rather than a branch tip. Recipes for this stack have historically cloned branch tips, which meant the same image tag could mean different code on different build days.

The facets2n pin specifically carries a fix for a findDiploidLogR crash on allelically-flat genomes (common in heme samples), so it is not interchangeable with an arbitrary master.

Design notes

Base is ghcr.io/mskcc-omics-workflows/r_tidyverse:3.6.3, and the file is multi-stage, matching containers/facets_tools. The original recipe this was ported from used rocker/tidyverse:3.6.3-ubuntu18.04, which is amd64-only — buildx does not hard-fail on that, it downgrades to an InvalidBaseImagePlatform warning and produces amd64 content tagged arm64, which would then be pushed and folded into the multi-arch manifest. Rebasing on r_tidyverse fixes that and drops a set of Ubuntu 18.04 apt-mirror workarounds.

Only four R packages are installed on top of the baseplyr, diptest, DT, reshape2. Everything else the suite needs is already in r_tidyverse.

reshape2 is not in any of the three packages' DESCRIPTIONs, but facets-preview ships a top-level arranging_facets.R that calls library(reshape2), and that script is copied into the image.

data.table is pinned forward to 1.17.4, above the base snapshot's 1.14.6. facets-suite-2n only declares >= 1.11.8, but it leans on data.table heavily and 1.17.4 is the version the 2N pipeline was validated against.

Verification

The final stage fails the build unless all of the following hold, so a bad resolve cannot ship silently:

  • exact versions for data.table, pctGCdata, facets, facetsSuite; presence for plyr, diptest, DT, reshape2, rtracklayer, facets2n, facetsPreview
  • snp-pileup and ppflag-fixer execute
  • run-facets-wrapper.R exposes --facets2n-lib-path and --MandUnormal, and snp-pileup-wrapper.R exposes --unmatched-normal-BAMS — i.e. a build that silently resolved stock facets-suite fails rather than shipping
  • the installed facets2n contains the flat-genome dipLogR guard, so a stale pin is caught

Locally, ahead of this PR:

  • hadolint clean against the repo's .hadolint.yml
  • linux/amd64 and linux/arm64 both build end to end and pass the verification stage
  • --help for all three facets-suite-2n wrappers exits 0 and is byte-identical across both architectures

Not yet done

This image has not been run on real 2N data. Verification here is structural — versions, CLI surface, load tests. The R stack differs from the previously validated one (Ubuntu 22.04 vs 18.04, different CRAN snapshot), so a run through the 2N subworkflow on a known pair is warranted before anything depends on it in production.

🤖 Generated with Claude Code

FACETS copy number suite for the unmatched-normal (2N) workflow, the
counterpart to the existing facets_tools image:

  facets-suite-2n 3.0.0  (5-fit run-facets-wrapper.R, --MandUnormal)
  facets2n 0.4.1         (unmatched-normal reference selection)
  facets 0.5.14 + pctGCdata 0.3.0
  htslib 1.5 / snp-pileup + ppflag-fixer 0.1.1
  facets-preview 2.2

Built on ghcr.io/mskcc-omics-workflows/r_tidyverse:3.6.3 and structured
as multi-stage, matching containers/facets_tools. The base already
provides every R package this suite needs except plyr, diptest, DT and
reshape2. data.table is additionally pinned forward to 1.17.4, the
version the 2N pipeline was validated against, rather than inheriting
the 1.14.6 in the base snapshot.

facets2n, facets-suite-2n and facets-preview have no release tags at
these versions, so each is pinned to an explicit commit rather than a
branch tip to keep rebuilds reproducible.

The final stage verifies exact package versions, that snp-pileup and
ppflag-fixer run, that the wrapper scripts expose the 2N-specific flags
(so a build that silently resolved stock facets-suite fails rather than
shipping), and that the pinned facets2n carries the flat-genome dipLogR
guard in findDiploidLogR.

Verified: hadolint clean against .hadolint.yml; linux/amd64 and
linux/arm64 both build end to end and pass the verification stage; the
--help output of all three facets-suite-2n wrappers is byte-identical
across both architectures, and matches a reference build of the same
software except for one argparse header line that changed with Python
3.10.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.

1 participant