Example #1
0
def has_degradation_increases_activity(data):
    """Check if the degradation of source causes activity of target

    :param dict data:
    """
    return part_has_modifier(data, SUBJECT, DEGRADATION) and part_has_modifier(
        data, OBJECT, ACTIVITY)
Example #2
0
def has_translocation_increases_activity(data):
    """Check if the tranclocation of source causes activity of target

    :param dict data:
    """
    return part_has_modifier(data, SUBJECT,
                             TRANSLOCATION) and part_has_modifier(
                                 data, OBJECT, ACTIVITY)
Example #3
0
def complex_increases_activity(graph, u, v, key):
    """If the complexing of v increases its activity"""
    if graph.node[u][FUNCTION] != COMPLEX:
        return False

    if not complex_has_member(graph, u, v):
        return False

    return part_has_modifier(graph.edge[u][v][key], OBJECT, ACTIVITY)
Example #4
0
def has_protein_modification_increases_activity(
    graph: BELGraph,
    source: BaseEntity,
    target: BaseEntity,
    key: str,
) -> bool:
    """Check if pmod of source causes activity of target."""
    edge_data = graph[source][target][key]
    return has_protein_modification(graph, source) and part_has_modifier(
        edge_data, TARGET, ACTIVITY)
Example #5
0
def has_protein_modification_increases_activity(graph, source, target, key):
    """Check if pmod of source causes activity of target

    :param graph:
    :param source:
    :param target:
    :param key:
    :rtype:
    """
    edge_data = graph.edge[source][target][key]

    return has_protein_modification(graph, source) and part_has_modifier(
        edge_data, OBJECT, ACTIVITY)
Example #6
0
def complex_increases_activity(graph: BELGraph, u: BaseEntity, v: BaseEntity,
                               key: str) -> bool:
    """Return if the formation of a complex with u increases the activity of v."""
    return (isinstance(u, (ComplexAbundance, NamedComplexAbundance))
            and complex_has_member(graph, u, v)
            and part_has_modifier(graph[u][v][key], TARGET, ACTIVITY))
Example #7
0
def has_translocation_increases_activity(edge_data: EdgeData) -> bool:
    """Check if the translocation of source causes activity of target."""
    return part_has_modifier(edge_data, SOURCE,
                             TRANSLOCATION) and part_has_modifier(
                                 edge_data, TARGET, ACTIVITY)
Example #8
0
def has_degradation_increases_activity(edge_data: EdgeData) -> bool:
    """Check if the degradation of source causes activity of target."""
    return part_has_modifier(edge_data, SOURCE,
                             DEGRADATION) and part_has_modifier(
                                 edge_data, TARGET, ACTIVITY)