fusor.tools#

Provide miscellaneous tools for fusion modeling.

class fusor.tools.FusorDataResourceStatus(cool_seq_tool, gene_normalizer)[source]#
cool_seq_tool[source]#

Alias for field number 0

gene_normalizer[source]#

Alias for field number 1

async fusor.tools.check_data_resources(gene_database=None, cool_seq_tool=None)[source]#

Perform basic status checks on known data requirements.

Mirroring the input structure of the fusor.fusor.FUSOR class, existing instances of the Gene Normalizer database and Cool-Seq-Tool can be passed as arguments. Otherwise, resource construction is attempted in the same manner as it would be with the FUSOR class, relying on environment variables and defaults.

>>> from fusor.tools import check_data_resources
>>> status = await check_data_resources()
>>> assert all(status)  # passes if all resources can be acquired successfully

The return object is a broad description of resource availability, grouped by library. For a more granular description to support debugging, all failures are logged as logging.ERROR by respective upstream libraries.

Parameters:
  • gene_database (Optional[AbstractDatabase]) – gene normalizer DB instance

  • cool_seq_tool (Optional[CoolSeqTool]) – Cool-Seq-Tool instance

Return type:

FusorDataResourceStatus

Returns:

namedtuple describing whether Cool-Seq-Tool and Gene Normalizer resources are all available

fusor.tools.translate_identifier(seqrepo, ac, target_namespace='ga4gh')[source]#

Return target_namespace identifier for accession provided.

Parameters:
  • ac (str) – Identifier accession

  • target_namespace (str) – The namespace of identifiers to return. Default is ga4gh

Return type:

str

Returns:

Identifier for target_namespace

Raise:

IDTranslationException if unable to perform desired translation