pub struct GeneIndex { /* private fields */ }Expand description
Pre-built index over a gene-name vocabulary for fast marker→row matching.
Resolves a query gene in tiers, returning the first matching row:
0. a locus query (chr:start-end) matches only a locus row, by its
locus key with the chromosome case kept, and stops here: loci never
go through the case-insensitive or fuzzy tiers below,
- exact (case-insensitive) full-name match,
- last
_-segment symbol match (CD8A↔ENSG…_CD8A), - leading Ensembl-id segment match (
ENSG…↔ENSG…_CD8A), - decompose a combined
ENSG…_SYMBOLquery and retry tiers 2–3 per part, - HGNC alias retry ([
alias_candidates]:HIST1H4C↔H4C3,MARCH2↔MARCHF2), - fallback to the general
flexible_name_match(prefix /_x_segment).
Tiers 1–5 are O(1) hash lookups; only the rare fallback scans the
vocabulary. Build once, match many — replaces the O(genes × markers)
.position(flexible_name_match) scan. Tier 1 preferring an exact match
over an earlier-indexed suffix match is the one intended refinement vs a
pure positional scan. Tiers 3–4 make HGNC / ENSG / ENSG_HGNC reconcile
in either direction (gene-set sources mix these conventions), and tier 5
does the same across HGNC releases — the matrix and the marker panel are
routinely built against different ones.
Implementations§
Auto Trait Implementations§
impl Freeze for GeneIndex
impl RefUnwindSafe for GeneIndex
impl Send for GeneIndex
impl Sync for GeneIndex
impl Unpin for GeneIndex
impl UnsafeUnpin for GeneIndex
impl UnwindSafe for GeneIndex
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.