for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
from typing import Set, Sequence
from mandos.model.settings import MANDOS_SETTINGS
from mandos.model.apis.chembl_support.chembl_activity import DataValidityComment
from mandos.model.apis.chembl_support.chembl_targets import TargetType
from mandos.model.apis.pubchem_support.pubchem_models import ClinicalTrialsGovUtils
from mandos.model.taxonomy import Taxonomy
from mandos.model.taxonomy_caches import TaxonomyFactories
class EntryUtils:
""" """
@staticmethod
def split(st: str) -> Set[str]:
This check looks for invalid names for a range of different identifiers.
You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.
If your project includes a Pylint configuration file, the settings contained in that file take precedence.
To find out more about Pylint, please refer to their site.
return {s.strip() for s in st.split(",")}
def get_taxa(taxa: str) -> Sequence[Taxonomy]:
factory = TaxonomyFactories.from_uniprot(MANDOS_SETTINGS.taxonomy_cache_path)
return [factory.load(str(taxon).strip()) for taxon in taxa.split(",")]
def get_trial_statuses(st: str) -> Set[str]:
return ClinicalTrialsGovUtils.resolve_statuses(st)
def get_target_types(st: str) -> Set[str]:
return {s.name for s in TargetType.resolve(st)}
def get_flags(st: str) -> Set[str]:
return {s.name for s in DataValidityComment.resolve(st)}
__all__ = ["EntryUtils"]