pypath.core.evidence.Evidences§
- class pypath.core.evidence.Evidences(evidences=())[source]§
Bases:
objectA 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
Evidenceinstances. 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.
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
viaisFalsethen it will be ignored, otherwise ifNoneonly 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
evidencesCombines the custom attributes from all evidences within this set.
Datasets in this evidence set.
Returns Keys are resource labels, values are
Evidenceobjects.- 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
viaisFalsethen it will be ignored, otherwise ifNoneonly primary resources are considered.
- items()[source]§
- Returns
- (dict_items): The evidences as a mapping, with
pypath.internals.resource.NetworkResourceKeyobjects as keys andpypath.core.evidence.Evidenceobjects as values.
- 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
Evidenceobjects.