src/pybel/dsl/edges.py
def location(identifier: Entity) -> LocationDict:
    """Make a location object modifier dictionary.

    :param identifier: A namespace/name/identifier pair

    Usage:

    X increases the abundance of Y in the cytoplasm

    .. code-block:: python

        from pybel import BELGraph
        from pybel.dsl import protein, location

        graph = BELGraph()

        source = protein('HGNC', 'IRAK1')
        target = protein('HGNC', 'IRF7, variants=[
            pmod('Ph', 'Ser', 477), pmod('Ph', 'Ser', 479),
        ])
        graph.add_increases(
            source,
            target,
            citation=...,
            evidence=...,
            target_modifier=location(entity(namespace='GO', name='cytosol', identifier='GO:0005829')),
        )

    X increases the kinase activity of Y in the cytoplasm. In this case, the :func:`activity` function takes a location as
    an optional argument.

    .. code-block:: python

        from pybel import BELGraph
        from pybel.dsl import protein, location

        graph = BELGraph()

        source = ...
        target = ...
        graph.add_increases(
            source,
            target,
            citation=...,
            evidence=...,
            target_modifier=activity('kin', location=entity(namespace='GO', name='cytosol', identifier='GO:0005829')),
        )
    """
    return {
        LOCATION: identifier,
    }
Make a location object modifier dictionary.

    :param identifier: A namespace/name/identifier pair

    Usage:

    X increases the abundance of Y in the cytoplasm

    .. code-block:: python

        from pybel import BELGraph
        from pybel.dsl import protein, location

        graph = BELGraph()

        source = protein('HGNC', 'IRAK1')
        target = protein('HGNC', 'IRF7, variants=[
            pmod('Ph', 'Ser', 477), pmod('Ph', 'Ser', 479),
        ])
        graph.add_increases(
            source,
            target,
            citation=...,
            evidence=...,
            target_modifier=location(entity(namespace='GO', name='cytosol', identifier='GO:0005829')),
        )

    X increases the kinase activity of Y in the cytoplasm. In this case, the :func:`activity` function takes a location as
    an optional argument.

    .. code-block:: python

        from pybel import BELGraph
        from pybel.dsl import protein, location

        graph = BELGraph()

        source = ...
        target = ...
        graph.add_increases(
            source,
            target,
            citation=...,
            evidence=...,
            target_modifier=activity('kin', location=entity(namespace='GO', name='cytosol', identifier='GO:0005829')),
        )
    
Make a location object modifier dictionary.
Make a location object modifier dictionary .
def location(identifier: Entity) -> LocationDict:
    return {
        LOCATION: identifier,
    }
def location ( identifier : Entity ) -> LocationDict : return { LOCATION : identifier , }
Make a location object modifier dictionary.
Make a location object modifier dictionary .
"""Make a location object modifier dictionary.

    :param identifier: A namespace/name/identifier pair

    Usage:

    X increases the abundance of Y in the cytoplasm

    .. code-block:: python

        from pybel import BELGraph
        from pybel.dsl import protein, location

        graph = BELGraph()

        source = protein('HGNC', 'IRAK1')
        target = protein('HGNC', 'IRF7, variants=[
            pmod('Ph', 'Ser', 477), pmod('Ph', 'Ser', 479),
        ])
        graph.add_increases(
            source,
            target,
            citation=...,
            evidence=...,
            target_modifier=location(entity(namespace='GO', name='cytosol', identifier='GO:0005829')),
        )

    X increases the kinase activity of Y in the cytoplasm. In this case, the :func:`activity` function takes a location as
    an optional argument.

    .. code-block:: python

        from pybel import BELGraph
        from pybel.dsl import protein, location

        graph = BELGraph()

        source = ...
        target = ...
        graph.add_increases(
            source,
            target,
            citation=...,
            evidence=...,
            target_modifier=activity('kin', location=entity(namespace='GO', name='cytosol', identifier='GO:0005829')),
        )
    """
identifier
Entity
A namespace/name/identifier pair
Usage.

X increases the abundance of Y in the cytoplasm

code-block:: python

from pybel import BELGraph
from pybel.dsl import protein, location

graph = BELGraph()

source = protein('HGNC', 'IRAK1')
target = protein('HGNC', 'IRF7, variants=[
pmod('Ph', 'Ser', 477), pmod('Ph', 'Ser', 479),
])
graph.add_increases(
source,
target,
citation=...,
evidence=...,
target_modifier=location(entity(namespace='GO', name='cytosol', identifier='GO:0005829')),
)

X increases the kinase activity of Y in the cytoplasm. In this case, the :func:`activity` function takes a location as
an optional argument.

code-block:: python

from pybel import BELGraph
from pybel.dsl import protein, location

graph = BELGraph()

source =
target =
graph.add_increases(
source,
target,
citation=...,
evidence=...,
target_modifier=activity('kin', location=entity(namespace='GO', name='cytosol', identifier='GO:0005829')),
)
A namespace / name / identifier pair Usage . X increases the abundance of Y in the cytoplasm code - block :: python from pybel import BELGraph from pybel . dsl import protein location graph = BELGraph () source = protein ( ' HGNC ' ' IRAK1 ' ) target = protein ( ' HGNC ' ' IRF7 variants = [ pmod ( ' Ph ' ' Ser ' 477 ) pmod ( ' Ph ' ' Ser ' 479 ) ] ) graph . add_increases ( source target citation = ... evidence = ... target_modifier = location ( entity ( namespace = ' GO ' name = ' cytosol ' identifier = ' GO : 0005829 ' )) ) X increases the kinase activity of Y in the cytoplasm . In this case the : func : ` activity ` function takes a location as an optional argument . code - block :: python from pybel import BELGraph from pybel . dsl import protein location graph = BELGraph () source = target = graph . add_increases ( source target citation = ... evidence = ... target_modifier = activity ( ' kin ' location = entity ( namespace = ' GO ' name = ' cytosol ' identifier = ' GO : 0005829 ' )) )