Search Manager v1.0.60¶
Transcript / gene search facade. A thin wrapper around ReferenceManager.searchTranscripts, giving external consumers a more prominent entry point without having to dig into reference internals.
Accessed via instance property (not a top-level export)
SearchManager is not exported from the @rbrowser/main top level. Use the renderer instance property only:
Input: free text, matched simultaneously against transcript_id / transcript_name / gene_id / gene_name.
Output: each hit is an ITrans—the same shape used by the toolbar autocomplete, so it can be wired straight into a custom UI.
Underlying resource priority (same as ReferenceManager.searchTranscripts):
reference.transcriptome.apiREST endpoint (if configured)- The SQLite catalog at
reference.transcriptome.annotation.transcripts(queried directly over HTTP Range viasql.js-httpvfs) - Neither configured → returns
[]
Method¶
search¶
method
Flat result list. limit defaults to 20. Queries shorter than 2 characters / network errors / no search source all return [].
const list = await renderer.searchManager.search("vamp3");
// → [
// { trans_id: "ENST00000054666", trans_name: "VAMP3-201",
// trans_type: "protein_coding", level: "transcript" },
// { trans_id: "ENST00000470357", trans_name: "VAMP3-202",
// trans_type: "protein_coding", level: "transcript" },
// { trans_id: "ENST00000487194", trans_name: "VAMP3-203",
// trans_type: "retained_intron", level: "transcript" },
// ]
searchGrouped¶
method
The same hit set, but grouped by trans_type—this is the shape the toolbar autocomplete dropdown uses (PROTEIN CODING / RETAINED INTRON each forming a section). Original order is preserved within each group; biotypes are kept in first-appearance order.
const groups = await renderer.searchManager.searchGrouped("vamp3");
// → [
// { type: "protein_coding", items: [VAMP3-201, VAMP3-202] },
// { type: "retained_intron", items: [VAMP3-203] },
// ]
searchByLevel¶
method
Restricted to a single level. "transcript" returns only isoform rows, "gene" returns only gene-level alias rows. Commonly used for "if you want to navigate, never accept a bare gene" shortcut entry points.
// Only accept a concrete transcript, no gene
const tx = await renderer.searchManager.searchByLevel("vamp3", "transcript");
Types¶
The ITrans definition lives in Reference Manager (shared by search and autocomplete). This page only covers the additional grouped result type.
ITransGroup¶
type
The grouped item returned by searchGrouped(). The autocomplete dropdown renders each type as a section (e.g. "PROTEIN CODING", "RETAINED INTRON"), followed by its items.
interface ITransGroup {
/** The biotype label shared by this group (e.g. `"protein_coding"`). */
type: string;
/** This group's subset of suggestions, preserving input order. */
items: ITrans[];
}