Skip to main content

Module libdetect

Module libdetect 

Source
Expand description

Automatic library-type detection.

Port of salmon’s LibraryTypeDetector (include/.../model/LibraryTypeDetector.hpp). During the first reads of a run, the observed LibraryFormat of each confidently mapped fragment is tallied; once enough samples are seen, the most likely orientation and strandedness are inferred from the count ratios using salmon’s 30%/70% thresholds.

Structs§

LibraryTypeDetector
Accumulates observed library formats and infers the most likely type.

Constants§

DEFAULT_SAMPLES_NEEDED
Default number of samples to collect before guessing (matches salmon).

Functions§

infer_format_from_counts
Pure inference of the most likely library format from per-format counts (indexed by LibraryFormat::format_id), applying salmon’s orientation and strandedness thresholds. Order-independent — used both by the prefix-sampling LibraryTypeDetector and by RAD auto-detection, which tallies all unique fragments rather than a thread-order-dependent prefix. Falls back to inward/unstranded when there are no usable samples.