pypath.core.evidence.Evidences§

class pypath.core.evidence.Evidences(evidences=())[source]§

Bases: object

A collection of evidences. All evidences supporting a relationship such as molecular interaction, molecular complex, enzyme-PTM interaction, annotation, etc should be collected in one Evidences object. This way the set of evidences can be queried a comprehensive way.

Parameters:

evidences (tuple,list,set,Evidences) – An iterable providing Evidence instances. It is possible to create an empty evidence collection and populate it later or to show this way that certain relationship has no supporting evidences.

__init__(evidences=())[source]§

Methods

__init__([evidences])

asdict()

Evidence set as a list of dictionaries.

contains_database(database, **kwargs)

contains_reference(reference, **kwargs)

count_curation_effort(**kwargs)

count_references(**kwargs)

count_resources(**kwargs)

filter([resource, data_model, ...])

get_curation_effort(**kwargs)

get_data_models(**kwargs)

get_datasets(**kwargs)

get_interaction_types(**kwargs)

get_references(**kwargs)

get_resource_names(**kwargs)

get_resource_names_via(**kwargs)

get_resources(**kwargs)

get_resources_via(**kwargs)

has_data_model(data_model, **kwargs)

has_database_via(database, via, **kwargs)

has_dataset(dataset, **kwargs)

Contains evidence(s) from a given dataset meeting the criteria.

has_interaction_type(interaction_type[, ...])

If via is False then it will be ignored, otherwise if None only primary resources are considered.

intersection(other)

items()

Returns

keys()

Returns

match([resource, data_model, ...])

reload()

Reloads the object from the module level.

remove([resource, interaction_type, via])

serialize_attrs([top_key_prefix])

Serialize the extra attributes of the evidences as a JSON string.

Attributes

evidences

attrs

Combines the custom attributes from all evidences within this set.

datasets

Datasets in this evidence set.

simple_dict

Returns Keys are resource labels, values are Evidence objects.

asdict() list[dict][source]§

Evidence set as a list of dictionaries.

property attrs: dict§

Combines the custom attributes from all evidences within this set.

property datasets: set§

Datasets in this evidence set.

has_dataset(dataset: str, **kwargs) bool[source]§

Contains evidence(s) from a given dataset meeting the criteria.

Parameters:
  • dataset – Name of the dataset.

  • kwargs – Filtering criteria for evidences.

has_interaction_type(interaction_type, database=None, via=False)[source]§

If via is False then it will be ignored, otherwise if None only primary resources are considered.

items()[source]§
Returns
(dict_items): The evidences as a mapping, with

pypath.internals.resource.NetworkResourceKey objects as keys and pypath.core.evidence.Evidence objects as values.

keys()[source]§
Returns
(dict_keys): The keys of this dictionary are

pypath.internals.resource.NetworkResourceKey objects.

reload()[source]§

Reloads the object from the module level.

serialize_attrs(top_key_prefix: bool = True) str[source]§

Serialize the extra attributes of the evidences as a JSON string.

Returns

A JSON serialized string with the evidences from each resource.

property simple_dict: dict[str, evidence.Evidence]§

Returns Keys are resource labels, values are Evidence objects.