fusor.tools¶
Provide miscellaneous tools for fusion modeling.
- async fusor.tools.check_data_resources(gene_database=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 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 instance- Return type:
- Returns:
namedtuple describing whether Cool-Seq-Tool and Gene Normalizer resources are all available
- fusor.tools.get_error_message(e)[source]¶
Get all error messages from a pydantic ValidationError
- Parameters:
e (
ValidationError) – the ValidationError to get the messages from- Return type:
str- Returns:
string containing all of the extracted error messages, separated by newlines or the string
representation of the exception if ‘msg’ field is not present