Beispiel #1
0
    def __init__(self, id_a, id_b, mechanism, effect, direct, relation, pmid,
                 linenum):
        self.id_a = id_a
        self.id_b = id_b
        self.effect = effect
        self.direct = direct
        self.relation = relation
        self.pmid = pmid
        self.linenum = linenum
        self.complex_a = None

        try:
            if NamingConvention.is_complex(
                    self.id_a) and self.id_a in COMPLEXES:
                self.complex_a = COMPLEXES[self.id_a]
        except TypeError as err:
            print(self.id_a)
            raise err
        self.complex_b = None
        if NamingConvention.is_complex(self.id_b) and self.id_b in COMPLEXES:
            self.complex_b = COMPLEXES[self.id_b]
        # by default mechanism = molecular function
        mechanism_term = "GO:0003674"
        if self.direct == "YES":
            if (mechanism):
                mechanism_term = MECHANISM_GO_MAPPING[mechanism]
        self.mechanism = {
            "name": mechanism,
            "uri": None,
            "term": mechanism_term
        }
        self.regulated_activity = {"name": None, "uri": None, "term": None}

        self.individuals = {}
        self.enabled_by_stmt_a = None
Beispiel #2
0
 def b_is_complex(self):
     return NamingConvention.is_complex(self.id_b)
 def determine_entity(cls, entity_id: str, entity_name: str,
                      entity_type: str) -> SignorEntity:
     if NamingConvention.is_complex(entity_id):
         return SignorEntityFactory.complex_from_id(entity_id)
     else:
         return cls.entity_type_map[entity_type](entity_id, entity_name)