pypath.internals.annot_formats.AnnotationGroup§

class pypath.internals.annot_formats.AnnotationGroup(members, name=None, parent=None, aspect='functional', source='resource_specific', scope='specific', resource=None, transmitter=None, receiver=None, limit=None, avoid=None, enabled=True)[source]§

Bases: Set

Represents a set of molecular entities sharing a custom defined annotation. This class behaves like a set and set operations on it result set objects. Normally this class is instantiated by pypath.core.annot.CustomAnnotation in the process of populating categories and the contents of the groups defined in pypath.core.intercell_annot in case of annotations of the intercellular communication roles. For detailed definitions of the parameter values see the Supplementary Table S10 in Turei et al. 2020 (in prep).

Parameters:
  • members (list,set,tuple) – The identifiers of the entities in the category.

  • name (str) – The name of the category.

  • parent (str) – The name of the parent category; might be the same as name in case of high level (generic) categories.

  • aspect (str) – Either functional or locational.

  • source (str) – Either resource_specific or composite.

  • scope (str) – Either specific or generic.

  • resource (str) – The resource (database) name; in case of composite categories it should be the name of the database you are actually building, this by default is OmniPath and you can change by the pypath.share.settings module using the annot_composite_database_name key.

  • transmitter (bool) – Whether the category contains transmitters of signaling information from the cell expressing the molecular entities in direction of other cells.

  • receiver (bool) – Whether the category contains receivers of signaling information from other cells in direction of the cells expressing the molecular entites in the category.

  • limit (str,set) – Limit to this or these categories. E.g. if it’s ‘extracellular’ the result will be the intersection of this category and ‘extracellular’ i.e. the category will be limited to extracellular proteins.

  • avoid (str,set) – Avoid elements of this or these categories. E.g. if it’s ‘cell_surface’ then all cell_surface proteins will be removed from this category.

__init__(members, name=None, parent=None, aspect='functional', source='resource_specific', scope='specific', resource=None, transmitter=None, receiver=None, limit=None, avoid=None, enabled=True)[source]§

Methods

__init__(members[, name, parent, aspect, ...])

count_entity_type([entity_type])

difference(*args)

filter_entity_type([entity_type])

Returns a copy of the group with only the selected entity types.

intersection(*args)

isdisjoint(*args)

Return True if two sets have a null intersection.

keys()

sets(*args)

symmetric_difference(*args)

union(*args)

Attributes

args

complexes

key

label

mirnas

n_complexes

n_mirnas

n_proteins

name_label

proteins

filter_entity_type(entity_type=None)[source]§

Returns a copy of the group with only the selected entity types. If entity_type is None returns the object itself.

classmethod isdisjoint(*args)[source]§

Return True if two sets have a null intersection.