load_gmt— reads a GMT file (MSigDB / pathway format) into(name, description, genes)records consumed bybioptimus.data.omics.gene_set.GeneSetCollection.from_gmt.read_gene_set_records— reads a long-form(set, gene)table into(name, genes)records consumed bybioptimus.data.omics.gene_set.GeneSetCollection.from_records.load_gene_map— reads a two-column table of gene symbol to Ensembl id into adictsuitable for themappingargument of the gene-set resolution helpers.
load_gmt
<set name>\t<description>\t<gene>\t<gene>.... Blank lines are ignored and surrounding whitespace is trimmed from every field; a leading UTF-8 BOM is stripped. Duplicate genes within a line are left as-is; the GeneSet de-duplicates on construction.
Returns:
A list of (name, description, genes) records, one per line, in file
order.
Raises:
BioptimusValueError- If a line has fewer than three tab-separated fields (no genes), or if the file is missing, unreadable, or not valid UTF-8, taggedBIO-CFG-001.
read_gene_set_records
(set, gene) table into per-set gene records.
Each row assigns one gene to one set, so a set spans multiple rows (the layout of MSigDB-style CSVs and the decoupler “net” format). Rows are grouped by set_col preserving first-seen order, both of the sets and of the genes within each set. Rows with a missing set or gene value are dropped, as are rows whose gene is a placeholder token (for example NA, NULL, or blank) that survives dropna() when the table is read as strings. Gene identifiers are whitespace-stripped.
A path to a CSV/TSV file (separator inferred from the extension,
.tsv -> tab, otherwise comma) or an in-memory pandas.DataFrame.(name, genes) records, one per distinct set, in first-seen
order.
Raises:
BioptimusValueError- If a required column is missing, or if a source file is missing, unreadable, or malformed, taggedBIO-CFG-001.
load_gene_map
.tsv -> tab, otherwise comma). The id_column is matched tolerantly against common spellings (for example "Ensembl ID" or "Ensembl_ID") when the exact name is absent.
When
True (default), a symbol that maps to more than one distinct identifier is dropped with a warning, since keeping a single arbitrary id would silently mis-resolve. When False the last row for a symbol wins (and a warning is still emitted).dict mapping each gene symbol to its identifier.
Raises:
BioptimusValueError- If a required column is missing, or if the file is missing, unreadable, or malformed, taggedBIO-CFG-001.
read_gene_list
.tsv -> tab, otherwise comma), and the column is matched tolerantly against common spellings (for example "Ensembl ID") when the exact name is absent. Lines beginning with # are treated as comments and ignored. Blank and placeholder rows are dropped; duplicates are removed keeping first-seen order.
Returns:
The gene identifiers, de-duplicated in first-seen order.
Raises:
BioptimusValueError- If the gene column is missing, or if the file is missing, unreadable, or malformed, taggedBIO-CFG-001.

