Annotators¶
Driven adapters that enrich VariantAnnotation objects with knowledge from
external reference databases. Each annotator takes a list of variants, looks up
matching records, and returns a new list with the relevant fields populated.
Variants not found in the source are returned unchanged.
Overview¶
How annotators work¶
Every annotator implements annotate(items) → list[VariantAnnotation]. Because
domain objects are immutable, each enrichment step produces a new VariantAnnotation
via attrs.evolve() — the input list is never modified in place.
The typical pipeline chains multiple annotators sequentially via
VariantExtractionPipeline:
from iris.adapters.driven.pipeline import VariantExtractionPipeline
from iris.adapters.driven.stores.zarr import ZarrVariantStore
from iris.adapters.driven.annotators.vep_flight import VepFlightAnnotator
from iris.adapters.driven.annotators.dbnsfp import DbNsfpAnnotator
from iris.adapters.driven.annotators.clinvar import ClinvarAnnotator
with ZarrVariantStore(path=ZARR_PATH) as store:
pipeline = VariantExtractionPipeline(
store=store,
annotators=(
VepFlightAnnotator(location="grpc://vep-node:8815", profile="epi_default"),
DbNsfpAnnotator(data_dir=DBNSFP_DIR, workers=8),
ClinvarAnnotator(path=CLINVAR_TSV),
),
workers=8,
)
variants = pipeline.run(regions=regions)
TabixVariantAnnotator — shared base¶
Most annotators extend TabixVariantAnnotator, which combines TabixReader I/O
with the VariantAnnotator port. The core helper _annotate_rows() encapsulates
the full pipeline:
- Collect
(chrom, pos, ref, alt)keys from the input variants. - Batch-query the tabix file for those keys.
- For each matching row, call
enrich_fn(variant, row)to produce the enriched variant.
columns restricts which fields are loaded to avoid saturating RAM with wide files
(critical for dbNSFP, which has 200+ columns).
workers enables chromosome-partitioned parallel fetching via ThreadPoolExecutor;
each worker opens its own TabixFile.
Annotator catalog¶
| Annotator | Module | What it adds |
|---|---|---|
TabixVariantAnnotator |
tabix |
Base class; not used directly |
VcfVariantAnnotator |
vcf |
Base class for VCF/BCF-backed annotators |
VepFlightAnnotator |
vep_flight |
Genes, TranscriptVariant (HGVS, SO terms), LOEUF/pLI, SpliceAI, LoF (LOFTEE HC/LC) via live Arrow Flight service |
GencodeVariantAnnotator |
gencode |
Genes and TranscriptVariant stubs from a local GENCODE GTF; no HGVS or scores |
DbNsfpAnnotator |
dbnsfp |
Multiple VariantScore (AlphaMissense, REVEL, CADD, PolyPhen2, SIFT, BayesDel, MetaRNN, ESM1b, PrimateAI, ClinPred, …) + AlleleFrequency per gnomAD 4.1/TOPMed/ALFA population |
CaddAnnotator |
cadd |
VariantScore: RawScore, PHRED |
McpsAnnotator |
mcps |
AlleleFrequency for each MCPS population (AC, AN, AF) |
ClinvarAnnotator |
clinvar |
ClinicalClassification (significance + review status) |
VepTsvAnnotator |
vep |
Configurable VariantScore set via ScoreSpec from a pre-computed VEP TSV |
HgncNomenclatureResolver |
annotators.hgnc |
GeneNomenclature with symbol, aliases, and cross-DB IDs (HGNC, Ensembl, RefSeq, Entrez) from a local HGNC JSON dump |
TOML mapping tables¶
Each tabix-backed annotator ships a .toml file alongside its source that maps
raw database strings to domain enum values (e.g. dbnsfp.toml maps AlphaMissense
prediction letters "B", "A", "LP" to ScorePredictionRank). The
[columns] section drives column filtering so only the needed subset of a wide
file is loaded into memory.
Memory efficiency¶
Gene and Transcript objects are frozen (attrs frozen=True) and safe to
share. VepFlightAnnotator maintains a per-call cache keyed by Ensembl ID so
that a single Gene and Transcript object is reused across every variant that
maps to the same gene or transcript, instead of allocating one object per variant.
DbNsfpAnnotator loads only the columns listed in dbnsfp.toml [columns] (≈ 48
of 200+ dbNSFP columns) and supports parallel per-chromosome loading via the
workers field.
VepFlightAnnotator¶
The only non-tabix, non-file annotator. Calls a running vep-arrowd Rust service
over Arrow Flight (gRPC). Requires vep_arrow_client to be installed:
Key parameters:
| Parameter | Default | Description |
|---|---|---|
location |
— | gRPC server address, e.g. "grpc://10.42.42.5:8815" |
profile |
"epi_default" |
VEP plugin profile configured on the server |
transcript_mode |
"all" |
"picked" keeps only VEP's --pick transcript per variant |
batch_size |
10_000 |
Variants per Arrow Flight batch |
timeout_seconds |
3600 |
Per-call gRPC timeout |
Scores produced for the epi_default profile:
| Score name | Type | Threshold |
|---|---|---|
LOEUF |
CONSTRAINT |
VERY_HIGH if ≤ 0.35 |
pLI |
CONSTRAINT |
VERY_HIGH if ≥ 0.9 |
SpliceAI_DS_{AG,AL,DG,DL} |
SPLICING |
VERY_HIGH if ≥ 0.5 |
LoF |
PATHOGENICITY |
VERY_HIGH (HC) / HIGH (LC) from LOFTEE |
GencodeVariantAnnotator¶
Gene and transcript annotation from a local GENCODE GTF, loaded via
GencodeGeneRepository. Returns TranscriptVariant stubs (no HGVS, no
pathogenicity scores). Useful when the VEP Flight service is unavailable or as a
lightweight gene-assignment step. Resolves the GENCODE GTF path via
DataRegistry.resolve_path("gencode"), configurable through the
IRIS_GENCODE_GTF environment variable.
HgncNomenclatureResolver¶
Implements the GeneNomenclatureResolver port using the HGNC complete-set JSON
dump (hgnc_complete_set.json), downloadable from
genenames.org.
Builds six in-memory indices on first use (lazy load): approved symbol, alias/prev-symbol, HGNC ID, Ensembl gene ID, Entrez ID, and RefSeq accession. All subsequent lookups are O(1).
from iris.adapters.driven.annotators.hgnc import HgncNomenclatureResolver
# From the registry (reads [sources.hgnc] in ~/.iris/config.toml)
resolver = HgncNomenclatureResolver.from_registry()
# Or with an explicit path
resolver = HgncNomenclatureResolver(path="/data/hgnc/hgnc_complete_set.json")
resolver.resolve_symbol("MLL").symbol # → "KMT2A" (prev_symbol lookup)
resolver.resolve_symbol("RNF53").symbol # → "BRCA1" (alias_symbol lookup)
resolver.canonical_symbol("MLL") # → "KMT2A" (fast string-only helper)
resolver.resolve_hgnc_id("HGNC:1100").symbol # → "BRCA1"
resolver.resolve_ensembl_id("ENSG00000012048").symbol # → "BRCA1"
Register the file path in ~/.iris/config.toml:
The canonical_symbol(name) convenience method is used by the
recgenes_vep_flight_pipeline to remap alias/previous gene symbols from a
clinical gene list to the approved HGNC symbol before querying GENCODE.
Tabix base¶
iris.adapters.driven.annotators.tabix
¶
TabixVariantAnnotator base class combining tabix I/O with the VariantAnnotator port.
TabixVariantAnnotator
¶
Bases: TabixReader, VariantAnnotator
Base for variant annotators that query bgzipped, tabix-indexed files via pysam.
Subclasses implement annotate() using self._annotate_rows() as the
main pipeline, or call self._query() / self._query_region() directly
for custom traversal patterns.
annotate
abstractmethod
¶
Return new VariantAnnotation objects enriched with this source's data.
VCF base¶
iris.adapters.driven.annotators.vcf
¶
VcfVariantAnnotator base class combining VCF I/O with the VariantAnnotator port.
VcfVariantAnnotator
¶
Bases: VcfReader, VariantAnnotator
Base for variant annotators that query bgzipped, indexed VCF/BCF files via pysam.
Subclasses implement annotate() using self._annotate_records() as the
main pipeline. Requires a TBI or CSI index alongside the VCF/BCF file.
annotate
abstractmethod
¶
Return new VariantAnnotation objects enriched with this source's data.
read
¶
Read a VCF/BCF file and return a list of VariantAnnotation objects.
Source code in src/iris/adapters/driven/readers/vcf.py
VEP Flight¶
iris.adapters.driven.annotators.vep_flight
¶
Annotator that calls an external VEP-via-Arrow-Flight service (vep_arrow_client).
Unlike VepTsvAnnotator (tabix lookups against a pre-computed file), this adapter calls a live VEP service over Arrow Flight for variants not yet annotated. It is a thin translation layer: vep_arrow_client.VepFlightAnnotator already handles the Flight protocol, batching, and Arrow conversion — this adapter's only job is mapping between VariantAnnotation and the RecordBatch rows the service returns.
VepFlightAnnotator
¶
VepFlightAnnotator(
location,
*,
profile="epi_default",
transcript_mode="all",
batch_size=10000,
timeout_seconds=3600,
gene_cache=None,
)
Bases: VariantAnnotator
Annotates VariantAnnotation objects via an external VEP Arrow Flight service.
Wraps vep_arrow_client.VepFlightAnnotator (the external SDK — note the name collision is intentional, this class is the iris-lib adapter, the SDK class is the underlying client). Translates between VariantAnnotation/Variant and the SimpleVariant/RecordBatch contract of the external service.
| PARAMETER | DESCRIPTION |
|---|---|
location
|
Flight server address, e.g. 'grpc://vep-node.internal:8815'.
TYPE:
|
profile
|
VEP plugin profile name configured on the server (e.g. 'epi_default', 'clinical', 'epi_core', 'epi_gwas').
TYPE:
|
transcript_mode
|
'all' to keep every overlapping transcript consequence, or 'picked' to keep only VEP's --pick selection.
TYPE:
|
batch_size
|
Number of variants per Flight batch sent to the server.
TYPE:
|
timeout_seconds
|
Per-call timeout passed to the underlying client.
TYPE:
|
Example:
annotator = VepFlightAnnotator(
location="grpc://vep-node.internal:8815",
profile="epi_default",
)
annotated = annotator.annotate(variants)
Initialize the annotator.
| PARAMETER | DESCRIPTION |
|---|---|
location
|
Flight server address.
TYPE:
|
profile
|
VEP plugin profile name.
TYPE:
|
transcript_mode
|
'all' or 'picked'.
TYPE:
|
batch_size
|
Variants per Flight batch.
TYPE:
|
timeout_seconds
|
Per-call timeout.
TYPE:
|
gene_cache
|
Optional pre-built mapping of gene identifier (versioned/unversioned Ensembl ID, or gene symbol) to canonical Gene objects — typically built from GencodeGeneRepository before running the pipeline. VEP rows matching a key here reuse that exact Gene instance instead of constructing a new one from VEP's bare gene_id/symbol fields, keeping gene identity consistent across the whole pipeline. Persists and grows for the lifetime of this annotator instance across multiple annotate() calls.
TYPE:
|
Source code in src/iris/adapters/driven/annotators/vep_flight.py
ready
¶
annotate
¶
Return new VariantAnnotation objects enriched with VEP consequences and scores.
Variants without a complete (chrom, pos, ref, alt) key (i.e. Variant.as_key() returns None) are passed through unchanged — the service has nothing to annotate them with.
Source code in src/iris/adapters/driven/annotators/vep_flight.py
GENCODE¶
iris.adapters.driven.annotators.gencode
¶
GencodeVariantAnnotator — gene and transcript annotation from a GENCODE repository.
GencodeVariantAnnotator
¶
Bases: VariantAnnotator
Annotate VariantAnnotation objects with genes and transcripts from GENCODE.
Builds a per-chromosome interval index from the repository on the first
:meth:annotate call. Subsequent calls reuse the cached index.
For each variant the annotator:
- Replaces
va.geneswith the full :class:~iris.domain.genomics.entities.Geneobjects from GENCODE (including Ensembl ID, HGNC ID, strand, and position). - When annotate_transcripts is
True, prepends :class:~iris.domain.genomics.entities.TranscriptVariantstubs for every transcript that overlaps the variant position. Positional fields (exon, intron, cdna_pos, cds_pos) are derived from the GENCODE structure; sequence-dependent fields are left for downstream annotators. - When primary_only is
True, keeps only the single preferred transcript (MANE Select > Ensembl canonical > first) and records the total transcript count inva.metadataunder"n_transcripts".
Variants whose position is unknown or that fall outside all annotated genes are passed through unchanged.
Example
| ATTRIBUTE | DESCRIPTION |
|---|---|
repository |
A loaded (or lazily-loaded)
:class:
TYPE:
|
annotate_transcripts |
When
TYPE:
|
primary_only |
When
TYPE:
|
annotate
¶
Return variants enriched with GENCODE gene and transcript information.
| PARAMETER | DESCRIPTION |
|---|---|
items
|
Variants to annotate.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[VariantAnnotation]
|
New list of :class: |
list[VariantAnnotation]
|
objects. Variants outside any annotated gene region are passed |
list[VariantAnnotation]
|
through unchanged. |
Source code in src/iris/adapters/driven/annotators/gencode.py
DbNSFP¶
iris.adapters.driven.annotators.dbnsfp
¶
dbNSFP in-silico scores and population frequency annotator via tabix.
DbNsfpAnnotator
¶
Bases: TabixVariantAnnotator
Annotates variants with in-silico scores and population data from dbNSFP via tabix.
AlphaMissense, REVEL, CADD, PolyPhen2-HDIV, SIFT, BayesDel (addAF/noAF),
GERP++RS, MetaRNN.
Extended scores: ESM1b, MutScore, PHACTboost, gMVP, MPC, PrimateAI, SIFT4G, VEST4, ClinPred, GERP91, phyloP/phastCons (100way/470way/17way-primate), bStatistic. Metadata: ClinVar (id/clnsig/review), gnomAD4.1 (joint + 5 populations), TOPMed, ALFA, Interpro domain.
Expects bgzipped, tabix-indexed per-chromosome files under data_dir matching
file_pattern ({chrom} substituted with the bare chromosome, e.g. "1").
For multi-transcript rows, the most damaging value is kept per score.
from_registry
classmethod
¶
Build a DbNsfpAnnotator resolving source from the iris DataRegistry.
Source code in src/iris/adapters/driven/annotators/dbnsfp.py
annotate
¶
Annotate variants with dbNSFP in-silico scores and allele frequencies.
Source code in src/iris/adapters/driven/annotators/dbnsfp.py
CADD¶
iris.adapters.driven.annotators.cadd
¶
CADD RawScore and PHRED annotator via tabix random-access.
CaddAnnotator
¶
Bases: TabixVariantAnnotator
Annotates variants with CADD RawScore and PHRED via tabix random-access.
Requires the CADD TSV to be bgzipped and tabix-indexed (.tbi alongside it).
from_registry
classmethod
¶
Build a CaddAnnotator resolving source from the iris DataRegistry.
Source code in src/iris/adapters/driven/annotators/cadd.py
annotate
¶
Annotate variants with CADD RawScore and PHRED scores.
Source code in src/iris/adapters/driven/annotators/cadd.py
MCPS¶
iris.adapters.driven.annotators.mcps
¶
MCPS allele frequency annotator via tabix random-access.
McpsAFAnnotator
¶
Bases: TabixVariantAnnotator
Annotates variants with MCPS allele frequencies (global + AFR/EUR/MEX ancestries).
Expects bgzipped, tabix-indexed per-chromosome files named
chr{N}.freq.cpra.tsv.bgz under freq_dir.
Column layout is defined in mcps.toml and matches the file header::
#CHROM START END REF ALT ID CPRA SOURCE STON GHOM AHOM
AN_RAW AC_RAW AF_RAW AN_AFR AC_AFR AF_AFR
AN_EUR AC_EUR AF_EUR AN_MEX AC_MEX AF_MEX
from_registry
classmethod
¶
Build a McpsAFAnnotator resolving source_name from the iris DataRegistry.
Source code in src/iris/adapters/driven/annotators/mcps.py
annotate
¶
Annotate variants with MCPS allele frequencies.
workers controls how many per-chromosome files are queried in
parallel. Each worker opens its own TabixFile; the default of 1
preserves sequential behaviour.
Source code in src/iris/adapters/driven/annotators/mcps.py
query_region
¶
Return all MCPS variants whose positions overlap the given regions.
Each row in the per-chromosome frequency file becomes a fresh
VariantAnnotation containing the parsed allele frequencies.
workers controls how many chromosome files are scanned in parallel.
Files that do not exist on disk are silently skipped.
Source code in src/iris/adapters/driven/annotators/mcps.py
ClinVar¶
iris.adapters.driven.annotators.clinvar
¶
ClinVar variant classifier via a bgzipped, tabix-indexed TSV.
ClinvarAnnotator
¶
Bases: TabixVariantAnnotator
Annotates variants with ClinVar classifications from a bgzipped, tabix-indexed TSV.
Expects the flat TSV produced from the ClinVar VCF (one row per variant): #CHROM POS REF ALT ALLELEID CLNSIG CLNREVSTAT AF_ESP AF_EXAC AF_TGP …
Frequency column → population label mapping is configured in clinvar.toml
under [frequencies]. Classification and review-status maps live in the
same file under [clinvar_significance] and [clinvar_review_status].
from_registry
classmethod
¶
Build a ClinvarAnnotator resolving source from the iris DataRegistry.
Source code in src/iris/adapters/driven/annotators/clinvar.py
annotate
¶
Annotate variants with ClinVar classifications and allele frequencies.
Source code in src/iris/adapters/driven/annotators/clinvar.py
VEP TSV¶
iris.adapters.driven.annotators.vep
¶
VEP TSV variant annotator via tabix.
VepTsvAnnotator
¶
Bases: TabixVariantAnnotator
Annotates variants with scores from a bgzipped, tabix-indexed VEP TSV.
The file is expected to have a header line (leading # is stripped
automatically) with Uploaded_variation encoded as chrom:pos:ref:alt.
Which scores to extract is controlled by score_specs. By default the
specs defined in vep.toml are used; pass a custom tuple to override.
Columns not present in the file are silently ignored.
Example — annotate with only CADD and LoF:
from iris.adapters.driven.annotators._specs import ScoreSpec
from iris.domain.genomics.objects import VariantScoreType, ScorePredictionRank
annotator = VepTsvAnnotator(
path="/data/vep.tsv.gz",
score_specs=(
ScoreSpec(column="CADD_PHRED", name="cadd_phred", type=VariantScoreType.PATHOGENICITY),
ScoreSpec(
column="LoF",
name="lof",
type=VariantScoreType.PATHOGENICITY,
prediction_map={"HC": ScorePredictionRank.VERY_HIGH, "LC": ScorePredictionRank.HIGH},
),
),
)
annotate
¶
Annotate variants with VEP scores.
Source code in src/iris/adapters/driven/annotators/vep.py
HGNC¶
iris.adapters.driven.annotators.hgnc
¶
HGNC JSON dump adapter for the GeneNomenclatureResolver port.
Reads the HGNC complete set JSON (downloadable from genenames.org) and builds in-memory indices for fast symbol, alias, Ensembl, HGNC-ID, Entrez, and RefSeq lookups. The JSON is loaded lazily on first use.
Download the JSON from
https://www.genenames.org/download/statistics-and-files/ → "Complete HGNC approved gene symbol report" → JSON format
Then register it in ~/.iris/config.toml: [sources.hgnc] host = "local" path = "hgnc/hgnc_complete_set.json"
HgncNomenclatureResolver
¶
Bases: GeneNomenclatureResolver
GeneNomenclatureResolver backed by the HGNC complete-set JSON dump.
Accepts a path to hgnc_complete_set.json (downloadable from
genenames.org). Builds in-memory indices (symbol, alias/prev-symbol,
HGNC ID, Ensembl ID, Entrez ID, RefSeq accession) on first use;
subsequent lookups are O(1).
Example
from_registry
classmethod
¶
Instantiate from the iris DataRegistry (reads ~/.iris/config.toml).
| PARAMETER | DESCRIPTION |
|---|---|
source
|
Registry source name (default:
TYPE:
|
registry
|
Optional pre-built DataRegistry; uses the default if None.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
'HgncNomenclatureResolver'
|
HgncNomenclatureResolver pointed at the configured JSON file. |
Source code in src/iris/adapters/driven/annotators/hgnc.py
resolve_symbol
¶
Resolve a gene symbol, checking approved symbols then aliases/prev-symbols.
| PARAMETER | DESCRIPTION |
|---|---|
symbol
|
Gene symbol to resolve (e.g. 'BRCA1', 'MLL').
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
GeneNomenclature | None
|
Canonical GeneNomenclature if found, None otherwise. |
Source code in src/iris/adapters/driven/annotators/hgnc.py
resolve_hgnc_id
¶
Resolve by HGNC ID (e.g. 'HGNC:1100' or '1100').
| PARAMETER | DESCRIPTION |
|---|---|
hgnc_id
|
HGNC identifier string.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
GeneNomenclature | None
|
GeneNomenclature if found, None otherwise. |
Source code in src/iris/adapters/driven/annotators/hgnc.py
resolve_ensembl_id
¶
Resolve by Ensembl gene ID (e.g. 'ENSG00000012048').
| PARAMETER | DESCRIPTION |
|---|---|
ensembl_id
|
Ensembl gene identifier.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
GeneNomenclature | None
|
GeneNomenclature if found, None otherwise. |
Source code in src/iris/adapters/driven/annotators/hgnc.py
resolve_refseq_id
¶
Resolve by RefSeq accession (e.g. 'NM_007294').
| PARAMETER | DESCRIPTION |
|---|---|
refseq_id
|
RefSeq accession string.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
GeneNomenclature | None
|
GeneNomenclature if found, None otherwise. |
Source code in src/iris/adapters/driven/annotators/hgnc.py
resolve_entrez_id
¶
Resolve by NCBI Entrez gene ID.
| PARAMETER | DESCRIPTION |
|---|---|
entrez_id
|
NCBI Entrez gene identifier.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
GeneNomenclature | None
|
GeneNomenclature if found, None otherwise. |
Source code in src/iris/adapters/driven/annotators/hgnc.py
search_by_name
¶
Search genes by full or partial name (case-insensitive substring match).
| PARAMETER | DESCRIPTION |
|---|---|
name
|
Full or partial gene name.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[GeneNomenclature]
|
List of matching GeneNomenclature objects, possibly empty. |
Source code in src/iris/adapters/driven/annotators/hgnc.py
aliases
¶
Return all known alias and previous symbols for a gene.
| PARAMETER | DESCRIPTION |
|---|---|
symbol
|
Approved gene symbol.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[str]
|
List of alias and previous symbols. Empty if gene not found. |
Source code in src/iris/adapters/driven/annotators/hgnc.py
gene_family
¶
Return gene family names associated with a gene symbol.
| PARAMETER | DESCRIPTION |
|---|---|
symbol
|
Approved gene symbol.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[str]
|
List of gene family names. |
Source code in src/iris/adapters/driven/annotators/hgnc.py
orthologs
¶
Return orthology data for a gene.
The HGNC JSON does not include orthology predictions; this always returns an empty list. Use a dedicated orthology source if needed.
| PARAMETER | DESCRIPTION |
|---|---|
symbol
|
Approved gene symbol.
TYPE:
|
species
|
Ignored (no orthology data in the HGNC JSON dump).
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[dict[str, str]]
|
Always an empty list. |
Source code in src/iris/adapters/driven/annotators/hgnc.py
resolve_many
¶
Resolve multiple gene symbols in a single pass.
Loads the index once, then performs O(1) lookups per symbol.
| PARAMETER | DESCRIPTION |
|---|---|
symbols
|
Sequence of gene symbols to resolve.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict[str, GeneNomenclature | None]
|
Dict mapping each input symbol to its GeneNomenclature or None. |
Source code in src/iris/adapters/driven/annotators/hgnc.py
canonical_symbol
¶
Return the HGNC-approved symbol for a name (alias, prev, or approved).
Convenience method for the pipeline: given any gene name, return the approved symbol that GENCODE is likely to use, or None if not found.
| PARAMETER | DESCRIPTION |
|---|---|
name
|
Any gene name or alias.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
str | None
|
Approved HGNC symbol if found, None otherwise. |