Skip to content

ENH: add filter-reads-kraken2 action#340

Merged
misialq merged 18 commits into
bokulich-lab:mainfrom
misialq:kraken-taxonomy-filter-reads
Jun 9, 2026
Merged

ENH: add filter-reads-kraken2 action#340
misialq merged 18 commits into
bokulich-lab:mainfrom
misialq:kraken-taxonomy-filter-reads

Conversation

@misialq

@misialq misialq commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Description

This PR introduces a new action filter-reads-kraken2 that allows filtering a set of reads using their corresponding Kraken2 classifications.

  • Taxonomy can be provided either as a literal (e.g., "Bacteria") or as an ID integer (e.g., "2").
  • It is possible to filter only the indicated taxonomy or also include all of its descendants (default).
  • It is possible to toggle what is being retained and discarded (by default the reads of indicated taxonomies will be retained).

AI Disclosure

  • NO AI USED.
  • AI USED.

AI Usage Details

Codex was used during early stage implmentation. All the code was reviewed and tested before PR submission.

@codecov

codecov Bot commented Apr 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.29609% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.52%. Comparing base (1b6627a) to head (a2209ae).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
q2_annotate/kraken2/filter_reads.py 93.10% 6 Missing and 6 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #340      +/-   ##
==========================================
- Coverage   94.60%   94.52%   -0.09%     
==========================================
  Files          35       36       +1     
  Lines        2669     2848     +179     
  Branches      397      434      +37     
==========================================
+ Hits         2525     2692     +167     
- Misses         72       78       +6     
- Partials       72       78       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@misialq misialq marked this pull request as ready for review June 3, 2026 10:41
@misialq misialq requested a review from VinzentRisch June 3, 2026 10:41
@misialq misialq changed the title ENH: add filter-kraken2-reads action ENH: add filter-reads-kraken2 action Jun 3, 2026
@VinzentRisch

Copy link
Copy Markdown
Member

I will review this on monday, if that is okay. I want to finish something today.

@VinzentRisch VinzentRisch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hey Michal
I ran the code with the data from the mock tutorial and with a couple of querys.
It all looks good but I have two comments below:

Comment thread q2_annotate/kraken2/filter_reads.py Outdated
Comment thread q2_annotate/kraken2/filter_reads.py
@misialq misialq requested a review from VinzentRisch June 9, 2026 15:23

@VinzentRisch VinzentRisch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes looks good!

@misialq misialq merged commit 112e9e0 into bokulich-lab:main Jun 9, 2026
10 of 12 checks passed
@misialq misialq deleted the kraken-taxonomy-filter-reads branch June 9, 2026 15:48
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.

2 participants