fusor.nomenclature#

Provide helper methods for fusion nomenclature generation.

fusor.nomenclature.gene_nomenclature(element)[source]#

Return fusion nomenclature for gene element.

Parameters:

element (GeneElement) – a gene element object

Return type:

str

Returns:

element nomenclature representation

Raises:

ValueError – if unable to retrieve gene ID

fusor.nomenclature.generate_nomenclature(fusion, sr)[source]#

Generate human-readable nomenclature describing provided fusion

>>> from fusor.nomenclature import generate_nomenclature
>>> from fusor.examples import alk
>>> from biocommons.seqrepo import SeqRepo
>>> generate_nomenclature(alk, SeqRepo("/usr/local/share/seqrepo/latest"))
'v::ALK(hgnc:427)'
Parameters:
  • fusion (CategoricalFusion | AssayedFusion) – a valid assayed or categorial fusion object

  • sr (SeqRepo) – SeqRepo instance. Used for some sequence reference lookups.

Return type:

str

Returns:

string summarizing fusion in human-readable way per VICC fusion curation nomenclature

Raises:

ValueError – if fusion structure contains unrecognized element types. This should be impossible thanks to Pydantic validation.

fusor.nomenclature.reg_element_nomenclature(element, sr)[source]#

Return fusion nomenclature for regulatory element.

Parameters:
  • element (RegulatoryElement) – a regulatory element object

  • sr (SeqRepo) – a SeqRepo instance

Return type:

str

Returns:

regulatory element nomenclature representation

Raises:

ValueError – if unable to retrieve genomic location or coordinates, or if missing element reference ID, genomic location, and associated gene

fusor.nomenclature.templated_seq_nomenclature(element, sr)[source]#

Return fusion nomenclature for templated sequence element.

Parameters:
Return type:

str

Returns:

element nomenclature representation

Raises:

ValueError – if location isn’t a SequenceLocation or if unable to retrieve region or location

fusor.nomenclature.tx_segment_nomenclature(element)[source]#

Return fusion nomenclature for transcript segment element

Parameters:

element (TranscriptSegmentElement) – a tx segment element. Treated as a junction component if only one end is provided.

Return type:

str

Returns:

element nomenclature representation