fusor.translator¶
Module for translating output from fusion detection methods to fusion objects (AssayedFusion/CategoricalFusion)
- class fusor.translator.ArribaTranslator(fusor)[source]¶
Initialize ArribaTranslator class
- async translate(arriba, coordinate_type, rb)[source]¶
Parse Arriba output to create AssayedFusion object
- Parameters:
arriba (
Arriba) – Output from Arriba callercoordinate_type (
CoordinateType) – If the coordinate is inter-residue or residuerb (
Assembly) – The reference build used to call the fusion
- Return type:
- Returns:
An AssayedFusion object, if construction is successful
- class fusor.translator.CIVICTranslator(fusor)[source]¶
Initialize CIVICTranslator
- class Direction(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Define CIViC-specific enum for transcript direction
- async translate(civic)[source]¶
Convert CIViC record to Categorical Fusion
:param civic A CIVIC object :rtype:
CategoricalFusion:return A CategoricalFusion object, if construction is successful :raises: ValueError if a transcript accession and exon number is
provided without corresponding genomic breakpoints
- class fusor.translator.CiceroTranslator(fusor)[source]¶
Initialize CiceroTranslator class
- async translate(cicero, coordinate_type, rb)[source]¶
Parse CICERO output to create AssayedFusion object
- Parameters:
cicero (
Cicero) – Output from CICERO callercoordinate_type (
CoordinateType) – If the coordinate is inter-residue or residuerb (
Assembly) – The reference build used to call the fusion
- Return type:
AssayedFusion|str- Returns:
An AssayedFusion object, if construction is successful
- Raises:
RuntimeError – If CICERO annotations indicate the fusion is not valid
- class fusor.translator.EnFusionTranslator(fusor)[source]¶
Initialize EnFusionTranslator class
- async translate(enfusion, coordinate_type, rb)[source]¶
Parse EnFusion output to create AssayedFusion object
- Parameters:
enfusion (
EnFusion) – Output from EnFusion callercoordinate_type (
CoordinateType) – If the coordinate is inter-residue or residuerb (
Assembly) – The reference build used to call the fusion
- Return type:
- Returns:
An AssayedFusion object, if construction is successful
- class fusor.translator.FusionCatcherTranslator(fusor)[source]¶
Initialize FusionCatcherTranslator class
- async translate(fusion_catcher, coordinate_type, rb)[source]¶
Parse FusionCatcher output to create AssayedFusion object
- Parameters:
fusion_catcher (
FusionCatcher) – Output from FusionCatcher callercoordinate_type (
CoordinateType) – If the coordinate is inter-residue or residuerb (
Assembly) – The reference build used to call the fusion
- Return type:
- Returns:
An AssayedFusion object, if construction is successful
- class fusor.translator.GeneFusionPartners(**data)[source]¶
Class for defining gene fusion partners
-
gene_3prime_element:
GeneElement|UnknownGeneElement|MultiplePossibleGenesElement[source]¶
-
gene_5prime_element:
GeneElement|UnknownGeneElement|MultiplePossibleGenesElement[source]¶
-
gene_3prime_element:
- class fusor.translator.GenieTranslator(fusor)[source]¶
Initialize GenieTranslator class
- async translate(genie, coordinate_type, rb)[source]¶
Parse GENIE output to create AssayedFusion object
- Parameters:
genie (
Genie) – Output from GENIE datasetcoordinate_type (
CoordinateType) – If the coordinate is inter-residue or residuerb (
Assembly) – The reference build used to call the fusion
- Return type:
- Returns:
An AssayedFusion object, if construction is successful
- class fusor.translator.JAFFATranslator(fusor)[source]¶
Initialize JAFFATranslator class
- async translate(jaffa, coordinate_type, rb)[source]¶
Parse JAFFA fusion output to create AssayedFusion object
- Parameters:
JAFFA – Output from JAFFA caller
coordinate_type (
CoordinateType) – If the coordinate is inter-residue or residuerb (
Assembly) – The reference build used to call the fusion
- Return type:
Optional[AssayedFusion]- Returns:
An AssayedFusion object, if construction is successful
- class fusor.translator.MOATranslator(fusor)[source]¶
Initialize MOATranslator
- translate(moa_assertion)[source]¶
Convert a MOA assertion to a CategoricalFusion object
- Parameters:
moa_assertion (
dict) – A dictionary representing a MOA assertion. To note, MOA fusions do not report genomic breakpoints. Currently, we only support fusions where both partners are listed, as we cannot definitively determine for cases where one gene symbol is provided if it describes the 5’ or 3’ partner.- Return type:
- Returns:
A CategoricalFusion object
- class fusor.translator.STARFusionTranslator(fusor)[source]¶
Initialize STARFusionTranslator class
- async translate(star_fusion, coordinate_type, rb)[source]¶
Parse STAR-Fusion output to create AssayedFusion object
- Parameters:
star_fusion (
STARFusion) – Output from STAR-Fusion callercoordinate_type (
CoordinateType) – If the coordinate is inter-residue or residuerb (
Assembly) – The reference build used to call the fusion
- Return type:
- Returns:
An AssayedFusion object, if construction is successful
- class fusor.translator.Translator(fusor)[source]¶
Class for translating outputs from different fusion detection algorithms to FUSOR AssayedFusion and CategoricalFusion objects
- abstract async translate(fusion_data, coordinate_type, rb)[source]¶
Define abstract translate method
- Parameters:
fusion_data (
BaseModel) – The fusion data from a fusion callercoordinate_type (
CoordinateType) – If the coordinate is inter-residue or residuerb (
Assembly) – The reference build used to call the fusion
- Return type:
AssayedFusion|CategoricalFusion|InternalTandemDuplication- Returns:
An AssayedFusion or CategoricalFusion object, if construction is successful