Skip to content

use samtools > v1 (for vcf2maf) - #298

Merged
pdiakumis merged 1 commit into
devfrom
issues/297-samtools
Jul 8, 2026
Merged

pdiakumis merged 1 commit into
devfrom
issues/297-samtools

Conversation

@pdiakumis

Copy link
Copy Markdown
Collaborator

Fixes #297.
I did a local conda-lock and the samtools v1 requirement forces conda to pull in the samtools-less perl-bio-samtools which is what we want.
@sigven I think this is critical enough to be merged straight into main and we should make a new patch release v2.3.1

@pdiakumis pdiakumis self-assigned this Jul 7, 2026
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Require samtools >=1.0 to ensure vcf2maf-compatible dependency resolution

🐞 Bug fix ⚙️ Configuration changes 🕐 Less than 5 minutes

Grey Divider

AI Description

• Add explicit samtools >=1.0 dependency to avoid pulling samtools-less perl-bio-samtools.
• Stabilize conda resolution for vcf2maf workflows and fix issue #297.
Diagram

graph TD
  A["PCGR conda env"] --> B["samtools >=1.0"] --> C["vcf2maf"]

  subgraph Legend
    direction LR
    _cfg["Config (env yaml)"] ~~~ _dep["Pinned dependency"] ~~~ _tool["Tooling"]
  end
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Pin via conda-lock only (no env yaml change)
  • ➕ Keeps the human-maintained env yaml minimal
  • ➕ Ensures fully reproducible solves per platform
  • ➖ Does not fix general dependency resolution for users not using the lockfile
  • ➖ Issue can reappear with fresh solves or different platforms
2. Stricter pin (e.g., samtools >=1,<2)
  • ➕ Reduces risk of future breaking changes from major-version bumps
  • ➕ More deterministic dependency behavior
  • ➖ May unnecessarily block compatible newer versions
  • ➖ Requires maintenance when upstream moves

Recommendation: The current approach (explicitly requiring samtools >=1.0 in the env yaml) is the best default because it fixes dependency resolution for all installs, not only lockfile-based ones. Consider tightening the upper bound later only if a concrete incompatibility with samtools v2 is observed.

Files changed (1) +1 / -0

Other (1) +1 / -0
pcgr.yamlAdd explicit samtools >=1.0 dependency +1/-0

Add explicit samtools >=1.0 dependency

• Introduces a bioconda samtools >=1.0 requirement in the PCGR conda environment. This steers conda away from selecting the samtools-less perl-bio-samtools variant and improves vcf2maf compatibility.

conda/env/yaml/pcgr.yaml

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (1) 📜 Skill insights (0)

Context used

Grey Divider


Action required

1. samtools still pinned 0.1.19 📎 Requirement gap ≡ Correctness
Description
The PR adds bioconda::samtools >=1.0 to the environment YAML, but the official Docker image (and
other lock-based installs) are built from committed conda-lock files that still pin
samtools-0.1.19, so the image will not actually pick up samtools v1 and the intended `samtools
faidx/vcf2maf` GRCh37 fix remains ineffective until the lock files are regenerated.
Code

conda/env/yaml/pcgr.yaml[16]

+  - bioconda::samtools >=1.0
Evidence
The cited compliance requirements call for the official Docker image to have working samtools v1-era
faidx behavior and to complete vcf2maf without external wrappers; however, the build process
creates the pcgr environment from conda/env/lock/pcgr-*-64.lock via mamba create --file ...,
meaning the lock file contents—not the YAML—determine the installed versions. Since the current lock
files explicitly include samtools-0.1.19, adding a samtools >=1.0 constraint only in
conda/env/yaml/pcgr.yaml will not change the samtools version in the built Docker/locked
environments.

PCGR Docker image provides a samtools faidx implementation compatible with the bundled gzipped GRCh37 FASTA
vcf2maf stage completes for GRCh37 VCF containing EGFR-E746_A750del without requiring external samtools wrappers
conda/env/yaml/pcgr.yaml[13-20]
Dockerfile[21-26]
conda/env/lock/pcgr-linux-64.lock[97-101]
conda/env/lock/pcgr-osx-64.lock[126-132]
conda/env/yaml/pcgr.yaml[13-19]
conda/env/lock/pcgr-linux-64.lock[95-101]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`conda/env/yaml/pcgr.yaml` now requires `bioconda::samtools >=1.0`, but Docker (and users following lock-based installs) build environments from the committed `conda/env/lock/*.lock` files, which still pin `samtools-0.1.19`. As a result, the official Docker image will not actually get samtools v1 from this PR alone, leaving the `samtools faidx`/`vcf2maf` GRCh37 fix ineffective until the lock files are regenerated and updated.

## Issue Context
The `Dockerfile` creates the environment using `mamba create --file ...pcgr-linux-64.lock`, so the lock file contents (not the YAML) determine what ends up in the shipped image. The current lock files still reference `samtools-0.1.19`.

## Fix Focus Areas
- conda/env/yaml/pcgr.yaml[13-20]
- conda/env/lock/pcgr-linux-64.lock[95-101]
- conda/env/lock/pcgr-osx-64.lock[126-132]
- Dockerfile[21-26]

## Expected fix
1. Re-run `conda-lock` for `conda/env/yaml/pcgr.yaml` (both linux-64 and osx-64) so the resulting lock files resolve to samtools v1+.
2. Commit the updated `conda/env/lock/pcgr-linux-64.lock` and `conda/env/lock/pcgr-osx-64.lock` outputs.
3. (Optional sanity) Verify the rebuilt Docker image reports `samtools --version` as v1+ and that `vcf2maf` no longer errors.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

Comment thread conda/env/yaml/pcgr.yaml
- conda-forge::pandoc
- bioconda::perl-bio-bigfile
- conda-forge::perl-compress-raw-zlib
- bioconda::samtools >=1.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. samtools still pinned 0.1.19 📎 Requirement gap ≡ Correctness

The PR adds bioconda::samtools >=1.0 to the environment YAML, but the official Docker image (and
other lock-based installs) are built from committed conda-lock files that still pin
samtools-0.1.19, so the image will not actually pick up samtools v1 and the intended `samtools
faidx/vcf2maf` GRCh37 fix remains ineffective until the lock files are regenerated.
Agent Prompt
## Issue description
`conda/env/yaml/pcgr.yaml` now requires `bioconda::samtools >=1.0`, but Docker (and users following lock-based installs) build environments from the committed `conda/env/lock/*.lock` files, which still pin `samtools-0.1.19`. As a result, the official Docker image will not actually get samtools v1 from this PR alone, leaving the `samtools faidx`/`vcf2maf` GRCh37 fix ineffective until the lock files are regenerated and updated.

## Issue Context
The `Dockerfile` creates the environment using `mamba create --file ...pcgr-linux-64.lock`, so the lock file contents (not the YAML) determine what ends up in the shipped image. The current lock files still reference `samtools-0.1.19`.

## Fix Focus Areas
- conda/env/yaml/pcgr.yaml[13-20]
- conda/env/lock/pcgr-linux-64.lock[95-101]
- conda/env/lock/pcgr-osx-64.lock[126-132]
- Dockerfile[21-26]

## Expected fix
1. Re-run `conda-lock` for `conda/env/yaml/pcgr.yaml` (both linux-64 and osx-64) so the resulting lock files resolve to samtools v1+.
2. Commit the updated `conda/env/lock/pcgr-linux-64.lock` and `conda/env/lock/pcgr-osx-64.lock` outputs.
3. (Optional sanity) Verify the rebuilt Docker image reports `samtools --version` as v1+ and that `vcf2maf` no longer errors.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@pdiakumis
pdiakumis changed the base branch from main to dev July 8, 2026 12:13
@pdiakumis
pdiakumis merged commit 01aed58 into dev Jul 8, 2026
@pdiakumis
pdiakumis deleted the issues/297-samtools branch July 8, 2026 12:14
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.

Docker samtools bug

1 participant