fusor.tools#
Provide miscellaneous tools for fusion modeling.
- 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.FUSORclass, 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.ERRORby respective upstream libraries.- Parameters:
gene_database (
Optional[AbstractDatabase]) – gene normalizer DB instancecool_seq_tool (
Optional[CoolSeqTool]) – Cool-Seq-Tool instance
- Return type:
- 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_namespaceidentifier for accession provided.- Parameters:
ac (
str) – Identifier accessiontarget_namespace (
str) – The namespace of identifiers to return. Default isga4gh
- Return type:
str- Returns:
Identifier for
target_namespace- Raise:
IDTranslationException if unable to perform desired translation