Skip to content

Fix CLI/output/packaging issues for Galaxy/Bioconda integration#2

Merged
ishinder merged 2 commits into
mainfrom
fix-galaxy-bioconda-integration
Jun 7, 2026
Merged

Fix CLI/output/packaging issues for Galaxy/Bioconda integration#2
ishinder merged 2 commits into
mainfrom
fix-galaxy-bioconda-integration

Conversation

@ishinder

@ishinder ishinder commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Fixes several CLI/output/packaging issues found while wrapping EASTR as a Galaxy tool, so the wrapper can drop its workarounds. Bumps to 2.1.0.

Changes

  • --version flag (CLI11 set_version_flag) sourced from a configured version.hpp generated from the CMake project(... VERSION ...) — a single source of truth, so the git tag, CMake version, --version output, and conda package can't drift. A CI job fails on any CMakeLists.txt vs conda/meta.yaml mismatch. (required for Galaxy provenance)

  • Content-based input detection (issue Fix CLI/output/packaging issues for Galaxy/Bioconda integration #2). Input type is detected by file content, not extension, so inputs work regardless of name (Galaxy names every dataset *.dat):

    • --bam by magic bytes (BGZF/BAM, CRAM, SAM)
    • --bed by content (a BED record vs. a list of existing paths)
    • New explicit --bam_list / --bed_list flags; auto-detected path lists still work but emit a deprecation warning.
  • Output options accept a file path for single inputs (issues junction output are readin as .bed but not PATH #1, Fix --out_filtered_bam <file> creating a directory for a single BAM (2.1.1) #3, #4):

    • Fixed an is_file_path npos bug where bare filenames (out.bed, out.bam) were misread as directories. Moved to a shared path_utils helper used by OutputWriter.
    • --out_original_junctions now accepts a file path for a single input and is implemented for GTF/BED (was directory-only for BAM and a silent no-op for GTF/BED). Directory mode kept for multi-input.
    • --out_filtered_bam accepts a file path for a single BAM; fixed the generate_bam_output_paths multi-input parent-dir fallback.
  • ARM64 / CI (issue #5): added GitHub Actions CI building + testing on ubuntu-latest (x86_64), ubuntu-24.04-arm (linux-aarch64), and macos-latest (osx-arm64). The code already had the minimap2 sse2neon path for ARM.

  • Docs/tests: README output-option docs clarified (file vs directory, the --removed_alignments_bam _removed_alignments.bam suffix); new unit tests for path generation and content detection (incl. a *.dat input case); CHANGELOG.md added.

Follow-ups (not in this PR)

  • Tag v2.1.0 and update the sha256 in conda/meta.yaml.
  • Separate bioconda-recipes PR adding additional_platforms: [linux-aarch64].

Closes #1

ishinder and others added 2 commits June 7, 2026 08:05
Adds --version flag, makes input-type detection content-based
instead of extension-based, and makes the junction/BAM output options
accept a file path for single inputs. Bumps to 2.1.0.

- Add --version (CLI11 set_version_flag) sourced from a configured
  version.hpp generated from the CMake project VERSION, so the git tag,
  CMake version, --version output and conda package can't drift. A CI
  job fails on any CMakeLists.txt vs conda/meta.yaml version mismatch.

- Detect input type by content, not extension (Galaxy names every
  dataset *.dat): --bam by magic bytes (BGZF/BAM, CRAM, SAM), --bed by
  content (BED record vs list of existing paths). Add explicit
  --bam_list/--bed_list; auto-detected path lists still work but warn.
  (Issue #2)

- Fix is_file_path npos bug so bare output filenames (out.bed, out.bam)
  are treated as files, not directories. Move it to a shared path_utils
  helper and use it in OutputWriter. (Issues #1, #3, #4)

- --out_original_junctions now accepts a file path for a single input
  and is implemented for GTF/BED (previously directory-only for BAM and
  a silent no-op for GTF/BED). (Issues #1, #3)

- --out_filtered_bam accepts a file path for a single BAM input; fix
  generate_bam_output_paths multi-input parent-dir fallback. (Issue #4)

- Add GitHub Actions CI (x86_64, linux-aarch64, osx-arm64) + tests for
  path generation and content detection (incl. a *.dat input case).

- Update README output-option docs (file vs directory, the
  --removed_alignments_bam suffix) and add CHANGELOG.

Closes #1

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
pkg-config sets HTSLIB_LIBRARIES to the bare "hts" and the directory
in HTSLIB_LIBRARY_DIRS, which is not on the default linker search path
on macOS (Homebrew's /opt/homebrew/lib), causing
"ld: library 'hts' not found". Add the dir via target_link_directories.
Surfaced by the new macos-latest CI job.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ishinder ishinder merged commit aac1d78 into main Jun 7, 2026
4 checks passed
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.

junction output are readin as .bed but not PATH

1 participant