Skip to content

Need a clear error message when lemur finds no matches to the database #14

@ppreshant

Description

@ppreshant

I am running tests with a tiny database and found that the error when lemur doesn't find any matches to the fastq file in the database could be clarified.

Relevant line lemur/671

I would add a if(n_reads == 0) ; error('none of the reads match the database') response here.

Currently this is the error I get

Command error:
  2025-08-26 04:32:08 PM INFO:  Starting run of minimap2 at 2025-08-26 16:32:08.851068
  2025-08-26 04:32:08 PM INFO:  Finished running minimap2 in 140.483 ms
  2025-08-26 04:32:09 PM INFO:  Finished loading taxonomy in 15.223 ms
  2025-08-26 04:32:09 PM INFO:  Finished initializing F in 0.139 ms
  2025-08-26 04:32:09 PM INFO:  Finished building alignment model in 0.065 ms
  2025-08-26 04:32:09 PM INFO:  Finished constructing P(r|s) in 18.008 ms
  Traceback (most recent call last):
    File "/home/pbk1/micromamba/other-envs/env-e0dcef690672920a7ce4d792d8222b07/bin/lemur", line 901, in <module>
      main()
    File "/home/pbk1/micromamba/other-envs/env-e0dcef690672920a7ce4d792d8222b07/bin/lemur", line 887, in main
      run.EM_complete()
    File "/home/pbk1/micromamba/other-envs/env-e0dcef690672920a7ce4d792d8222b07/bin/lemur", line 672, in EM_complete
      self.low_abundance_threshold = 1. / n_reads
  ZeroDivisionError: float division by zero

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions