Skip to content

Implement unclassified reads extraction in sequana_taxonomy - #146

Merged
cokelaer merged 3 commits into
sequana:mainfrom
cokelaer:main
Jun 1, 2026
Merged

Implement unclassified reads extraction in sequana_taxonomy#146
cokelaer merged 3 commits into
sequana:mainfrom
cokelaer:main

Conversation

@cokelaer

Copy link
Copy Markdown
Contributor

Summary

  • Extract unclassified reads from Kraken output instead of creating empty placeholder file
  • Support both paired-end and single-end input sequences
  • Properly cleanup temporary files after merging paired reads

Changes

  • Updated test Snakefile to expect unclassified output in correct kraken/ subdirectory
  • Implemented proper seqkit grep extraction pipeline for unclassified reads
  • Handle paired-end by extracting both R1 and R2 reads then concatenating
  • Handle single-end by direct extraction to output file
  • Cleanup temporary unclassified ID list and intermediate files

Test Plan

  • Run test in sequana_wrappers/shells/sequana_taxonomy/run/test/
  • Verify unclassified reads extracted correctly for paired-end input
  • Verify unclassified reads extracted correctly for single-end input
  • Verify output file at correct path kraken/unclassified.fastq

Generated with Claude Code

@codacy-production

codacy-production Bot commented May 24, 2026

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 2 medium · 1 minor

Alerts:
⚠ 3 issues (≤ 0 issues of at least minor severity)

Results:
3 new issues

Category Results
Security 2 medium
1 minor

View in Codacy

🟢 Metrics 14 complexity · 0 duplication

Metric Results
Complexity 14
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Extract unclassified reads from kraken output instead of creating empty file.
Handles both paired-end and single-end input. Cleanup temp files after merging.
cokelaer added 2 commits June 1, 2026 15:52
Extract unclassified reads in the sequana_taxonomy/run v1 shell (single- and
paired-end, single- and multi-database) and add a standalone sequana_wrappers
CLI exposing --version and --stats, wired up via the project scripts.
Stage the NCBI taxonomy DB once into <workdir>/.config/sequana and make every
taxonomy rule depend on it, so 4 parallel jobs (-c4) no longer race and corrupt
the download (zlib.error: Error -3). Pin XDG_CONFIG_HOME/HOME to the workdir via
shell.prefix so the download rule and the frozen get_shell CMD resolve the same
config dir (GitHub runners set XDG_CONFIG_HOME=/home/runner/.config, which wins
over HOME). Keep rule all as the default target so a run without a host cache
does not stop after only downloading the DB. Add paired/2-db fixtures
(test_R2_.fastq.gz, toydb2) and adjust the CI workflow accordingly.
@cokelaer
cokelaer merged commit 05c7f5d into sequana:main Jun 1, 2026
3 of 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.

1 participant