Skip to main content

Module classify

Module classify 

Source
Expand description

Hit classification — port of src/analyse_alignments.R:108–143.

Inputs:

  • per-reaction reference-FASTA presence (did we have sequences to search?)
  • raw alignment hits for this reaction (possibly many, possibly none)
  • bitscore / identity / coverage / exception-EC cutoffs

Output: a HitStatus plus the best hit (largest bitscore) when present.

Structs§

ClassifyOptions

Functions§

classify_hits
Legacy one-shot classifier preserved for API callers that operate on a slice of (bitscore, pident) pairs. Not used by the runner.
classify_reaction
Classify a single reaction’s hits. Returns (status, is_exception, best_hit_index) — the index points back into hits so the caller can attach the winning hit’s fields to the reaction row.
ec_is_exception
Decide whether an EC belongs in the exception table. Handles both exact-match EC codes and EC/EC-style entries (enzyme/reaction column in dat/exception.tbl).