• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

broadinstitute / viral-classify / 20881107329
64%
master: 66%

Build:
Build:
LAST BUILD BRANCH: ca-kb_python
DEFAULT BRANCH: master
Ran 10 Jan 2026 04:37PM UTC
Jobs 1
Files 15
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

10 Jan 2026 04:08PM UTC coverage: 63.506% (+0.4%) from 63.07%
20881107329

push

github

carze
Add KMA k-mer alignment tool integration

Adds KMA (k-mer alignment) tool wrapper following existing patterns from
kraken2 and kb-python for taxonomic classification of reads.

Implementation:
- classify/kma.py: Tool wrapper class inheriting from tools.Tool
  - version(): Parse version from kma -v output
  - build(): Wrapper for kma_index to build reference databases
  - classify(): Main classification method with BAM→FASTQ conversion
  - Handles empty BAM files with early return
  - Single/paired-end detection via file size comparison
  - Proper temp file cleanup in finally blocks

- metagenomics.py: CLI command registration
  - kma: Classify reads using KMA database
  - kma_build: Build KMA database from reference FASTA
  - Input validation for mismatched argument lists
  - Uses split_args=True pattern consistent with other tools

- requirements-conda.txt: Added kma>=1.4.0 dependency

- test/unit/test_tools_kma.py: Comprehensive unit tests
  - test_build_invokes_kma_index_with_expected_arguments
  - test_classify_single_end_from_bam
  - test_classify_paired_end_from_bam
  - test_classify_returns_early_when_bam_is_empty
  - All external dependencies properly mocked

- test/input/TestKMA/ref.fasta: Test input with 3 SARS-CoV sequences

- CLAUDE.md: Updated documentation with KMA commands and module info

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

286 of 499 branches covered (57.31%)

Branch coverage included in aggregate %.

1891 of 2929 relevant lines covered (64.56%)

0.65 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
274
56.21
0.28% opt/viral-ngs/viral-classify/metagenomics.py
Jobs
ID Job ID Ran Files Coverage
1 20881107329.1 10 Jan 2026 04:37PM UTC 15
63.51
GitHub Action Run
Source Files on build 20881107329
  • Tree
  • List 15
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #20881107329
  • 3d237e43 on github
  • Prev Build on ca-kb_python (#20154548975)
  • Next Build on ca-kb_python (#20980379058)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc