Reference

annot_formats

class pypath.annot_formats.AnnotDef(name, source, args)
args

Alias for field number 2

name

Alias for field number 0

source

Alias for field number 1

class pypath.annot_formats.AnnotOp(annots, op)
annots

Alias for field number 0

op

Alias for field number 1

annot

class pypath.annot.Adhesome(**kwargs)[source]
class pypath.annot.AnnotationBase(name, ncbi_tax_id=9606, input_method=None, input_args=None, entity_type='protein', swissprot_only=True, proteins=(), complexes=(), reference_set=(), infer_complexes=True, dump=None, **kwargs)[source]
add_complexes_by_inference(complexes=None)[source]

Creates complex annotations by in silico inference and adds them to this annotation set.

all_proteins()[source]

All UniProt IDs annotated in this resource.

annotate_complex(cplex)[source]

Infers annotations for a single complex.

complex_inference(complexes=None)[source]

Annotates all complexes in complexes, by default in the default complex database (existing in the complex module or generated on demand according to the module’s current settings).

Dict with complexes as keys and sets of annotations as values. Complexes with no valid information in this annotation resource won’t be in the dict.

complexesiterable

Iterable yielding complexes.

get_subset(method=None, **kwargs)[source]

Retrieves a subset by filtering based on kwargs. Each argument should be a name and a value or set of values. Elements having the provided values in the annotation will be returned. Returns a set of UniProt IDs.

load_proteins()[source]

Retrieves a set of all UniProt IDs to have a base set of the entire proteome.

reload()[source]

Reloads the object from the module level.

class pypath.annot.Baccin2019(ncbi_tax_id=9606, **kwargs)[source]
class pypath.annot.CancerGeneCensus(**kwargs)[source]
class pypath.annot.Cancersea(**kwargs)[source]
class pypath.annot.CellPhoneDB(**kwargs)[source]
record

alias of pypath.dataio.CellPhoneDBAnnotation

class pypath.annot.CellPhoneDBComplex(**kwargs)[source]
class pypath.annot.CellSurfaceProteinAtlas(ncbi_tax_id=9606, **kwargs)[source]
class pypath.annot.Comppi(**kwargs)[source]
class pypath.annot.Corum(name, annot_attr, **kwargs)[source]
class pypath.annot.CorumFuncat(**kwargs)[source]
class pypath.annot.CorumGO(**kwargs)[source]
class pypath.annot.Cpad(ncbi_tax_id=9606, **kwargs)[source]
class pypath.annot.Dgidb(**kwargs)[source]
class pypath.annot.Disgenet(ncbi_tax_id=9606, **kwargs)[source]
class pypath.annot.Exocarta(ncbi_tax_id=9606, **kwargs)[source]
class pypath.annot.GOIntercell(categories=None, go_annot=None, ncbi_tax_id=9606, **kwargs)[source]
class pypath.annot.GuideToPharmacology(load_sources=False, **kwargs)[source]
class pypath.annot.Hgnc(**kwargs)[source]
class pypath.annot.HpmrComplex(**kwargs)[source]
class pypath.annot.HumanPlasmaMembraneReceptome(**kwargs)[source]
class pypath.annot.HumanProteinAtlas(**kwargs)[source]
class pypath.annot.HumanProteinAtlasSecretome(**kwargs)[source]
class pypath.annot.HumanProteinAtlasSubcellular(**kwargs)[source]
class pypath.annot.Integrins(**kwargs)[source]
class pypath.annot.Intogen(**kwargs)[source]
class pypath.annot.KeggPathways(ncbi_tax_id=9606, **kwargs)[source]
class pypath.annot.Kinasedotcom(**kwargs)[source]
class pypath.annot.Kirouac2010(load_sources=False, **kwargs)[source]
class pypath.annot.LigandReceptor(name, ligand_col=None, receptor_col=None, ligand_id_type=None, receptor_id_type=None, record_processor_method=None, record_extra_fields=None, record_defaults=None, extra_fields_methods=None, **kwargs)[source]
class pypath.annot.Locate(ncbi_tax_id=9606, literature=True, external=True, predictions=False, **kwargs)[source]
class pypath.annot.Lrdb(**kwargs)[source]
class pypath.annot.Matrisome(ncbi_tax_id=9606, **kwargs)[source]
class pypath.annot.Matrixdb(ncbi_tax_id=9606, **kwargs)[source]
class pypath.annot.Membranome(**kwargs)[source]
class pypath.annot.Msigdb(ncbi_tax_id=9606, **kwargs)[source]
class pypath.annot.NetpathPathways(ncbi_tax_id=9606, **kwargs)[source]
class pypath.annot.Opm(ncbi_tax_id=9606, **kwargs)[source]
class pypath.annot.Phosphatome(**kwargs)[source]
class pypath.annot.Ramilowski2015(load_sources=False, **kwargs)[source]
class pypath.annot.Ramilowski2015Location(**kwargs)[source]
class pypath.annot.SignalinkPathways(ncbi_tax_id=9606, **kwargs)[source]
class pypath.annot.SignorPathways(ncbi_tax_id=9606, **kwargs)[source]
class pypath.annot.Surfaceome(**kwargs)[source]
class pypath.annot.Tfcensus(**kwargs)[source]
class pypath.annot.Topdb(ncbi_tax_id=9606, **kwargs)[source]
class pypath.annot.Vesiclepedia(ncbi_tax_id=9606, **kwargs)[source]
class pypath.annot.Zhong2015(**kwargs)[source]
pypath.annot.get_db(keep_annotators=True, create_dataframe=False, use_complexes=True, **kwargs)[source]

Retrieves the current database instance and initializes it if does not exist yet.

pypath.annot.init_db(keep_annotators=True, create_dataframe=False, use_complexes=True, **kwargs)[source]

Initializes or reloads the annotation database. The database will be assigned to the db attribute of this module.

bel

cache

pypath.cache.get_cachedir(cachedir=None)[source]

Ensures the cache directory exists and returns its path.

cellphonedb

class pypath.cellphonedb.CellPhoneDBComplex(complex_name, uniprot_1, uniprot_2, uniprot_3, uniprot_4, transmembrane, peripheral, secreted, secreted_desc, secreted_highlight, receptor, receptor_desc, integrin, other, other_desc, pdb_id, pdb_structure, stoichiometry, comments_complex)
comments_complex

Alias for field number 18

complex_name

Alias for field number 0

integrin

Alias for field number 12

other

Alias for field number 13

other_desc

Alias for field number 14

pdb_id

Alias for field number 15

pdb_structure

Alias for field number 16

peripheral

Alias for field number 6

receptor

Alias for field number 10

receptor_desc

Alias for field number 11

secreted

Alias for field number 7

secreted_desc

Alias for field number 8

secreted_highlight

Alias for field number 9

stoichiometry

Alias for field number 17

transmembrane

Alias for field number 5

uniprot_1

Alias for field number 1

uniprot_2

Alias for field number 2

uniprot_3

Alias for field number 3

uniprot_4

Alias for field number 4

class pypath.cellphonedb.CellPhoneDBGene(gene_name, uniprot, hgnc_symbol, ensembl)
ensembl

Alias for field number 3

gene_name

Alias for field number 0

hgnc_symbol

Alias for field number 2

uniprot

Alias for field number 1

class pypath.cellphonedb.CellPhoneDBInteraction(id_cp_interaction, partner_a, partner_b, protein_name_a, protein_name_b, annotation_strategy, source)
annotation_strategy

Alias for field number 5

id_cp_interaction

Alias for field number 0

partner_a

Alias for field number 1

partner_b

Alias for field number 2

protein_name_a

Alias for field number 3

protein_name_b

Alias for field number 4

source

Alias for field number 6

class pypath.cellphonedb.CellPhoneDBProtein(uniprot, protein_name, transmembrane, peripheral, secreted, secreted_desc, secreted_highlight, receptor, receptor_desc, integrin, other, other_desc, tags, tags_reason, tags_description)
integrin

Alias for field number 9

other

Alias for field number 10

other_desc

Alias for field number 11

peripheral

Alias for field number 3

protein_name

Alias for field number 1

receptor

Alias for field number 7

receptor_desc

Alias for field number 8

secreted

Alias for field number 4

secreted_desc

Alias for field number 5

secreted_highlight

Alias for field number 6

tags

Alias for field number 12

tags_description

Alias for field number 14

tags_reason

Alias for field number 13

transmembrane

Alias for field number 2

uniprot

Alias for field number 0

common

pypath.common.uniq_list(seq)

Reduces a list to its unique elements.

Takes any iterable and returns a list of unique elements on it. If the argument is a dictionary, returns a list of unique keys. NOTE: Does not preserve the order of the elements.

Parameters

seq (list) – Sequence to be processed, can be any iterable type.

Returns

(list) – List of unique elements in the sequence seq.

Examples:
>>> uniq_list('aba')
['a', 'b']
>>> uniq_list([0, 1, 2, 1, 0])
[0, 1, 2]
pypath.common.add_to_list(lst, toadd)[source]

Adds elements to a list.

Appends toadd to lst. Function differs from list.append() since is capable to handle different data types. This is, if lst is not a list, it will be converted to one. Similarly, if toadd is not a list, it will be converted and added. If toadd is or contains None, these will be ommited. The returned list will only contain unique elements and does not necessarily preserve order.

Parameters
  • lst (list) – List or any other type (will be converted into a list). Original sequence to which toadd will be appended.

  • toadd (any) – Element(s) to be added into lst.

Returns

(list) – Contains the unique element(s) from the union of lst and toadd. NOTE: Makes use of common.uniq_list(), does not preserve order of elements.

Examples:
>>> add_to_list('ab', 'cd')
['ab', 'cd']
>>> add_to_list('ab', ['cd', None, 'ab', 'ef'])
['ab', 'ef', 'cd']
>>> add_to_list((0, 1, 2), 4)
[0, 1, 2, 4]
pypath.common.add_to_set(st, toadd)[source]

Adds elements to a set.

Appends toadd to st. Function is capable to handle different input data types. This is, if toadd is a list, it will be converted to a set and added.

Parameters
  • st (set) – Original set to which toadd will be added.

  • toadd (any) – Element(s) to be added into st.

Returns

(set) – Contains the element(s) from the union of st and toadd.

Examples:
>>> st = set([0, 1, 2])
>>> add_to_set(st, 3)
set([0, 1, 2, 3])
>>> add_to_set(st, [4, 2, 5])
set([0, 1, 2, 4, 5])
pypath.common.gen_session_id(length=5)[source]

Generates a random alphanumeric string.

Parameters

length (int) – Optional, 5 by default. Specifies the length of the random string.

Returns

(str) – Random alphanumeric string of the specified length.

pypath.common.sorensen_index(a, b)[source]

Computes the Sorensen index.

Computes the Sorensen-Dice coefficient between two sets a and b.

Parameters
  • a (set) – Or any iterable type (will be converted to set).

  • b (set) – Or any iterable type (will be converted to set).

Returns

(float) – The Sorensen-Dice coefficient between a and b.

pypath.common.simpson_index(a, b)[source]

Computes Simpson’s index.

Given two sets a and b, returns the Simpson index.

Parameters
  • a (set) – Or any iterable type (will be converted to set).

  • b (set) – Or any iterable type (will be converted to set).

Returns

(float) – The Simpson index between a and b.

pypath.common.simpson_index_counts(a, b, c)[source]
Parameters
  • a

  • b

  • c

Returns

(float) –

pypath.common.jaccard_index(a, b)[source]

Computes the Jaccard index.

Computes the Jaccard index between two sets a and b.

Parameters
  • a (set) – Or any iterable type (will be converted to set).

  • b (set) – Or any iterable type (will be converted to set).

Returns

(float) – The Jaccard index between a and b.

pypath.common.console(message)[source]

Prints a message on the terminal.

Prints a message to the standard output (e.g. terminal) formatted to 80 characters per line plus first-level indentation.

Parameters

message (str) – The message to be printed.

pypath.common.wcl(f)[source]
pypath.common.flat_list(lst)[source]

Coerces the elements of a list of iterables into a single list.

Parameters

lst (lsit) – List to be flattened. Its elements can be also lists or any other iterable.

Returns

(list) – Flattened list of lst.

Examples:
>>> flat_list([(0, 1), (1, 1), (2, 1)])
[0, 1, 1, 1, 2, 1]
>> flat_list(['abc', 'def'])
['a', 'b', 'c', 'd', 'e', 'f']
pypath.common.del_empty(lst)[source]

Removes empty entries of a list.

It is assumed that elemenst of lst are iterables (e.g. [str] or [list]).

Parameters

lst (list) – List from which empty elements will be removed.

Returns

(list) – Copy of lst without elements whose length was zero.

Example:
>>> del_empty(['a', '', 'b', 'c'])
['a', 'b', 'c']
pypath.common.get_args(loc_dict, remove={})[source]

Given a dictionary of local variables, returns a copy of it without 'self', 'kwargs' (in the scope of a class) plus any other specified in the keyword argument remove.

Parameters
  • loc_dict (dict) – Dictionary containing the local variables (e.g. a call to locals() in a given scope).

  • remove (set) – Optional, set([]) by default. Can also be a list. Contains the keys of the elements in loc_dict that will be removed.

Returns

(dict) – Copy of loc_dict without 'self', 'kwargs' and any other element specified in remove.

pypath.common.something(anything)[source]

Checks if argument is empty.

Checks if anything is empty or None.

Parameters

anything (any) – Self-explanatory.

Returns

(bool) – False if anyhting is None or any empty data type.

Examples:
>>> something(None)
False
>>> something(123)
True
>>> something('Hello world!')
True
>>> something('')
False
>>> something([])
False
pypath.common.rotate(point, angle, center=(0.0, 0.0))[source]

Rotates a point with respect to a center.

Rotates a given point around a center according to the specified angle (in degrees) in a two-dimensional space. The rotation is counter-clockwise.

Parameters
  • point (tuple) – Or list. Contains the two coordinates of the point to be rotated.

  • angle (float) – Angle (in degrees) from which the point will be rotated with respect to center (counter-clockwise).

  • center (tuple) – Optional, (0.0, 0.0) by default. Can also be a list. Determines the two coordinates of the center relative to which the point has to be rotated.

Returns

(tuple) – Pair of coordinates of the rotated point.

pypath.common.clean_dict(dct)[source]

Cleans a dictionary of None values.

Removes None values from a dictionary dct and casts all other values to strings.

Parameters

dct (dict) – Dictionary to be cleaned from None values.

Returns

(dict) – Copy of dct without None value entries and all other values formatted to strings.

pypath.common.md5(value)[source]

Computes the sum of MD5 hash of a given string value.

Parameters

value (str) – Or any other type (will be converted to string). Value for which the MD5 sum will be computed. Must follow ASCII encoding.

Returns

(str) – Hash value resulting from the MD5 sum of the value string.

pypath.common.uniq_ord_list(seq, idfun=None)[source]

Reduces a list to its unique elements keeping their order.

Returns a copy of seq without repeated elements. Preserves the order. If any element is repeated, the first instance is kept.

Parameters
  • seq (list) – Or any other iterable type. The sequence from which repeated elements are to be removed.

  • idfun (function) – Optional, None by default. Identifier function, for each entry of seq, returns a identifier of that entry from which uniqueness is determined. Default behavior is f(x) = x. See examples below.

Returns

(list) – Copy of seq without the repeated elements (according to idfun).

Examples:
>>> uniq_ord_list([0, 1, 2, 1, 5])
[0, 1, 2, 5]
>>> uniq_ord_list('abracadabra')
['a', 'b', 'r', 'c', 'd']
>>> def f(x):
...     if x > 0:
...             return 0
...     else:
...             return 1
>>> uniq_ord_list([-32, -42, 1, 15, -12], idfun=f)
[-32, 1]
>>> def g(x): # Given a file name, return it without extension
...    return x.split('.')[0]
>>> uniq_ord_list(['a.png', 'a.txt', 'b.pdf'], idfun=g)
['a.png', 'b.pdf']
pypath.common.dict_diff(d1, d2)[source]

Compares two dictionaries.

Compares two given dictionaries d1 and d2 whose values are sets or dictionaries (in such case the function is called recursively). NOTE: The comparison is only performed on the values of the keys that are common in d1 and d2 (see example below).

Parameters
  • d1 (dict) – First dictionary of the comparison.

  • d2 (dict) – Second dictionary of the comparison.

Returns

  • (dict) – Unique elements of d1 when compared to d2.

  • (dict) – Unique elements of d2 when compared to d1.

Examples:
>>> d1 = {'a': {1}, 'b': {2}, 'c': {3}} # 'c' is unique to d1
>>> d2 = {'a': {1}, 'b': {3}}
>>> dict_diff(d1, d2)
({'a': set([]), 'b': set([2])}, {'a': set([2]), 'b': set([3])})
pypath.common.to_set(var)[source]

Makes sure the object var is a set, if it is a list converts it to set, otherwise it creates a single element set out of it. If var is None returns empty set.

pypath.common.to_list(var)[source]

Makes sure var is a list otherwise creates a single element list out of it. If var is None returns empty list.

pypath.common.unique_list(seq)[source]

Reduces a list to its unique elements.

Takes any iterable and returns a list of unique elements on it. If the argument is a dictionary, returns a list of unique keys. NOTE: Does not preserve the order of the elements.

Parameters

seq (list) – Sequence to be processed, can be any iterable type.

Returns

(list) – List of unique elements in the sequence seq.

Examples:
>>> uniq_list('aba')
['a', 'b']
>>> uniq_list([0, 1, 2, 1, 0])
[0, 1, 2]
pypath.common.basestring

alias of builtins.str

pypath.common.is_float(num)[source]

Tells if a string represents a floating point number, i.e. it can be converted by float.

pypath.common.is_int(num)[source]

Tells if a string represents an integer, i.e. it can be converted by int.

pypath.common.float_or_nan(num)[source]

Returns num converted from string to float if num represents a float otherwise numpy.nan.

complex

class pypath.complex.AbstractComplexResource(name, ncbi_tax_id=9606, input_method=None, input_args=None, dump=None, **kwargs)[source]

A resource which provides information about molecular complexes.

class pypath.complex.CellPhoneDB(**kwargs)[source]
class pypath.complex.Compleat(input_args=None, **kwargs)[source]
class pypath.complex.ComplexAggregator(resources=None, pickle_file=None)[source]
reload()[source]

Reloads the object from the module level.

class pypath.complex.ComplexPortal(input_args=None, **kwargs)[source]
class pypath.complex.Corum(input_args=None, **kwargs)[source]
class pypath.complex.GuideToPharmacology(input_args=None, **kwargs)[source]
class pypath.complex.Havugimana(input_args=None, **kwargs)[source]
class pypath.complex.Hpmr(input_args=None, **kwargs)[source]
class pypath.complex.Humap(input_args=None, **kwargs)[source]
class pypath.complex.Pdb(input_args=None, **kwargs)[source]
class pypath.complex.Signor(input_args=None, **kwargs)[source]
pypath.complex.all_complexes()[source]

Returns a set of all complexes in the database which serves as a reference set for many methods, just like uniprot_input.all_uniprots represents the proteome.

pypath.complex.get_db(**kwargs)[source]

Retrieves the current database instance and initializes it if does not exist yet.

pypath.complex.init_db(**kwargs)[source]

Initializes or reloads the complex database. The database will be assigned to the db attribute of this module.

curl

class pypath.curl.Curl(url, silent=True, get=None, post=None, req_headers=None, cache=True, debug=False, outf=None, compr=None, encoding=None, files_needed=None, connect_timeout=300, timeout=2400, ignore_content_length=False, init_url=None, init_fun='get_jsessionid', init_use_cache=False, follow=True, large=False, default_mode='r', override_post=False, init_headers=False, return_headers=False, compressed=False, binary_data=None, write_cache=True, force_quote=False, sftp_user=None, sftp_passwd=None, sftp_passwd_file='.secrets', sftp_port=22, sftp_host=None, sftp_ask=None, setup=True, call=True, process=True, retries=3, cache_dir=None, bypass_url_encoding=False, empty_attempt_again=True)[source]

This class is a wrapper around pycurl. You can set a vast amount of parameters. In addition it has a caching functionality: using this downloads of databases/resources is performed only once. It handles HTTP, FTP, cookies, headers, GET and POST params, multipart/form data, URL quoting, redirects, timeouts, retries, encodings, debugging. It returns either downloaded data, file pointer, files extracted from archives (gzip, tar.gz, zip). It is able to show a progress and status indicator on the console.

close()[source]

Closes all file objects.

construct_binary_data()[source]

The binary data content of a form/multipart type request can be constructed from a list of tuples (<field name>, <field value>), where field name and value are both type of bytes.

is_quoted(string)[source]

From http://stackoverflow.com/questions/ 1637762/test-if-string-is-url-encoded-in-php

set_binary_data()[source]

Set binary data to be transmitted attached to POST request.

binary_data is either a bytes string, or a filename, or a list of key-value pairs of a multipart form.

url_fix(charset='utf-8')[source]

From http://stackoverflow.com/a/121017/854988

class pypath.curl.FileOpener(file_param, compr=None, extract=True, _open=True, set_fileobj=True, files_needed=None, large=True, default_mode='r', encoding='utf-8')[source]

This class opens a file, extracts it in case it is a gzip, tar.gz, tar.bz2 or zip archive, selects the requested files if you only need certain files from a multifile archive, reads the data from the file, or returns the file pointer, as you request. It examines the file type and size.

extract()[source]

Calls the extracting method for compressed files.

open()[source]

Opens the file if exists.

open_tgz()[source]

Extracts files from tar gz.

class pypath.curl.cache_delete_off[source]

This is a context handler which stops pypath.curl.Curl() deleting the cache files. This is the default behaviour, so this context won’t change anything by default.

Behind the scenes it sets the value of the pypath.curl.CACHEDEL module level variable to False.

Example:

import pypath
from pypath import curl, data_formats

pa = pypath.PyPath()

with curl.cache_delete_off():
    pa.load_resources({'signor': data_formats.pathway['signor']})
class pypath.curl.cache_delete_on[source]

This is a context handler which results pypath.curl.Curl() deleting the cache files instead of reading it. Then it downloads the data again, or does nothing if the DRYRUN context is turned on. Upon deleting cache files console messages will let you know which files have been deleted.

Behind the scenes it sets the value of the pypath.curl.CACHEDEL module level variable to True (by default it is False).

Example:

import pypath
from pypath import curl, data_formats

pa = pypath.PyPath()

with curl.cache_delete_on():
    pa.load_resources({'signor': data_formats.pathway['signor']})
class pypath.curl.cache_off[source]

This is a context handler to turn off pypath.curl.Curl() cache. Data will be downloaded even if it exists in cache.

Behind the scenes it sets the value of the pypath.curl.CACHE module level variable to False (by default it is None).

Example:

import pypath
from pypath import curl, data_formats

pa = pypath.PyPath()

print('`curl.CACHE` is ', curl.CACHE)

with curl.cache_on():
    print('`curl.CACHE` is ', curl.CACHE)
    pa.load_resources({'signor': data_formats.pathway['signor']})
class pypath.curl.cache_on[source]

This is a context handler to turn on pypath.curl.Curl() cache. As most of the methods use cache as their default behaviour, probably it won’t change anything.

Behind the scenes it sets the value of the pypath.curl.CACHE module level variable to True (by default it is None).

Example:

import pypath
from pypath import curl, data_formats

pa = pypath.PyPath()

print('`curl.CACHE` is ', curl.CACHE)

with curl.cache_on():
    print('`curl.CACHE` is ', curl.CACHE)
    pa.load_resources({'signor': data_formats.pathway['signor']})
class pypath.curl.cache_print_off[source]

This is a context handler which stops pypath.curl.Curl() to print verbose messages about its cache.

Behind the scenes it sets the value of the pypath.curl.CACHEPRINT module level variable to False. As by default it is False, this context won’t modify the default behaviour.

Example:

import pypath
from pypath import curl, data_formats

pa = pypath.PyPath()

with curl.cache_print_off():
    pa.load_resources({'signor': data_formats.pathway['signor']})
class pypath.curl.cache_print_on[source]

This is a context handler which makes pypath.curl.Curl() print verbose messages about its cache.

Behind the scenes it sets the value of the pypath.curl.CACHEPRINT module level variable to True (by default it is False).

Example:

import pypath
from pypath import curl, data_formats

pa = pypath.PyPath()

with curl.cache_print_on():
    pa.load_resources({'signor': data_formats.pathway['signor']})
class pypath.curl.debug_off[source]

This is a context handler which avoids pypath.curl.Curl() to print debug information. By default it does not do this, so this context only restores the default.

Behind the scenes it sets the value of the pypath.curl.DEBUG module level variable to False.

Example:

import pypath
from pypath import curl, data_formats

pa = pypath.PyPath()

with curl.cache_debug_off():
    pa.load_resources({'signor': data_formats.pathway['signor']})
class pypath.curl.debug_on[source]

This is a context handler which results pypath.curl.Curl() to print debug information. This is useful if you have some issue with Curl, and you want to see what`s going on.

Behind the scenes it sets the value of the pypath.curl.DEBUG module level variable to True (by default it is False).

Example:

import pypath
from pypath import curl, data_formats

pa = pypath.PyPath()

with curl.cache_debug_on():
    pa.load_resources({'signor': data_formats.pathway['signor']})
class pypath.curl.dryrun_off[source]

This is a context handler which results pypath.curl.Curl() to perform download or cache read. This is the default behaviour, so applying this context restores the default.

Behind the scenes it sets the value of the pypath.curl.DRYRUN module level variable to False.

Example:

import pypath
from pypath import curl, data_formats

pa = pypath.PyPath()

with curl.cache_dryrun_off():
    pa.load_resources({'signor': data_formats.pathway['signor']})
class pypath.curl.dryrun_on[source]

This is a context handler which results pypath.curl.Curl() to do all setup steps, but do not perform download or cache read.

Behind the scenes it sets the value of the pypath.curl.DRYRUN module level variable to True (by default it is False).

Example:

import pypath
from pypath import curl, data_formats

pa = pypath.PyPath()

with curl.cache_dryrun_on():
    pa.load_resources({'signor': data_formats.pathway['signor']})
class pypath.curl.preserve_off[source]

This is a context handler which avoids pypath.curl.Curl() to make a reference to itself in the module level variable LASTCURL. By default it does not do this, so this context only restores the default.

Behind the scenes it sets the value of the pypath.curl.PRESERVE module level variable to False.

Example:

import pypath
from pypath import curl, data_formats

pa = pypath.PyPath()

with curl.cache_preserve_off():
    pa.load_resources({'signor': data_formats.pathway['signor']})
class pypath.curl.preserve_on[source]

This is a context handler which results pypath.curl.Curl() to make a reference to itself in the module level variable LASTCURL. This is useful if you have some issue with Curl, and you want to access the instance for debugging.

Behind the scenes it sets the value of the pypath.curl.PRESERVE module level variable to True (by default it is False).

Example:

import pypath
from pypath import curl, data_formats

pa = pypath.PyPath()

with curl.cache_preserve_on():
    pa.load_resources({'signor': data_formats.pathway['signor']})

data_formats

pypath.data_formats.interaction = {'alz': <pypath.input_formats.NetworkInput object>, 'biogrid': <pypath.input_formats.NetworkInput object>, 'ccmap': <pypath.input_formats.NetworkInput object>, 'dip': <pypath.input_formats.NetworkInput object>, 'innatedb': <pypath.input_formats.NetworkInput object>, 'matrixdb': <pypath.input_formats.NetworkInput object>, 'mppi': <pypath.input_formats.NetworkInput object>, 'netpath': <pypath.input_formats.NetworkInput object>}

PTM databases included in OmniPath. These supply large sets of directed interactions.

pypath.data_formats.interaction_htp = {'biogrid': <pypath.input_formats.NetworkInput object>, 'ccmap': <pypath.input_formats.NetworkInput object>, 'dip': <pypath.input_formats.NetworkInput object>, 'hi3': <pypath.input_formats.NetworkInput object>, 'hprd': <pypath.input_formats.NetworkInput object>, 'innatedb': <pypath.input_formats.NetworkInput object>, 'intact': <pypath.input_formats.NetworkInput object>, 'matrixdb': <pypath.input_formats.NetworkInput object>, 'mppi': <pypath.input_formats.NetworkInput object>}

Transcriptional regulatory interactions.

pypath.data_formats.obsolate = {'nci_pid': <pypath.input_formats.NetworkInput object>, 'signalink2': <pypath.input_formats.NetworkInput object>}

Reaction databases. These are not included in OmniPath, because only a minor part of their content can be used when processing along strict conditions to have only binary interactions with references.

pypath.data_formats.transcription_deprecated = {'oreganno_old': <pypath.input_formats.NetworkInput object>}

miRNA-target resources

pypath.data_formats.transcription_onebyone = {'abs': <pypath.input_formats.NetworkInput object>, 'encode_dist': <pypath.input_formats.NetworkInput object>, 'encode_prox': <pypath.input_formats.NetworkInput object>, 'htri': <pypath.input_formats.NetworkInput object>, 'oreganno': <pypath.input_formats.NetworkInput object>, 'pazar': <pypath.input_formats.NetworkInput object>, 'signor': <pypath.input_formats.NetworkInput object>}

New default transcription dataset is only TFregulons as it is already an integrated resource and has sufficient coverage.

import pypath

# load only A confidence level: pypath.data_formats.transcription[‘tfregulons’].input_args[‘levels’] = {‘A’} pa = pypath.PyPath() pa.init_network(pypath.data_formats.transcription)

pypath.data_formats.transcription[‘tfregulons’].input_args[‘levels’] = {

‘A’, ‘B’, ‘C’, ‘D’

} pa = pypath.PyPath() pa.init_network(pypath.data_formats.transcription)

dataio

class pypath.dataio.CellPhoneDBAnnotation(receptor, receptor_class, peripheral, secreted, secreted_class, transmembrane, integrin)
integrin

Alias for field number 6

peripheral

Alias for field number 2

receptor

Alias for field number 0

receptor_class

Alias for field number 1

secreted

Alias for field number 3

secreted_class

Alias for field number 4

transmembrane

Alias for field number 5

class pypath.dataio.ResidueMapper[source]

This class stores and serves the PDB –> UniProt residue level mapping. Attempts to download the mapping, and stores it for further use. Converts PDB residue numbers to the corresponding UniProt ones.

clean()[source]

Removes cached mappings, freeing up memory.

pypath.dataio.acsn_interactions(keep_in_complex_interactions=True)[source]

Processes ACSN data from local file. Returns list of interactions.

@keep_in_complex_interactionsbool

Whether to include interactions from complex expansion.

pypath.dataio.biogrid_interactions(organism=9606, htp_limit=1, ltp=True)[source]

Downloads and processes BioGRID interactions. Keeps only the “low throughput” interactions. Returns list of interactions.

@organismint

NCBI Taxonomy ID of organism.

@htp_limitint

Exclude interactions only from references cited at more than this number of interactions.

pypath.dataio.cancer_gene_census_annotations(user=None, passwd=None, credentials_fname='cosmic_credentials')[source]

Retrieves a list of cancer driver genes (Cancer Gene Census) from the Sanger COSMIC (Catalogue of Somatic Mutations in Cancer) database.

Does not work at the moment (signature does not match error).

pypath.dataio.cancersea_annotations()[source]

Retrieves genes annotated with cancer funcitonal states from the CancerSEA database.

pypath.dataio.cellphonedb_ligands_receptors()[source]

Retrieves the set of ligands and receptors from CellPhoneDB. Returns tuple of sets.

pypath.dataio.compleat_complexes(predicted=True)[source]

Retrieves complexes from the Compleat database.

pypath.dataio.complexportal_complexes(organism=9606, return_details=False)[source]

Complex dataset from IntAct. See more: http://www.ebi.ac.uk/intact/complex/ http://nar.oxfordjournals.org/content/early/2014/10/13/nar.gku975.full.pdf

pypath.dataio.comppi_interaction_locations(organism=9606)[source]

Downloads and preprocesses protein interaction and cellular compartment association data from the ComPPI database. This data provides scores for occurrence of protein-protein interactions in various compartments.

pypath.dataio.cpad_pathway_cancer()[source]

Collects only the pathway-cancer relationships. Returns sets of records grouped in dicts by cancer and by pathway.

pypath.dataio.deathdomain_interactions()[source]

Downloads HTML tables from the DeathDomain webpage and extracts the interactions.

pypath.dataio.deathdomain_interactions_rescued()[source]

Loads the DeathDomain interactions from rescued data.

pypath.dataio.dgidb_annotations()[source]

Downloads druggable protein annotations from DGIdb.

pypath.dataio.dip_login(user, passwd)[source]

This does not work for unknown reasons.

In addition, the binary_data parameter of Curl().__init__() has been changed, below updates are necessary.

pypath.dataio.disgenet_annotations(dataset='curated')[source]

Downloads and processes the list of all human disease related proteins from DisGeNet. Returns dict of dicts.

@datasetstr

Name of DisGeNet dataset to be obtained: curated, literature, befree or all.

pypath.dataio.dorothea_interactions(levels={'A', 'B'}, only_curated=False)

Retrieves TF-target interactions from TF regulons.

Parameters
  • levels (set) – Confidence levels to be used.

  • only_curated (bool) – Retrieve only literature curated interactions.

TF regulons is a comprehensive resource of TF-target interactions combining multiple lines of evidences: literature curated databases, ChIP-Seq data, PWM based prediction using HOCOMOCO and JASPAR matrices and prediction from GTEx expression data by ARACNe.

For details see https://github.com/saezlab/DoRothEA.

pypath.dataio.elm_interactions()[source]

Downlods manually curated interactions from ELM. This is the gold standard set of ELM.

pypath.dataio.get_3dcomplex()[source]

Downloads and preprocesses data from the 3DComplex database.

Returns dict of dicts where top level keys are PDB IDs, second level keys are pairs of tuples of UniProt IDs and values are list with the number of amino acids in contact.

pypath.dataio.get_acsn_effects()[source]

Processes ACSN data, returns list of effects.

pypath.dataio.get_ca1()[source]

Downloads and processes the CA1 signaling network (Ma’ayan 2005). Returns list of interactions.

pypath.dataio.get_ccmap(organism=9606)[source]

Downloads and processes CancerCellMap. Returns list of interactions.

@organismint

NCBI Taxonomy ID to match column #7 in nodes file.

pypath.dataio.get_csa(uniprots=None)[source]

Downloads and preprocesses catalytic sites data. This data tells which residues are involved in the catalytic activity of one protein.

pypath.dataio.get_dbptm_old(organism=9606)[source]

Downloads enzyme-substrate interactions from dbPTM. Returns list of dicts.

pypath.dataio.get_dgidb_old()[source]

Deprecated. Will be removed soon.

Downloads and processes the list of all human druggable proteins. Returns a list of GeneSymbols.

pypath.dataio.get_domino_ptms()[source]

The table comes from dataio.get_domino(), having the following fields: header = [‘uniprot-A’, ‘uniprot-B’, ‘isoform-A’, ‘isoform-B’, #3 ‘exp. method’, ‘references’, ‘taxon-A’, ‘taxon-B’, #7 ‘role-A’, ‘role-B’, ‘binding-site-range-A’, ‘binding-site-range-B’, #11 ‘domains-A’, ‘domains-B’, ‘ptm-residue-A’, ‘ptm-residue-B’, #15 ‘ptm-type-mi-A’, ‘ptm-type-mi-B’, ‘ptm-type-A’, ‘ptm-type-B’, #19 ‘ptm-res-name-A’, ‘ptm-res-name-B’, ‘mutations-A’, ‘mutations-B’, #23 ‘mutation-effects-A’, ‘mutation-effects-B’, ‘domains-interpro-A’, #26 ‘domains-interpro-B’, ‘negative’] #28

pypath.dataio.get_dorothea(levels={'A', 'B'}, only_curated=False)

Retrieves TF-target interactions from TF regulons.

Parameters
  • levels (set) – Confidence levels to be used.

  • only_curated (bool) – Retrieve only literature curated interactions.

TF regulons is a comprehensive resource of TF-target interactions combining multiple lines of evidences: literature curated databases, ChIP-Seq data, PWM based prediction using HOCOMOCO and JASPAR matrices and prediction from GTEx expression data by ARACNe.

For details see https://github.com/saezlab/DoRothEA.

pypath.dataio.get_exocarta(organism=9606, types=None)[source]
Parameters

types (set) – Molecule types to retrieve. Possible values: protein, mrna.

pypath.dataio.get_go_desc(go_ids, organism=9606)[source]

Deprecated, should be removed soon.

pypath.dataio.get_go_quick(organism=9606, slim=False, names_only=False, aspects=('C', 'F', 'P'))[source]

Deprecated, should be removed soon.

Loads GO terms and annotations from QuickGO. Returns 2 dicts: names are GO terms by their IDs, terms are proteins GO IDs by UniProt IDs.

pypath.dataio.get_graphviz_attrs()[source]

Downloads graphviz attribute list from graphviz.org. Returns 3 dicts of dicts: graph_attrs, vertex_attrs and edge_attrs.

pypath.dataio.get_guide2pharma(organism='human', endogenous=True, process_interactions=True, process_complexes=True)[source]

Downloads and processes Guide to Pharmacology data. Returns list of dicts.

@organismstr

Name of the organism, e.g. human.

@endogenousbool

Whether to include only endogenous ligands interactions.

pypath.dataio.get_havugimana()[source]

Downloads data from Supplement Table S3/1 from Havugimana 2012 Cell. 150(5): 1068–1081.

pypath.dataio.get_homologene()[source]

Downloads the recent release of the NCBI HomoloGene database. Returns file pointer.

pypath.dataio.get_hpmr(use_cache=None)[source]

Downloads ligand-receptor and receptor-receptor interactions from the Human Plasma Membrane Receptome database.

pypath.dataio.get_hpmr_old()[source]

Deprecated, should be removed soon.

Downloads and processes the list of all human receptors from human receptor census (HPMR – Human Plasma Membrane Receptome). Returns list of GeneSymbols.

pypath.dataio.get_hprd(in_vivo=True)[source]

Downloads and preprocesses HPRD data.

pypath.dataio.get_hprd_ptms(in_vivo=True)[source]

Processes HPRD data and extracts PTMs. Returns list of kinase-substrate interactions.

pypath.dataio.get_hsn()[source]

Downloads and processes HumanSignalingNetwork version 6 (published 2014 Jan by Edwin Wang). Returns list of interactions.

pypath.dataio.get_i3d()[source]

Interaction3D contains residue numbers in given chains in given PDB stuctures, so we need to add an offset to get the residue numbers valid for UniProt sequences. Offsets can be obtained from Instruct, or from the Pfam PDB-chain-UniProt mapping table.

pypath.dataio.get_ielm(ppi, id_type='UniProtKB_AC', mydomains='HMMS', maxwait=180, cache=True, part=False, part_size=500, headers=None)[source]

Performs one query to iELM. Parameters are the same as at get_ielm_huge().

pypath.dataio.get_ielm_huge(ppi, id_type='UniProtKB_AC', mydomains='HMMS', maxwait=180, cache=True, part_size=500, headers=None)[source]

Loads iELM predicted domain-motif interaction data for a set of protein-protein interactions. This method breaks the list into reasonable sized chunks and performs multiple requests to iELM, and also retries in case of failure, with reducing the request size. Provides feedback on the console.

Parameters
  • id_type (str) – The type of the IDs in the supplied interaction list. Default is ‘UniProtKB_AC’. Please refer to iELM what type of IDs it does understand.

  • mydomains (str) – The type of the domain detection method. Defaults to ‘HMMS’. Please refer to iELM for alternatives.

  • maxwait (int) – The limit of the waiting time in seconds.

  • cache (bool) – Whether to use the cache or download everything again.

  • part_size (int) – The number of interactions to be queried in one request.

  • headers (list) – Additional HTTP headers to send to iELM with each request.

pypath.dataio.get_instruct()[source]

Instruct contains residue numbers in UniProt sequences, it means no further calculations of offsets in chains of PDB structures needed. Chains are not given, only a set of PDB structures supporting the domain-domain // protein-protein interaction.

pypath.dataio.get_instruct_offsets()[source]

These offsets should be understood as from UniProt to PDB.

pypath.dataio.get_integrins()[source]

Returns a set of the UniProt IDs of the human integrins from Table 1 of Takada et al 2007 (10.1186/gb-2007-8-5-215).

pypath.dataio.get_laudanna_directions()[source]

Downloads and processes the SignalingFlow edge attributes from Laudanna Lab. Returns list of directions.

pypath.dataio.get_laudanna_effects()[source]

Downloads and processes the SignalingDirection edge attributes from Laudanna Lab. Returns list of effects.

pypath.dataio.get_li2012()[source]

Reads supplementary data of Li 2012 from local file. Returns table (list of lists).

pypath.dataio.get_listof_ontologies()[source]

Returns a list of available ontologies using the bioservices module.

pypath.dataio.get_ontology(ontology)[source]

Downloads an ontology using the bioservices module.

pypath.dataio.get_pepcyber(cache=None)[source]

Downloads phosphoprotein binding protein interactions from the PEPCyber database.

pypath.dataio.get_phosphoelm(organism=9606, ltp_only=True)[source]

Downloads kinase-substrate interactions from phosphoELM. Returns list of dicts.

Parameters
  • organism (int) – NCBI Taxonomy ID.

  • ltp_only (bool) – Include only low-throughput interactions.

pypath.dataio.get_phosphosite(cache=True)[source]

Downloads curated and HTP data from Phosphosite, from preprocessed cache file if available. Processes BioPAX format. Returns list of interactions.

pypath.dataio.get_phosphosite_curated()[source]

Loads literature curated PhosphoSite data, from preprocessed cache file if available. Returns list of interactions.

pypath.dataio.get_phosphosite_new(cache=True)[source]

Downloads curated and HTP data from Phosphosite, from preprocessed cache file if available. Processes BioPAX format. Returns list of interactions.

pypath.dataio.get_phosphosite_noref()[source]

Loads HTP PhosphoSite data, from preprocessed cache file if available. Returns list of interactions.

pypath.dataio.get_pmid(idList)[source]

For a list of doi or PMC IDs fetches the corresponding PMIDs.

pypath.dataio.get_protmapper()[source]

Returns the raw records as read by csv.DictReader. From Bachman et al. 2019 “Assembling a phosphoproteomic knowledge base using ProtMapper to normalize phosphosite information from databases and text mining”, https://www.biorxiv.org/content/10.1101/822668v3.supplementary-material

pypath.dataio.get_psite_p(organism='human')[source]

Downloads the phosphorylation site dataset from PhosphoSitePlus.

pypath.dataio.get_psite_phos(raw=True, organism='human', strict=True)[source]

Downloads and preprocesses phosphorylation site data from PhosphoSitePlus.

pypath.dataio.get_psite_reg()[source]

Downloads and preprocesses the regulatory sites dataset from PhosphoSitePlus. This data provides information about which proteins a PTM disrupts or induces the interaction with.

pypath.dataio.get_switches_elm()[source]

switches.elm is a resource containing functional switches in molecular regulation, in domain-motif level resolution, classified into categories according to their mechanism.

pypath.dataio.get_tfcensus(classes=('a', 'b', 'other'))[source]

Downloads and processes the list of all known transcription factors from TF census (Vaquerizas 2009). This resource is human only. Returns set of UniProt IDs.

pypath.dataio.get_tfregulons(levels={'A', 'B'}, only_curated=False)[source]

Retrieves TF-target interactions from TF regulons.

Parameters
  • levels (set) – Confidence levels to be used.

  • only_curated (bool) – Retrieve only literature curated interactions.

TF regulons is a comprehensive resource of TF-target interactions combining multiple lines of evidences: literature curated databases, ChIP-Seq data, PWM based prediction using HOCOMOCO and JASPAR matrices and prediction from GTEx expression data by ARACNe.

For details see https://github.com/saezlab/DoRothEA.

pypath.dataio.get_tfregulons_old(levels={'A', 'B'}, only_curated=False)[source]

Retrieves TF-target interactions from TF regulons.

Parameters
  • levels (set) – Confidence levels to be used.

  • only_curated (bool) – Retrieve only literature curated interactions.

TF regulons is a comprehensive resource of TF-target interactions combining multiple lines of evidences: literature curated databases, ChIP-Seq data, PWM based prediction using HOCOMOCO and JASPAR matrices and prediction from GTEx expression data by ARACNe.

For details see https://github.com/saezlab/DoRothEA.

pypath.dataio.get_vesiclepedia(organism=9606, types=None)[source]
Parameters

types (set) – Molecule types to retrieve. Possible values: protein, mrna.

pypath.dataio.go_ancestors(aspects=('C', 'F', 'P'))

Queries the ancestors of GO terms by QuickGO REST API.

Returns dict of sets where keys are GO accessions and values are sets of their ancestors.

Parameters

aspects (tuple) – GO aspects: C, F and P for cellular_component, molecular_function and biological_process, respectively.

pypath.dataio.go_ancestors_goose(aspects=('C', 'F', 'P'))[source]

Queries the ancestors of GO terms by AmiGO goose.

Returns dict of sets where keys are GO accessions and values are sets of their ancestors.

Parameters

aspects (tuple) – GO aspects: C, F and P for cellular_component, molecular_function and biological_process, respectively.

pypath.dataio.go_ancestors_quickgo(aspects=('C', 'F', 'P'))[source]

Queries the ancestors of GO terms by QuickGO REST API.

Returns dict of sets where keys are GO accessions and values are sets of their ancestors.

Parameters

aspects (tuple) – GO aspects: C, F and P for cellular_component, molecular_function and biological_process, respectively.

pypath.dataio.go_annotations(organism='human')

Downloads GO annotation from UniProt GOA.

pypath.dataio.go_annotations_goa(organism='human')[source]

Downloads GO annotation from UniProt GOA.

pypath.dataio.go_annotations_goose(organism=9606, aspects=('C', 'F', 'P'), uniprots=None)[source]

Queries GO annotations by AmiGO goose.

IMPORTANT: This is not the preferred method any more to get terms and annotations. Recently the preferred method to access GO annotations is pypath.dataio.go_annotations_solr(). The data in GO MySQL instances has not been updated since Dec 2016. Unfortunately the providers ceased to support MySQL, the most flexible and highest performance access to GO data. The replacement is Solr which is far from providing the same features as MySQL.

Returns terms in dict of dicts and annotations in dict of dicts of sets. In both dicts the keys are aspects by their one letter codes. In the term dicts keys are GO accessions and values are their names. In the annotation dicts keys are UniProt IDs and values are sets of GO accessions.

Parameters
  • organism (int) – NCBI Taxonomy ID of one organism. Default is human (9606).

  • aspects (tuple) – GO aspects: C, F and P for cellular_component, molecular_function and biological_process, respectively.

  • uniprots (list) – Optionally a list of UniProt IDs. If None, results for all proteins returned.

pypath.dataio.go_annotations_quickgo(organism=9606, aspects=('C', 'F', 'P'), relations=('is_a', 'part_of'))[source]

Queries GO annotations by QuickGO REST API.

IMPORTANT: Recently the preferred method to access GO annotations is pypath.dataio.go_annotations_goa(). Contrary to its name QuickGO is super slow, otherwise it should yield up to date data, identical to the GOA file.

Returns terms in dict of dicts and annotations in dict of dicts of sets. In both dicts the keys are aspects by their one letter codes. In the term dicts keys are GO accessions and values are their names. In the annotation dicts keys are UniProt IDs and values are sets of GO accessions.

Parameters
  • organism (int) – NCBI Taxonomy ID of one organism. Default is human (9606).

  • aspects (tuple) – GO aspects: C, F and P for cellular_component, molecular_function and biological_process, respectively.

  • uniprots (list) – Optionally a list of UniProt IDs. If None, results for all proteins returned.

pypath.dataio.go_annotations_solr(organism=9606, aspects=('C', 'F', 'P'), references=False)[source]

Queries GO annotations by AmiGO Solr.

Before other methods have been provided to access GO. Now this is the preferred method to get annotations. Returns terms in dict of dicts and annotations in dict of dicts of sets. In both dicts the keys are aspects by their one letter codes. In the term dicts keys are GO accessions and values are their names. In the annotation dicts keys are UniProt IDs and values are sets of GO accessions.

Parameters
  • organism (int) – NCBI Taxonomy ID of one organism. Default is human (9606).

  • aspects (tuple) – GO aspects: C, F and P for cellular_component, molecular_function and biological_process, respectively.

  • references (bool) – Retrieve the references (PubMed IDs) for the annotations. Currently not implemented.

pypath.dataio.go_annotations_uniprot(organism=9606, swissprot='yes')[source]

Deprecated, should be removed soon.

pypath.dataio.go_descendants(aspects=('C', 'F', 'P'), terms=None, relations=None, quickgo_download_size=500)

Queries descendants of GO terms by QuickGO REST API.

Returns dict of sets where keys are GO accessions and values are sets of their descendants.

Parameters
  • aspects (tuple) – GO aspects: C, F and P for cellular_component, molecular_function and biological_process, respectively.

  • terms (dict) – Result from go_terms_solr. If None the method will be called.

pypath.dataio.go_descendants_goose(aspects=('C', 'F', 'P'))[source]

Queries descendants of GO terms by AmiGO goose.

IMPORTANT: This is not the preferred method any more to get descendants. Recently the preferred method to access GO annotations is pypath.dataio.go_descendants_quickgo(). The data in GO MySQL instances has not been updated since Dec 2016. Unfortunately the providers ceased to support MySQL, the most flexible and highest performance access to GO data. The replacement is Solr which is far from providing the same features as MySQL, for example it is unable to provide GO graph relationships. Other service is QuickGO which is up to date and has nice ways to query the ontology.

Returns dict of sets where keys are GO accessions and values are sets of their descendants.

Parameters

aspects (tuple) – GO aspects: C, F and P for cellular_component, molecular_function and biological_process, respectively.

pypath.dataio.go_descendants_quickgo(aspects=('C', 'F', 'P'), terms=None, relations=None, quickgo_download_size=500)[source]

Queries descendants of GO terms by QuickGO REST API.

Returns dict of sets where keys are GO accessions and values are sets of their descendants.

Parameters
  • aspects (tuple) – GO aspects: C, F and P for cellular_component, molecular_function and biological_process, respectively.

  • terms (dict) – Result from go_terms_solr. If None the method will be called.

pypath.dataio.go_descendants_to_ancestors(desc)[source]

Turns a dict of descendants to dict of ancestors by swapping the relationships. This way descendants will be the keys and their ancestors will be the values.

pypath.dataio.go_terms(aspects=('C', 'F', 'P'))

Queries GO terms by the QuickGO REST API.

Return dict of dicts where upper level keys are one letter codes of the aspects C, F and P for cellular_component, molecular_function and biological_process, respectively. Lower level keys are GO accessions and values are names of the terms.

Parameters

aspects (tuple) – GO aspects: C, F and P for cellular_component, molecular_function and biological_process, respectively.

pypath.dataio.go_terms_goose(aspects=('C', 'F', 'P'))[source]

Queries GO terms by AmiGO goose.

Return dict of dicts where upper level keys are one letter codes of the aspects C, F and P for cellular_component, molecular_function and biological_process, respectively. Lower level keys are GO accessions and values are names of the terms.

Parameters

aspects (tuple) – GO aspects: C, F and P for cellular_component, molecular_function and biological_process, respectively.

pypath.dataio.go_terms_quickgo(aspects=('C', 'F', 'P'))[source]

Queries GO terms by the QuickGO REST API.

Return dict of dicts where upper level keys are one letter codes of the aspects C, F and P for cellular_component, molecular_function and biological_process, respectively. Lower level keys are GO accessions and values are names of the terms.

Parameters

aspects (tuple) – GO aspects: C, F and P for cellular_component, molecular_function and biological_process, respectively.

pypath.dataio.go_terms_solr(aspects=('C', 'F', 'P'))[source]

Queries GO terms by AmiGO Solr.

Returns dict of dicts where upper level keys are one letter codes of the aspects C, F and P for cellular_component, molecular_function and biological_process, respectively. Lower level keys are GO accessions and values are names of the terms.

Parameters

aspects (tuple) – GO aspects: C, F and P for cellular_component, molecular_function and biological_process, respectively.

pypath.dataio.havugimana_complexes()[source]

Retrieves complexes from Supplement Table S3/1 from Havugimana 2012 Cell. 150(5): 1068–1081.

pypath.dataio.hi_iii()[source]

Loads the unbiased human interactome version III (HI-III). This is an unpublished data and its use is limited. Please check the conditions and licensing terms carefully at http://interactome.baderlab.org.

pypath.dataio.homologene_dict(source, target, id_type)[source]

Returns orthology translation table as dict, obtained from NCBI HomoloGene data.

Parameters
  • source (int) – NCBI Taxonomy ID of the source species (keys).

  • target (int) – NCBI Taxonomy ID of the target species (values).

  • id_type (str) – ID type to be used in the dict. Possible values: ‘RefSeq’, ‘Entrez’, ‘GI’, ‘GeneSymbol’.

pypath.dataio.homologene_uniprot_dict(source, target, only_swissprot=True)[source]

Returns orthology translation table as dict from UniProt to Uniprot, obtained from NCBI HomoloGene data. Uses RefSeq and Entrez IDs for translation.

Parameters
  • source (int) – NCBI Taxonomy ID of the source species (keys).

  • target (int) – NCBI Taxonomy ID of the target species (values).

  • only_swissprot (bool) – Translate only SwissProt IDs.

pypath.dataio.hpmr_interactions_old()[source]

Deprecated, should be removed soon.

Downloads ligand-receptor and receptor-receptor interactions from the Human Plasma Membrane Receptome database.

pypath.dataio.hprd_interactions(in_vivo=True)[source]

Processes HPRD data and extracts interactions. Returns list of interactions.

pypath.dataio.intact_interactions(miscore=0.6, organism=9606, complex_expansion=False, only_proteins=False, only_ids=False)[source]
only_proteinsbool

Keep only records of protein-protein interactions.

only_idsbool

Load only the identifiers of interacting pairs (smaller memory footprint).

pypath.dataio.intogen_annotations()[source]

Returns a list of cancer driver genes according to the IntOGen database.

pypath.dataio.kegg_interactions()[source]

Downloads and processes KEGG Pathways. Returns list of interactions.

pypath.dataio.kinasedotcom_annotations()[source]

Downloads and processes kinase annotations from kinase.com.

pypath.dataio.li2012_dmi()[source]

Converts table read by pypath.dataio.get_li2012() to list of pypath.intera.DomainMotif() objects. Translates GeneSymbols to UniProt IDs.

@mapperpypath.mapping.Mapper()

If not provided, a new Mapper() instance will be initialized, reserving more memory.

pypath.dataio.li2012_interactions()[source]

Converts table read by pypath.dataio.get_li2012() to list of interactions.

pypath.dataio.li2012_phospho()[source]

Converts table read by pypath.dataio.get_li2012() to list of dicts of kinase-substrate interactions.

pypath.dataio.lit_bm_13_interactions()[source]

Downloads and processes Lit-BM-13 dataset, the 2013 version of the high confidence literature curated interactions from CCSB. Returns list of interactions.

pypath.dataio.lit_bm_17_interactions()[source]

Downloads and processes Lit-BM-13 dataset, the 2017 version of the high confidence literature curated interactions from CCSB. Returns list of interactions.

pypath.dataio.lmpid_dmi(organism=9606)[source]

Converts list of domain-motif interactions supplied by pypath.dataio.load_lmpid() to list of `pypath.intera.DomainMotif() objects.

pypath.dataio.lmpid_interactions(organism=9606)[source]

Converts list of domain-motif interactions supplied by pypath.dataio.load_lmpid() to list of interactions.

pypath.dataio.load_lmpid(organism=9606)[source]

Reads and processes LMPID data from local file pypath.data/LMPID_DATA_pubmed_ref.xml. The file was provided by LMPID authors and is now redistributed with the module. Returns list of domain-motif interactions.

pypath.dataio.load_macrophage()[source]

Loads Macrophage from local file. Returns list of interactions.

pypath.dataio.load_signor_ptms(organism=9606)[source]

Loads and processes Signor PTMs. Returns dict of dicts.

pypath.dataio.matrisome_annotations(organism=9606)[source]

Downloads MatrisomeDB 2.0, a database of extracellular matrix proteins. Returns dict where keys are UniProt IDs and values are tuples of classes, subclasses and notes.

pypath.dataio.matrixdb_ecm_proteins(organism=9606)[source]

Returns a set of ECM (extracellular matrix) protein UniProt IDs retrieved from MatrixDB.

pypath.dataio.matrixdb_membrane_proteins(organism=9606)[source]

Returns a set of membrane protein UniProt IDs retrieved from MatrixDB.

pypath.dataio.matrixdb_secreted_proteins(organism=9606)[source]

Returns a set of secreted protein UniProt IDs retrieved from MatrixDB.

pypath.dataio.msigdb_annotations(registered_email=None, only_collections=None, exclude=('c5', ))[source]

Downloads all or some MSigDB gene set collections and processes them to an annotation type dictionary.

Parameters
  • registered_email (str,NoneType) – An email address registered at MSigDB. If None the msigdb_email from pypath.settings will be used.

  • only_collections (set,NoneType) – Limit the annotations only to these collections. For available collections e.g. {'h.all', 'c2cgp'} refer to the MSigDB webpage: http://software.broadinstitute.org/gsea/downloads.jsp#msigdb

  • exclude (tuple) – Exclude the collections having their name starting with any of the strings in this tuple. By default c5 (Gene Ontology) is excluded.

pypath.dataio.msigdb_download(registered_email=None, collection='msigdb', id_type='symbols', force_download=False)[source]

Downloads and preprocesses a collection of gmt format gene sets from MSigDB. Returns dict of sets with gene set names as keys and molecular identifiers as values.

Parameters
  • registered_email (str,NoneType) – An email address registered at MSigDB. If None the msigdb_email from pypath.settings will be used.

  • collection (str) – The name of the gene set collection. For available collections (e.g. h.all or c2.cpg) refer to the MSigDB website: http://software.broadinstitute.org/gsea/downloads.jsp#msigdb The default value msigdb contains all the genesets however you won’t be able to distinguish which geneset comes from which collection. For this you need to download the collections one by one.

  • id_type (str) – MSigDB provides Gene Symbols (symbols) and Entrez Gene IDs (entrez).

  • force_download (bool) – Download even if cache content is available.

pypath.dataio.msigdb_download_collections(registered_email=None, only_collections=None, exclude=('c5', ), id_type='symbols')[source]

Downloads all or some MSigDB gene set collections. Returns a dict of dicts where upper level keys are collections while lower level keys are geneset names and values are molecular identifiers.

Parameters
  • registered_email (str,NoneType) – An email address registered at MSigDB. If None the msigdb_email from pypath.settings will be used.

  • only_collections (set,NoneType) – Limit the annotations only to these collections. For available collections e.g. {'h.all', 'c2cgp'} refer to the MSigDB webpage: http://software.broadinstitute.org/gsea/downloads.jsp#msigdb

  • exclude (tuple) – Exclude the collections having their name starting with any of the strings in this tuple. By default c5 (Gene Ontology) is excluded.

pypath.dataio.only_pmids(idList, strict=True)[source]

Return elements unchanged which comply with the PubMed ID format, and attempts to translate the DOIs and PMC IDs using NCBI E-utils. Returns list containing only PMIDs.

@idListlist, str

List of IDs or one single ID.

@strictbool

Whether keep in the list those IDs which are not PMIDs, neither DOIs or PMC IDs or NIH manuscript IDs.

pypath.dataio.open_pubmed(pmid)[source]

Opens PubMed record in web browser.

@pmidstr or int

PubMed ID

pypath.dataio.pdzbase_interactions()[source]

Downloads data from PDZbase. Parses data from the HTML tables.

pypath.dataio.phosphatome_annotations()[source]

Downloads the list of phosphatases from Chen et al, Science Signaling (2017) Table S1.

pypath.dataio.phosphosite_directions(organism='human')[source]

From curated and HTP PhosphoSite data generates a list of directions.

pypath.dataio.protmapper_ptms(only_evidences=None, only_literature=False, interactions=False)[source]
Parameters

only_evidences (str,set,NoneType) – Keep only the interactions with these evidence type, e.g. VALID. See the ‘descriptions’ column in the ‘evidences.csv’ supplementary table.

pypath.dataio.ptm_orthology()[source]

Returns an orthology translation dict of phosphosites based on phosphorylation sites table from PhosphoSitePlus. In the result all PTMs represented by a tuple of the following 6 elements: UniProt ID, isoform (int), residue one letter code, residue number (int), NCBI Taxonomy ID (int), modification type.

Parameters
  • source (int) – Source taxon (NCBI Taxonomy).

  • target (int) – Target taxon (NCBI Taxonomy).

pypath.dataio.ramilowski_interactions(putative=False)[source]

Downloads and processes ligand-receptor interactions from Supplementary Table 2 of Ramilowski 2015.

pypath.dataio.reactions_biopax(biopax_file, organism=9606, protein_name_type='UniProt', clean=True)[source]

Processes a BioPAX file and extracts binary interactions.

pypath.dataio.reactome_biopax(organism=9606, cache=True)[source]

Downloads Reactome human reactions in SBML format. Returns File object.

pypath.dataio.reactome_interactions(cacheFile=None, **kwargs)[source]

Downloads and processes Reactome BioPAX. Extracts binary interactions. The applied criteria are very stringent, yields very few interactions. Requires large free memory, approx. 2G.

pypath.dataio.reactome_sbml()[source]

Downloads Reactome human reactions in SBML format. Returns gzip.GzipFile object.

pypath.dataio.read_table(cols, fileObject=None, data=None, sep='\t', sep2=None, rem=[], hdr=None, encoding='ascii')[source]

Generic function to read data tables.

fileObjectfile-like

Any file like object: file opened for read, or StringIO buffer

colsdict

Dictionary of columns to read. Keys identifying fields are returned in the result. Values are column numbers.

sepLevel1str

Field separator of the file.

sepLevel2dict

Subfield separators and prefixes. E.g. {2: ‘,’, 3: ‘|’}

hdrint

Number of header lines. If None, no headers assumed.

remlist

Strings to remove. For each line these elements will be replaced with ‘’.

pypath.dataio.read_xls(xls_file, sheet='', csv_file=None, return_table=True)[source]

Generic function to read MS Excel XLS file, and convert one sheet to CSV, or return as a list of lists

pypath.dataio.regsites_one_organism(organism=9606)[source]

Returns PhosphoSitePlus regulatory sites translated to one organism by orthology. Residue numbers will be translated where necessary, while gene symbols will be translated to UniProt IDs of the given organism. This works with human, mouse or rat.

Parameters

organism (int) – NCBI Taxonomy ID of the target organism. In this method possible values are human, mouse or rat, as these species provide the vast majority of the data, and are close enough to each other that the sites can be safely translated between orthologous proteins by sequence alignement.

pypath.dataio.regsites_tab(regsites, outfile=None)[source]

Exports PhosphoSite regulatory sites as a tabular file, all IDs translated to UniProt.

pypath.dataio.rolland_hi_ii_14()[source]

Loads the HI-II-14 unbiased interactome from the large scale screening of from Rolland 2014. Returns list of interactions.

Reads and processes SignaLink3 interactions from local file. Returns list of interactions.

pypath.dataio.signor_interactions(organism=9606, raw_records=False)[source]

Downloads the full dataset from Signor. Returns the records with the most important fields. IF raw_records is True it returns the table split to list of lists but unchanged content.

pypath.dataio.signor_pathways(**kwargs)[source]

Obtains pathway annotations from Signor.

pypath.dataio.surfaceome_annotations()[source]

Downloads the “In silico human surfaceome”. Dict with UniProt IDs as key and tuples of surface prediction score, class and subclass as values (columns B, N, S and T of table S3).

pypath.dataio.take_a_trip(cachefile=None)[source]

Downloads TRIP data from webpage and preprocesses it. Saves preprocessed data into cachefile and next time loads from this file.

Parameters

str (cachefile) – Path to pickle dump of preprocessed TRIP database. If does not exist the database will be downloaded and saved to this file. By default the path queried from the settings module.

pypath.dataio.tfregulons_interactions(levels={'A', 'B'}, only_curated=False)

Retrieves TF-target interactions from TF regulons.

Parameters
  • levels (set) – Confidence levels to be used.

  • only_curated (bool) – Retrieve only literature curated interactions.

TF regulons is a comprehensive resource of TF-target interactions combining multiple lines of evidences: literature curated databases, ChIP-Seq data, PWM based prediction using HOCOMOCO and JASPAR matrices and prediction from GTEx expression data by ARACNe.

For details see https://github.com/saezlab/DoRothEA.

pypath.dataio.trip_find_uniprot(soup)[source]

Looks up a UniProt name in table downloaded from TRIP webpage.

@soupbs4.BeautifulSoup

The BeautifulSoup instance returned by pypath.dataio.trip_get_uniprot().

pypath.dataio.trip_get_uniprot(syn)[source]

Downloads table from TRIP webpage and UniProt attempts to look up the UniProt ID for one synonym.

@synstr

The synonym as shown on TRIP webpage.

pypath.dataio.trip_interactions(exclude_methods=['Inference', 'Speculation'], predictions=False, species='Human', strict=False)[source]

Obtains processed TRIP interactions by calling pypath.dataio.trip_process() and returns list of interactions. All arguments are passed to trip_process(), see their definition there.

pypath.dataio.trip_process(exclude_methods=['Inference', 'Speculation'], predictions=False, species='Human', strict=False)[source]

Downloads TRIP data by calling pypath.dadio.take_a_trip() and further provcesses it. Returns dict of dict with TRIP data.

@exclude_methodslist

Interaction detection methods to be discarded.

@predictionsbool

Whether to include predicted interactions.

@speciesstr

Organism name, e.g. Human.

@strictbool

Whether include interactions with species not used as a bait or not specified.

pypath.dataio.trip_process_table(tab, result, intrs, trp_uniprot)[source]

Processes one HTML table downloaded from TRIP webpage.

@tabbs4.element.Tag()

One table of interactions from TRIP webpage.

@resultdict

Dictionary the data should be filled in.

@intrsdict

Dictionary of already converted interactor IDs. This serves as a cache so do not need to look up the same ID twice.

@trp_uniprotstr

UniProt ID of TRP domain containing protein.

pypath.dataio.vidal_hi_iii_old(fname)[source]

Loads the HI-III unbiased interactome from preliminary data of the next large scale screening of Vidal Lab.

The data is accessible here:

http://interactome.dfci.harvard.edu/H_sapiens/dload_trk.php

You need to register and accept the license terms.

Returns list of interactions.

pypath.dataio.wang_interactions()[source]

Downloads and processes Wang Lab HumanSignalingNetwork. Returns list of interactions.

pypath.dataio.zhong2015_annotations()[source]

From 10.1111/nyas.12776 (PMID 25988664).

descriptions

pypath.descriptions.gen_html()[source]

Generates a HTML page from the descriptions array. This HTML is provided by the webservice under /info, or can be saved locally with write_html().

pypath.descriptions.write_html(filename='resources.html')[source]

Saves the HTML descriptions to custom local file.

entity

Provides classes for representing molecular entities and their collections. A molecular entity is defined by its identifier, type and taxon.

class pypath.entity.Entity(identifier, entity_type='protein', id_type='uniprot', taxon=9606, attrs=None)[source]

Represents a molecular entity such as protein, miRNA, lncRNA or small molecule.

Parameters
  • identifier (str) – An identifier from the reference database e.g. UniProt ID for proteins.

  • entity_type (str) – The type of the molecular entity, defaults to 'protein'.

  • id_type (str) – The type of the identifier (the reference database), default is 'uniprot'.

  • taxon (int) – The NCBI Taxonomy Identifier of the molecular entity, e.g. 9606 for human. Use 0 for non taxon specific molecules e.g. metabolites or drug compounds.

  • attrs (NoneType,dict) – A dictionary of additional attributes.

class pypath.entity.EntityKey(identifier, id_type, entity_type, taxon)
entity_type

Alias for field number 2

id_type

Alias for field number 1

identifier

Alias for field number 0

taxon

Alias for field number 3

evidence

Provides classes for representing and processing evidences supporting relationships. The evidences hold information about the databases and literature references, they can be organized into collections. A number of operations are available on evidences and their collections, for example they can be combined or filtered.

class pypath.evidence.Evidence(resource, references=None)[source]

Represents an evidence supporting a relationship such as molecular interaction, molecular complex, enzyme-PTM interaction, annotation, etc.

The evidence consists of two main parts: the database and the literature references. If a relationship is supprted by multiple databases, for each one Evidence object should be created and

Parameters
  • resource (pypath.resource.ResourceAttributes) – An object derived from pypath.resource.ResourceAttributes.

  • references (str,list,set,NoneType) – Optional, one or more literature references (preferably PubMed IDs).

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.

merge(other)[source]

Merges two evidences. Returns set of either one or two evidences depending on whether the two evidences are from the same resource.

reload()[source]

Reloads the object from the module level.

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

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.

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.

reload()[source]

Reloads the object from the module level.

export

go

pypath.go.annotate(graph, organism=9606, aspects=('C', 'F', 'P'))[source]

Adds Gene Ontology annotations to the nodes of a graph.

Parameters

graph (igraph.Graph) – Any igraph.Graph object with uniprot IDs in its name vertex attribute.

pypath.go.get_db(organism=9606, pickle_file=None, use_pickle_cache=True)[source]

Retrieves the current database instance and initializes it if does not exist yet.

pypath.go.init_db(organism=9606, pickle_file=None, use_pickle_cache=True)[source]

Initializes or reloads the GO annotation database. The database will be assigned to the db attribute of this module.

pypath.go.load_go(graph, organism=9606, aspects=('C', 'F', 'P'))

Adds Gene Ontology annotations to the nodes of a graph.

Parameters

graph (igraph.Graph) – Any igraph.Graph object with uniprot IDs in its name vertex attribute.

homology

input_formats

interaction

Here we define one class, the Interaction` which provides a rich API for representing and querying molecular interactions. The interactions serve as the building elements of the network and the pypath.network.Network object largely relies on methods of the Interaction` objects.

class pypath.interaction.Interaction(a, b, id_type_a='uniprot', id_type_b='uniprot', entity_type_a='protein', entity_type_b='protein', taxon_a=9606, taxon_b=9606)[source]

Represents a unique pair of molecular entities interacting with each other. One Interaction object might represent multiple interactions i.e. with different direction or effect or type (e.g. transcriptional regulation and post-translational regulation), each supported by different evidences.

Parameters
  • a,b (str,pypath.entity.Entity) – The two interacting partners. If an pypath.entity.Entity objects provided the other attributes (entity_type, id_type, taxon) will be ignored.

  • id_type_a,id_type_b (str) – The identifier types for partner a and b e.g. 'uniprot'.

  • entity_type_a,entity_type_b (str) – The types of the molecular entities a and b e.g. 'protein'.

  • taxon_a,taxon_b (int) – The NCBI Taxonomy Identifiers of partner a and b e.g. 9606 for human.

Details

The arguments a and b will be assigned to the attribute a and b in an alphabetical order, hence it’s possible that argument a becomes attribute b.

add_evidence(evidence, direction='undirected', effect=0, references=None)[source]

Adds directionality information with the corresponding data source named. Modifies self attributes dirs and sources.

Parameters
  • evidence (resource.NetworkResource,evidence.Evidence) – Either a pypath.evidence.Evidence object or a resource as pypath.resource.NetworkResource object. In the latter case the references can be provided in a separate argument.

  • direction (tuple) – Or [str], the directionality key for which the value on dirs has to be set True.

  • effect (int) – The causal effect of the interaction. 1 or ‘stimulation’ corresponds to a stimulatory, -1 or ‘inhibition’ to an inhibitory while 0 to an unknown or neutral effect.

  • references (set,NoneType) – A set of references, used only if the resource have been provided as NetworkResource object.

add_sign(direction, sign, resource=None, resource_name=None, interaction_type='PPI', data_model=None, **kwargs)[source]

Sets sign and source information on a given direction of the edge. Modifies the attributes positive and positive_sources or negative and negative_sources depending on the sign. Direction is also updated accordingly, which also modifies the attributes dirs and sources.

Parameters
  • direction (tuple) – Pair of edge nodes specifying the direction from which the information is to be set/updated.

  • sign (str) – Specifies the type of interaction. Either 'positive' or 'negative'.

  • resource (set) – Contains the name(s) of the source(s) from which the information was obtained.

  • **kwargs

    Passed to pypath.resource.NetworkResource if resource is not already a NetworkResource or Evidence instance.

complex_identifiers_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

complex_identifiers_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

complex_identifiers_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

complex_identifiers_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

complex_identifiers_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

complex_identifiers_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

complex_labels_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

complex_labels_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

complex_labels_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

complex_labels_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

complex_labels_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

complex_labels_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

complexes_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

complexes_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

complexes_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

complexes_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

complexes_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

complexes_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

consensus(only_interaction_type=None, only_primary=False, by_references=False, by_reference_resource_pairs=True)[source]

Infers the consensus edge(s) according to the number of supporting sources. This includes direction and sign.

Returns

(list) – Contains the consensus edge(s) along with the consensus sign. If there is no major directionality, both are returned. The structure is as follows: ['<source>', '<target>', '<(un)directed>', '<sign>']

consensus_edges(only_interaction_type=None, only_primary=False, by_references=False, by_reference_resource_pairs=True)

Infers the consensus edge(s) according to the number of supporting sources. This includes direction and sign.

Returns

(list) – Contains the consensus edge(s) along with the consensus sign. If there is no major directionality, both are returned. The structure is as follows: ['<source>', '<target>', '<(un)directed>', '<sign>']

count_complex_identifiers(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

count_complex_labels(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

count_complexes(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

count_data_models(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves data models matching the criteria.

count_degrees_directed(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

count_degrees_directed_in(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

count_degrees_directed_out(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

count_degrees_negative(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

count_degrees_negative_in(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

count_degrees_negative_out(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

count_degrees_non_directed(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

count_degrees_positive(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

count_degrees_positive_in(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

count_degrees_positive_out(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

count_degrees_signed(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

count_degrees_signed_in(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

count_degrees_signed_out(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

count_degrees_undirected(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

count_entities(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

count_identifiers(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

count_interaction_types(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves interaction types matching the criteria.

count_interactions(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns one or two tuples of the interacting partners: one if only one direction, two if both directions match the query criteria. The tuple will be empty if no evidence matches the criteria.

Parameters
  • direction (NontType,bool,tuple) – If None both undirected and directed, if True only directed, if a tuple of entities only the interactions with that specific direction will be considered. Unless you set this parameter to True this method will return both directions if one or more undirected resources present. If False, only the undirected interactions will be considered, and if any resource annotates this interaction as undirected both directions will be returned. However the count_interactions_undirected method will return 1 in this case.

  • effect (NoneType,bool,str) – If None also interactions without effect, if True only the ones with any effect, if a string naming an effect only the interactions with that specific effect will be considered.

  • resources (NontType,str,set) – Optionally limit the query to one or more resources.

  • data_model (NontType,str,set) – Optionally limit the query to one or more data models e.g. activity_flow.

  • interaction_type (NontType,str,set) – Optionally limit the query to one or more interaction types e.g. PPI.

  • via (NontType,bool,str,set) – Optionally limit the query to certain secondary databases or if False consider only data from primary databases.

count_interactions_0(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns unique interacting pairs without being aware of the direction.

count_interactions_directed(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

**kwargs: see the docs of method get_interactions.

count_interactions_mutual(**kwargs)[source]

Note: undirected interactions does not count as mutual but only interactions with explicit direction information for both directions.

**kwargs: see the docs of method get_interactions.

count_interactions_negative(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

**kwargs: see the docs of method get_interactions.

count_interactions_non_directed(**kwargs)[source]

Returns True if any resource annotates this interaction without and no resource with direction.

**kwargs: see the docs of method get_interactions.

count_interactions_positive(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

**kwargs: see the docs of method get_interactions.

count_interactions_signed(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

**kwargs: see the docs of method get_interactions.

count_interactions_undirected(**kwargs)[source]

Returns True if any resource annotates this interaction without direction.

**kwargs: see the docs of method get_interactions.

count_labels(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

count_mirna_identifiers(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

count_mirna_labels(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

count_mirnas(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

count_protein_identifiers(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

count_protein_labels(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

count_proteins(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

count_references(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves references matching the criteria.

count_resource_names(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves resource names matching the criteria.

count_resource_names_via(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves resource names via matching the criteria.

count_resources(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves resources matching the criteria.

count_resources_via(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves resources via matching the criteria.

count_small_molecule_identifiers(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

count_small_molecule_labels(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

count_small_molecules(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

data_models_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves data models matching the criteria.

data_models_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves data models matching the criteria.

data_models_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves data models matching the criteria.

data_models_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves data models matching the criteria.

data_models_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves data models matching the criteria.

data_models_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves data models matching the criteria.

degrees_directed_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_directed_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_directed_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_directed_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_directed_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_directed_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_directed_in_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_directed_in_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_directed_in_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_directed_in_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_directed_in_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_directed_in_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_directed_out_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_directed_out_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_directed_out_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_directed_out_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_directed_out_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_directed_out_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_negative_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_negative_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_negative_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_negative_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_negative_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_negative_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_negative_in_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_negative_in_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_negative_in_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_negative_in_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_negative_in_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_negative_in_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_negative_out_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_negative_out_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_negative_out_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_negative_out_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_negative_out_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_negative_out_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_non_directed_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_non_directed_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_non_directed_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_non_directed_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_non_directed_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_non_directed_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_positive_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_positive_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_positive_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_positive_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_positive_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_positive_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_positive_in_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_positive_in_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_positive_in_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_positive_in_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_positive_in_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_positive_in_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_positive_out_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_positive_out_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_positive_out_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_positive_out_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_positive_out_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_positive_out_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_signed_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_signed_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_signed_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_signed_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_signed_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_signed_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_signed_in_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_signed_in_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_signed_in_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_signed_in_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_signed_in_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_signed_in_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_signed_out_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_signed_out_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_signed_out_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_signed_out_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_signed_out_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_signed_out_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_undirected_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_undirected_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_undirected_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_undirected_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_undirected_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

degrees_undirected_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

entities_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

entities_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

entities_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

entities_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

entities_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

entities_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

evaluate_evidences(this_direction, direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)[source]

Selects the evidence collections matching the direction and effect criteria and then evaluates if any of the evidences in these collections match the evidence criteria.

generate_df_records(by_source=False, with_references=False)[source]

Yields interaction records. It is a generator because one edge can be represented by one or more records depending on the signs and directions and other parameters

Parameters
  • by_source (bool) – Yield separate records by resources. This way the node pairs will be redundant and you need to group later if you want unique interacting pairs. By default is False because for most applications unique interactions are preferred. If False the refrences field will still be present but with None values.

  • with_references (bool) – Include the literature references. By default is False because you rarely need these and they increase the data size significantly.

get_complex_identifiers(entity_type=None, direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None, return_type=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

get_complex_labels(entity_type=None, direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None, return_type=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

get_complexes(entity_type=None, direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None, return_type=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

get_data_models(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves data models matching the criteria.

get_degrees(mode, direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)[source]

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

get_degrees_directed(direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

get_degrees_directed_in(direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

get_degrees_directed_out(direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

get_degrees_negative(direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

get_degrees_negative_in(direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

get_degrees_negative_out(direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

get_degrees_non_directed(direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

get_degrees_positive(direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

get_degrees_positive_in(direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

get_degrees_positive_out(direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

get_degrees_signed(direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

get_degrees_signed_in(direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

get_degrees_signed_out(direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

get_degrees_undirected(direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns a set of nodes with the connections matching the direction, effect and evidence criteria. E.g. if the query concerns the incoming degrees with positive effect and the matching evidences show A activates B, but not the other way around, only “B” will be returned.

Parameters

mode (str) – The type of degrees to be considered. Three possible values are 'IN', ‘OUT’` and 'ALL' for incoming, outgoing and all connections, respectively. If the direction is False the only possible mode is ALL. If the direction is None and also directed evidence(s) match the criteria these will overwrite the undirected evidences and only the directed result will be returned.

get_direction(direction, resources=False, evidences=False, sources=False, resource_names=False)[source]

Returns the state (or resources if specified) of the given direction.

Parameters
  • direction (tuple) – Or [str] (if 'undirected'). Pair of nodes from which direction information is to be retrieved.

  • resources (bool) – Optional, 'False' by default. Specifies if the resources information of the given direction is to be retrieved instead.

Returns

(bool or set) – (if resources=True). Presence/absence of the requested direction (or the list of resources if specified). Returns None if direction is not valid.

get_directions(src, tgt, resources=False, evidences=False, resource_names=False, sources=False)[source]

Returns all directions with boolean values or list of sources.

Parameters
  • src (str) – Source node.

  • tgt (str) – Target node.

  • resources (bool) – Optional, False by default. Specifies whether to return the resources attribute instead of dirs.

Returns

Contains the dirs (or resources if specified) of the given edge.

get_entities(entity_type=None, direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None, return_type=None)[source]

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

get_identifiers(entity_type=None, direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None, return_type=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

get_interaction_types(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves interaction types matching the criteria.

get_interactions(direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)[source]

Returns one or two tuples of the interacting partners: one if only one direction, two if both directions match the query criteria. The tuple will be empty if no evidence matches the criteria.

Parameters
  • direction (NontType,bool,tuple) – If None both undirected and directed, if True only directed, if a tuple of entities only the interactions with that specific direction will be considered. Unless you set this parameter to True this method will return both directions if one or more undirected resources present. If False, only the undirected interactions will be considered, and if any resource annotates this interaction as undirected both directions will be returned. However the count_interactions_undirected method will return 1 in this case.

  • effect (NoneType,bool,str) – If None also interactions without effect, if True only the ones with any effect, if a string naming an effect only the interactions with that specific effect will be considered.

  • resources (NontType,str,set) – Optionally limit the query to one or more resources.

  • data_model (NontType,str,set) – Optionally limit the query to one or more data models e.g. activity_flow.

  • interaction_type (NontType,str,set) – Optionally limit the query to one or more interaction types e.g. PPI.

  • via (NontType,bool,str,set) – Optionally limit the query to certain secondary databases or if False consider only data from primary databases.

get_interactions_0(**kwargs)[source]

Returns unique interacting pairs without being aware of the direction.

get_interactions_directed(**kwargs)[source]

**kwargs: see the docs of method get_interactions.

get_interactions_mutual(**kwargs)[source]

Note: undirected interactions does not count as mutual but only interactions with explicit direction information for both directions.

**kwargs: see the docs of method get_interactions.

get_interactions_negative(**kwargs)[source]

**kwargs: see the docs of method get_interactions.

get_interactions_non_directed(**kwargs)[source]

Only the undirected interactions will be considered, if any resource annotates this interaction as undirected both directions will be returned, but only if no resource provide direction. However the count_interactions_non_directed method will return 1 in this case.

**kwargs: see the docs of method get_interactions.

get_interactions_non_directed_0(**kwargs)[source]

Only the undirected interactions will be considered, if any resource annotates this interaction as undirected and none as directed, the interacting pair as a sorted tuple will be returned inside a one element tuple.

**kwargs: see the docs of method get_interactions.

get_interactions_positive(**kwargs)[source]

**kwargs: see the docs of method get_interactions.

get_interactions_signed(**kwargs)[source]

**kwargs: see the docs of method get_interactions.

get_interactions_undirected(**kwargs)[source]

Only the undirected interactions will be considered, if any resource annotates this interaction as undirected both directions will be returned, no matter if certain resources provide direction. However the count_interactions_undirected method will return 1 in this case.

**kwargs: see the docs of method get_interactions.

get_interactions_undirected_0(**kwargs)[source]

Only the undirected interactions will be considered, if any resource annotates this interaction as undirected the interacting pair as a sorted tuple will be returned inside a one element tuple.

**kwargs: see the docs of method get_interactions.

get_labels(entity_type=None, direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None, return_type=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

get_mirna_identifiers(entity_type=None, direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None, return_type=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

get_mirna_labels(entity_type=None, direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None, return_type=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

get_mirnas(entity_type=None, direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None, return_type=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

get_protein_identifiers(entity_type=None, direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None, return_type=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

get_protein_labels(entity_type=None, direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None, return_type=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

get_proteins(entity_type=None, direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None, return_type=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

get_references(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves references matching the criteria.

get_resource_names(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves resource names matching the criteria.

get_resource_names_via(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves resource names via matching the criteria.

get_resources(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves resources matching the criteria.

get_resources_via(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves resources via matching the criteria.

get_sign(direction, sign=None, evidences=False, resources=False, resource_names=False, sources=False)[source]

Retrieves the sign information of the edge in the given diretion. If specified in sign, only that sign’s information will be retrieved. If specified in sources, the sources of that information will be retrieved instead.

Parameters
  • direction (tuple) – Contains the pair of nodes specifying the directionality of the edge from which th information is to be retrieved.

  • sign (str) – Optional, None by default. Denotes whether to retrieve the 'positive' or 'negative' specific information.

  • resources (bool) – Optional, False by default. Specifies whether to return the resources instead of sign.

Returns

(list) – If sign=None containing [bool] values denoting the presence of positive and negative sign on that direction, if sources=True the [set] of sources for each of them will be returned instead. If sign is specified, returns [bool] or [set] (if sources=True) of that specific direction and sign.

get_small_molecule_identifiers(entity_type=None, direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None, return_type=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

get_small_molecule_labels(entity_type=None, direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None, return_type=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

get_small_molecules(entity_type=None, direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None, return_type=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

has_sign(direction=None, resources=None)[source]

Checks whether the edge (or for a specific direction) has any signed information (about positive/negative interactions).

Parameters

direction (tuple) – Optional, None by default. If specified, only the information of that direction is checked for sign.

Returns

(bool) – True if there exist any information on the

sign of the interaction, False otherwise.

identifiers_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

identifiers_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

identifiers_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

identifiers_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

identifiers_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

identifiers_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

interaction_types_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves interaction types matching the criteria.

interaction_types_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves interaction types matching the criteria.

interaction_types_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves interaction types matching the criteria.

interaction_types_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves interaction types matching the criteria.

interaction_types_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves interaction types matching the criteria.

interaction_types_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves interaction types matching the criteria.

interactions_0_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns unique interacting pairs without being aware of the direction.

interactions_0_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns unique interacting pairs without being aware of the direction.

interactions_0_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns unique interacting pairs without being aware of the direction.

interactions_0_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns unique interacting pairs without being aware of the direction.

interactions_0_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns unique interacting pairs without being aware of the direction.

interactions_0_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns unique interacting pairs without being aware of the direction.

interactions_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns one or two tuples of the interacting partners: one if only one direction, two if both directions match the query criteria. The tuple will be empty if no evidence matches the criteria.

Parameters
  • direction (NontType,bool,tuple) – If None both undirected and directed, if True only directed, if a tuple of entities only the interactions with that specific direction will be considered. Unless you set this parameter to True this method will return both directions if one or more undirected resources present. If False, only the undirected interactions will be considered, and if any resource annotates this interaction as undirected both directions will be returned. However the count_interactions_undirected method will return 1 in this case.

  • effect (NoneType,bool,str) – If None also interactions without effect, if True only the ones with any effect, if a string naming an effect only the interactions with that specific effect will be considered.

  • resources (NontType,str,set) – Optionally limit the query to one or more resources.

  • data_model (NontType,str,set) – Optionally limit the query to one or more data models e.g. activity_flow.

  • interaction_type (NontType,str,set) – Optionally limit the query to one or more interaction types e.g. PPI.

  • via (NontType,bool,str,set) – Optionally limit the query to certain secondary databases or if False consider only data from primary databases.

interactions_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns one or two tuples of the interacting partners: one if only one direction, two if both directions match the query criteria. The tuple will be empty if no evidence matches the criteria.

Parameters
  • direction (NontType,bool,tuple) – If None both undirected and directed, if True only directed, if a tuple of entities only the interactions with that specific direction will be considered. Unless you set this parameter to True this method will return both directions if one or more undirected resources present. If False, only the undirected interactions will be considered, and if any resource annotates this interaction as undirected both directions will be returned. However the count_interactions_undirected method will return 1 in this case.

  • effect (NoneType,bool,str) – If None also interactions without effect, if True only the ones with any effect, if a string naming an effect only the interactions with that specific effect will be considered.

  • resources (NontType,str,set) – Optionally limit the query to one or more resources.

  • data_model (NontType,str,set) – Optionally limit the query to one or more data models e.g. activity_flow.

  • interaction_type (NontType,str,set) – Optionally limit the query to one or more interaction types e.g. PPI.

  • via (NontType,bool,str,set) – Optionally limit the query to certain secondary databases or if False consider only data from primary databases.

interactions_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns one or two tuples of the interacting partners: one if only one direction, two if both directions match the query criteria. The tuple will be empty if no evidence matches the criteria.

Parameters
  • direction (NontType,bool,tuple) – If None both undirected and directed, if True only directed, if a tuple of entities only the interactions with that specific direction will be considered. Unless you set this parameter to True this method will return both directions if one or more undirected resources present. If False, only the undirected interactions will be considered, and if any resource annotates this interaction as undirected both directions will be returned. However the count_interactions_undirected method will return 1 in this case.

  • effect (NoneType,bool,str) – If None also interactions without effect, if True only the ones with any effect, if a string naming an effect only the interactions with that specific effect will be considered.

  • resources (NontType,str,set) – Optionally limit the query to one or more resources.

  • data_model (NontType,str,set) – Optionally limit the query to one or more data models e.g. activity_flow.

  • interaction_type (NontType,str,set) – Optionally limit the query to one or more interaction types e.g. PPI.

  • via (NontType,bool,str,set) – Optionally limit the query to certain secondary databases or if False consider only data from primary databases.

interactions_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns one or two tuples of the interacting partners: one if only one direction, two if both directions match the query criteria. The tuple will be empty if no evidence matches the criteria.

Parameters
  • direction (NontType,bool,tuple) – If None both undirected and directed, if True only directed, if a tuple of entities only the interactions with that specific direction will be considered. Unless you set this parameter to True this method will return both directions if one or more undirected resources present. If False, only the undirected interactions will be considered, and if any resource annotates this interaction as undirected both directions will be returned. However the count_interactions_undirected method will return 1 in this case.

  • effect (NoneType,bool,str) – If None also interactions without effect, if True only the ones with any effect, if a string naming an effect only the interactions with that specific effect will be considered.

  • resources (NontType,str,set) – Optionally limit the query to one or more resources.

  • data_model (NontType,str,set) – Optionally limit the query to one or more data models e.g. activity_flow.

  • interaction_type (NontType,str,set) – Optionally limit the query to one or more interaction types e.g. PPI.

  • via (NontType,bool,str,set) – Optionally limit the query to certain secondary databases or if False consider only data from primary databases.

interactions_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns one or two tuples of the interacting partners: one if only one direction, two if both directions match the query criteria. The tuple will be empty if no evidence matches the criteria.

Parameters
  • direction (NontType,bool,tuple) – If None both undirected and directed, if True only directed, if a tuple of entities only the interactions with that specific direction will be considered. Unless you set this parameter to True this method will return both directions if one or more undirected resources present. If False, only the undirected interactions will be considered, and if any resource annotates this interaction as undirected both directions will be returned. However the count_interactions_undirected method will return 1 in this case.

  • effect (NoneType,bool,str) – If None also interactions without effect, if True only the ones with any effect, if a string naming an effect only the interactions with that specific effect will be considered.

  • resources (NontType,str,set) – Optionally limit the query to one or more resources.

  • data_model (NontType,str,set) – Optionally limit the query to one or more data models e.g. activity_flow.

  • interaction_type (NontType,str,set) – Optionally limit the query to one or more interaction types e.g. PPI.

  • via (NontType,bool,str,set) – Optionally limit the query to certain secondary databases or if False consider only data from primary databases.

interactions_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Returns one or two tuples of the interacting partners: one if only one direction, two if both directions match the query criteria. The tuple will be empty if no evidence matches the criteria.

Parameters
  • direction (NontType,bool,tuple) – If None both undirected and directed, if True only directed, if a tuple of entities only the interactions with that specific direction will be considered. Unless you set this parameter to True this method will return both directions if one or more undirected resources present. If False, only the undirected interactions will be considered, and if any resource annotates this interaction as undirected both directions will be returned. However the count_interactions_undirected method will return 1 in this case.

  • effect (NoneType,bool,str) – If None also interactions without effect, if True only the ones with any effect, if a string naming an effect only the interactions with that specific effect will be considered.

  • resources (NontType,str,set) – Optionally limit the query to one or more resources.

  • data_model (NontType,str,set) – Optionally limit the query to one or more data models e.g. activity_flow.

  • interaction_type (NontType,str,set) – Optionally limit the query to one or more interaction types e.g. PPI.

  • via (NontType,bool,str,set) – Optionally limit the query to certain secondary databases or if False consider only data from primary databases.

interactions_directed_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

**kwargs: see the docs of method get_interactions.

interactions_directed_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

**kwargs: see the docs of method get_interactions.

interactions_directed_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

**kwargs: see the docs of method get_interactions.

interactions_directed_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

**kwargs: see the docs of method get_interactions.

interactions_directed_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

**kwargs: see the docs of method get_interactions.

interactions_directed_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

**kwargs: see the docs of method get_interactions.

interactions_mutual_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Note: undirected interactions does not count as mutual but only interactions with explicit direction information for both directions.

**kwargs: see the docs of method get_interactions.

interactions_mutual_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Note: undirected interactions does not count as mutual but only interactions with explicit direction information for both directions.

**kwargs: see the docs of method get_interactions.

interactions_mutual_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Note: undirected interactions does not count as mutual but only interactions with explicit direction information for both directions.

**kwargs: see the docs of method get_interactions.

interactions_mutual_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Note: undirected interactions does not count as mutual but only interactions with explicit direction information for both directions.

**kwargs: see the docs of method get_interactions.

interactions_mutual_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Note: undirected interactions does not count as mutual but only interactions with explicit direction information for both directions.

**kwargs: see the docs of method get_interactions.

interactions_mutual_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Note: undirected interactions does not count as mutual but only interactions with explicit direction information for both directions.

**kwargs: see the docs of method get_interactions.

interactions_negative_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

**kwargs: see the docs of method get_interactions.

interactions_negative_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

**kwargs: see the docs of method get_interactions.

interactions_negative_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

**kwargs: see the docs of method get_interactions.

interactions_negative_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

**kwargs: see the docs of method get_interactions.

interactions_negative_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

**kwargs: see the docs of method get_interactions.

interactions_negative_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

**kwargs: see the docs of method get_interactions.

interactions_non_directed_0_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Only the undirected interactions will be considered, if any resource annotates this interaction as undirected and none as directed, the interacting pair as a sorted tuple will be returned inside a one element tuple.

**kwargs: see the docs of method get_interactions.

interactions_non_directed_0_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Only the undirected interactions will be considered, if any resource annotates this interaction as undirected and none as directed, the interacting pair as a sorted tuple will be returned inside a one element tuple.

**kwargs: see the docs of method get_interactions.

interactions_non_directed_0_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Only the undirected interactions will be considered, if any resource annotates this interaction as undirected and none as directed, the interacting pair as a sorted tuple will be returned inside a one element tuple.

**kwargs: see the docs of method get_interactions.

interactions_non_directed_0_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Only the undirected interactions will be considered, if any resource annotates this interaction as undirected and none as directed, the interacting pair as a sorted tuple will be returned inside a one element tuple.

**kwargs: see the docs of method get_interactions.

interactions_non_directed_0_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Only the undirected interactions will be considered, if any resource annotates this interaction as undirected and none as directed, the interacting pair as a sorted tuple will be returned inside a one element tuple.

**kwargs: see the docs of method get_interactions.

interactions_non_directed_0_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Only the undirected interactions will be considered, if any resource annotates this interaction as undirected and none as directed, the interacting pair as a sorted tuple will be returned inside a one element tuple.

**kwargs: see the docs of method get_interactions.

interactions_non_directed_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Only the undirected interactions will be considered, if any resource annotates this interaction as undirected both directions will be returned, but only if no resource provide direction. However the count_interactions_non_directed method will return 1 in this case.

**kwargs: see the docs of method get_interactions.

interactions_non_directed_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Only the undirected interactions will be considered, if any resource annotates this interaction as undirected both directions will be returned, but only if no resource provide direction. However the count_interactions_non_directed method will return 1 in this case.

**kwargs: see the docs of method get_interactions.

interactions_non_directed_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Only the undirected interactions will be considered, if any resource annotates this interaction as undirected both directions will be returned, but only if no resource provide direction. However the count_interactions_non_directed method will return 1 in this case.

**kwargs: see the docs of method get_interactions.

interactions_non_directed_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Only the undirected interactions will be considered, if any resource annotates this interaction as undirected both directions will be returned, but only if no resource provide direction. However the count_interactions_non_directed method will return 1 in this case.

**kwargs: see the docs of method get_interactions.

interactions_non_directed_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Only the undirected interactions will be considered, if any resource annotates this interaction as undirected both directions will be returned, but only if no resource provide direction. However the count_interactions_non_directed method will return 1 in this case.

**kwargs: see the docs of method get_interactions.

interactions_non_directed_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Only the undirected interactions will be considered, if any resource annotates this interaction as undirected both directions will be returned, but only if no resource provide direction. However the count_interactions_non_directed method will return 1 in this case.

**kwargs: see the docs of method get_interactions.

interactions_positive_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

**kwargs: see the docs of method get_interactions.

interactions_positive_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

**kwargs: see the docs of method get_interactions.

interactions_positive_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

**kwargs: see the docs of method get_interactions.

interactions_positive_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

**kwargs: see the docs of method get_interactions.

interactions_positive_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

**kwargs: see the docs of method get_interactions.

interactions_positive_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

**kwargs: see the docs of method get_interactions.

interactions_signed_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

**kwargs: see the docs of method get_interactions.

interactions_signed_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

**kwargs: see the docs of method get_interactions.

interactions_signed_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

**kwargs: see the docs of method get_interactions.

interactions_signed_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

**kwargs: see the docs of method get_interactions.

interactions_signed_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

**kwargs: see the docs of method get_interactions.

interactions_signed_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

**kwargs: see the docs of method get_interactions.

interactions_undirected_0_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Only the undirected interactions will be considered, if any resource annotates this interaction as undirected the interacting pair as a sorted tuple will be returned inside a one element tuple.

**kwargs: see the docs of method get_interactions.

interactions_undirected_0_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Only the undirected interactions will be considered, if any resource annotates this interaction as undirected the interacting pair as a sorted tuple will be returned inside a one element tuple.

**kwargs: see the docs of method get_interactions.

interactions_undirected_0_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Only the undirected interactions will be considered, if any resource annotates this interaction as undirected the interacting pair as a sorted tuple will be returned inside a one element tuple.

**kwargs: see the docs of method get_interactions.

interactions_undirected_0_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Only the undirected interactions will be considered, if any resource annotates this interaction as undirected the interacting pair as a sorted tuple will be returned inside a one element tuple.

**kwargs: see the docs of method get_interactions.

interactions_undirected_0_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Only the undirected interactions will be considered, if any resource annotates this interaction as undirected the interacting pair as a sorted tuple will be returned inside a one element tuple.

**kwargs: see the docs of method get_interactions.

interactions_undirected_0_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Only the undirected interactions will be considered, if any resource annotates this interaction as undirected the interacting pair as a sorted tuple will be returned inside a one element tuple.

**kwargs: see the docs of method get_interactions.

interactions_undirected_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Only the undirected interactions will be considered, if any resource annotates this interaction as undirected both directions will be returned, no matter if certain resources provide direction. However the count_interactions_undirected method will return 1 in this case.

**kwargs: see the docs of method get_interactions.

interactions_undirected_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Only the undirected interactions will be considered, if any resource annotates this interaction as undirected both directions will be returned, no matter if certain resources provide direction. However the count_interactions_undirected method will return 1 in this case.

**kwargs: see the docs of method get_interactions.

interactions_undirected_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Only the undirected interactions will be considered, if any resource annotates this interaction as undirected both directions will be returned, no matter if certain resources provide direction. However the count_interactions_undirected method will return 1 in this case.

**kwargs: see the docs of method get_interactions.

interactions_undirected_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Only the undirected interactions will be considered, if any resource annotates this interaction as undirected both directions will be returned, no matter if certain resources provide direction. However the count_interactions_undirected method will return 1 in this case.

**kwargs: see the docs of method get_interactions.

interactions_undirected_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Only the undirected interactions will be considered, if any resource annotates this interaction as undirected both directions will be returned, no matter if certain resources provide direction. However the count_interactions_undirected method will return 1 in this case.

**kwargs: see the docs of method get_interactions.

interactions_undirected_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Only the undirected interactions will be considered, if any resource annotates this interaction as undirected both directions will be returned, no matter if certain resources provide direction. However the count_interactions_undirected method will return 1 in this case.

**kwargs: see the docs of method get_interactions.

is_directed()[source]

Checks if edge has any directionality information.

Returns

(bool) – Returns True if any of the dirs attribute values is True (except 'undirected'), False otherwise.

is_directed_by_resources(resources=None)[source]

Checks if edge has any directionality information from some resource(s).

Returns

(bool) – Returns True if any of the dirs attribute values is True (except 'undirected'), False otherwise.

is_inhibition(direction=None, resources=None)[source]

Checks if any (or for a specific direction) interaction is inhibition (negative interaction).

Parameters

direction (tuple) – Optional, None by default. If specified, checks the negative attribute of that specific directionality. If not specified, checks both.

Returns

(bool) – True if any interaction (or the specified direction) is inhibitory (negative).

is_loop()[source]
Returns

True if the interaction is a loop edge i.e. its endpoints are the same node.

is_mutual(**kwargs)[source]

Note: undirected interactions does not count as mutual but only interactions with explicit direction information for both directions.

**kwargs: see the docs of method get_interactions.

is_mutual_by_resources(resources=None)[source]

Checks if the edge has mutual directions (both A–>B and B–>A) according to some resource(s).

is_stimulation(direction=None, resources=None)[source]

Checks if any (or for a specific direction) interaction is activation (positive interaction).

Parameters

direction (tuple) – Optional, None by default. If specified, checks the positive attribute of that specific directionality. If not specified, checks both.

Returns

(bool) – True if any interaction (or the specified direction) is activatory (positive).

iter_evidences(this_direction, direction=None, effect=None)[source]

Selects and yields evidence collections matching the direction and effect criteria.

iter_match_evidences(this_direction, direction=None, effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)[source]

Selects the evidence collections matching the direction and effect criteria and yields collections matching the evidence criteria.

labels_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

labels_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

labels_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

labels_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

labels_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

labels_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

majority_dir(only_interaction_type=None, only_primary=False, by_references=False, by_reference_resource_pairs=True)[source]

Infers which is the major directionality of the edge by number of supporting sources.

Returns

(tuple) – Contains the pair of nodes denoting the consensus directionality. If the number of sources on both directions is equal, None is returned. If there is no directionality information, 'undirected'` will be returned.

majority_sign(only_interaction_type=None, only_primary=False, by_references=False, by_reference_resource_pairs=True)[source]

Infers which is the major sign (activation/inhibition) of the edge by number of supporting sources on both directions.

Returns

(dict) – Keys are the node tuples on both directions (straight/reverse) and values can be either None if that direction has no sign information or a list of two [bool] elements corresponding to majority of positive and majority of negative support. In case both elements of the list are True, this means the number of supporting sources for both signs in that direction is equal.

merge(other)[source]

Merges current Interaction with another (if and only if they are the same class and contain the same nodes). Updates the attributes direction, positive and negative.

Parameters

other (pypath.interaction.Interaction) – The new Interaction object to be merged with the current one.

mirna_identifiers_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

mirna_identifiers_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

mirna_identifiers_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

mirna_identifiers_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

mirna_identifiers_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

mirna_identifiers_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

mirna_labels_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

mirna_labels_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

mirna_labels_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

mirna_labels_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

mirna_labels_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

mirna_labels_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

mirnas_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

mirnas_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

mirnas_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

mirnas_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

mirnas_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

mirnas_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

negative_a_b()[source]

Checks if the a_b directionality is a negative interaction.

Returns

(bool) – True if there is supporting information on the a_b direction of the edge as inhibition. False otherwise.

negative_b_a()[source]

Checks if the b_a directionality is a negative interaction.

Returns

(bool) – True if there is supporting information on the b_a direction of the edge as inhibition. False otherwise.

negative_resources_a_b(**kwargs)[source]

Retrieves the list of resources for the a_b direction and negative sign.

Returns

(set) – Contains the names of the resources supporting the a_b directionality of the edge with a negative sign.

negative_resources_b_a(**kwargs)[source]

Retrieves the list of resources for the b_a direction and negative sign.

Returns

(set) – Contains the names of the resources supporting the b_a directionality of the edge with a negative sign.

negative_reverse()

Checks if the b_a directionality is a negative interaction.

Returns

(bool) – True if there is supporting information on the b_a direction of the edge as inhibition. False otherwise.

negative_straight()

Checks if the a_b directionality is a negative interaction.

Returns

(bool) – True if there is supporting information on the a_b direction of the edge as inhibition. False otherwise.

positive_a_b()[source]

Checks if the a_b directionality is a positive interaction.

Returns

(bool) – True if there is supporting information on the a_b direction of the edge as activation. False otherwise.

positive_b_a()[source]

Checks if the b_a directionality is a positive interaction.

Returns

(bool) – True if there is supporting information on the b_a direction of the edge as activation. False otherwise.

positive_resources_a_b(**kwargs)[source]

Retrieves the list of resources for the a_b direction and positive sign.

Returns

(set) – Contains the names of the resources supporting the a_b directionality of the edge with a positive sign.

positive_resources_b_a(**kwargs)[source]

Retrieves the list of resources for the b_a direction and positive sign.

Returns

(set) – Contains the names of the resources supporting the b_a directionality of the edge with a positive sign.

positive_reverse()

Checks if the b_a directionality is a positive interaction.

Returns

(bool) – True if there is supporting information on the b_a direction of the edge as activation. False otherwise.

positive_straight()

Checks if the a_b directionality is a positive interaction.

Returns

(bool) – True if there is supporting information on the a_b direction of the edge as activation. False otherwise.

protein_identifiers_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

protein_identifiers_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

protein_identifiers_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

protein_identifiers_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

protein_identifiers_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

protein_identifiers_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

protein_labels_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

protein_labels_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

protein_labels_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

protein_labels_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

protein_labels_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

protein_labels_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

proteins_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

proteins_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

proteins_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

proteins_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

proteins_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

proteins_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

references_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves references matching the criteria.

references_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves references matching the criteria.

references_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves references matching the criteria.

references_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves references matching the criteria.

references_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves references matching the criteria.

references_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves references matching the criteria.

reload()[source]

Reloads the object from the module level.

resource_names_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves resource names matching the criteria.

resource_names_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves resource names matching the criteria.

resource_names_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves resource names matching the criteria.

resource_names_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves resource names matching the criteria.

resource_names_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves resource names matching the criteria.

resource_names_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves resource names matching the criteria.

resource_names_via_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves resource names via matching the criteria.

resource_names_via_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves resource names via matching the criteria.

resource_names_via_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves resource names via matching the criteria.

resource_names_via_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves resource names via matching the criteria.

resource_names_via_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves resource names via matching the criteria.

resource_names_via_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves resource names via matching the criteria.

resources_a_b(resources=False, evidences=False, resource_names=False, sources=False)[source]

Retrieves the list of resources for the a_b direction.

Returns

(set) – Contains the names of the sources supporting the a_b directionality of the edge.

resources_b_a(resources=False, evidences=False, resource_names=False, sources=False)[source]

Retrieves the list of sources for the b_a direction.

Returns

(set) – Contains the names of the sources supporting the b_a directionality of the edge.

resources_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves resources matching the criteria.

resources_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves resources matching the criteria.

resources_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves resources matching the criteria.

resources_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves resources matching the criteria.

resources_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves resources matching the criteria.

resources_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves resources matching the criteria.

resources_undirected(resources=False, evidences=False, resource_names=False, sources=False)[source]

Retrieves the list of resources without directed information.

Returns

(set) – Contains the names of the sources supporting the edge presence but without specific directionality information.

resources_via_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves resources via matching the criteria.

resources_via_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves resources via matching the criteria.

resources_via_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves resources via matching the criteria.

resources_via_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves resources via matching the criteria.

resources_via_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves resources via matching the criteria.

resources_via_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves resources via matching the criteria.

small_molecule_identifiers_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

small_molecule_identifiers_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

small_molecule_identifiers_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

small_molecule_identifiers_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

small_molecule_identifiers_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

small_molecule_identifiers_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

small_molecule_labels_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

small_molecule_labels_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

small_molecule_labels_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

small_molecule_labels_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

small_molecule_labels_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

small_molecule_labels_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

small_molecules_by_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

small_molecules_by_interaction_type(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

small_molecules_by_interaction_type_and_data_model(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

small_molecules_by_interaction_type_and_data_model_and_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

small_molecules_by_reference(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

small_molecules_by_resource(effect=None, resources=None, data_model=None, interaction_type=None, via=None, references=None)

Retrieves the entities involved in interactions matching the criteria. It either returns both interacting entities in a set or an empty set. This may not sound so useful at the level of this object but becomes more useful once we want to collect entities having certain kind of interactions across a series of Interaction objects.

Parameters
  • entity_type (str) – The type of the molecular entity. Possible values: protein, complex, mirna, small_molecule.

  • return_type (str) – The type of values to return. Default is py:class:pypath.entity.Entity objects, alternatives are labels identifiers.

source(undirected=False, resources=None, **kwargs)[source]

Returns the name(s) of the source node(s) for each existing direction on the interaction.

Parameters

undirected (bool) – Optional, False by default.

Returns

(list) – Contains the name(s) for the source node(s). This means if the interaction is bidirectional, the list will contain both identifiers on the edge. If the interaction is undirected, an empty list will be returned.

sources_reverse(resources=False, evidences=False, resource_names=False, sources=False)

Retrieves the list of sources for the b_a direction.

Returns

(set) – Contains the names of the sources supporting the b_a directionality of the edge.

sources_straight(resources=False, evidences=False, resource_names=False, sources=False)

Retrieves the list of resources for the a_b direction.

Returns

(set) – Contains the names of the sources supporting the a_b directionality of the edge.

sources_undirected(resources=False, evidences=False, resource_names=False, sources=False)

Retrieves the list of resources without directed information.

Returns

(set) – Contains the names of the sources supporting the edge presence but without specific directionality information.

src(undirected=False, resources=None, **kwargs)

Returns the name(s) of the source node(s) for each existing direction on the interaction.

Parameters

undirected (bool) – Optional, False by default.

Returns

(list) – Contains the name(s) for the source node(s). This means if the interaction is bidirectional, the list will contain both identifiers on the edge. If the interaction is undirected, an empty list will be returned.

src_by_resource(resource)[source]

Returns the name(s) of the source node(s) for each existing direction on the interaction for a specific resource.

Parameters

resource (str) – Name of the resource according to which the information is to be retrieved.

Returns

(list) – Contains the name(s) for the source node(s) according to the specified resource. This means if the interaction is bidirectional, the list will contain both identifiers on the edge. If the specified source is not found or invalid, an empty list will be returned.

target(undirected=False, resources=None, **kwargs)[source]

Returns the name(s) of the target node(s) for each existing direction on the interaction.

Parameters

undirected (bool) – Optional, False by default.

Returns

(list) – Contains the name(s) for the target node(s). This means if the interaction is bidirectional, the list will contain both identifiers on the edge. If the interaction is undirected, an empty list will be returned.

tgt(undirected=False, resources=None, **kwargs)

Returns the name(s) of the target node(s) for each existing direction on the interaction.

Parameters

undirected (bool) – Optional, False by default.

Returns

(list) – Contains the name(s) for the target node(s). This means if the interaction is bidirectional, the list will contain both identifiers on the edge. If the interaction is undirected, an empty list will be returned.

tgt_by_resource(resource)[source]

Returns the name(s) of the target node(s) for each existing direction on the interaction for a specific resource.

Parameters

resource (str) – Name of the resource according to which the information is to be retrieved.

Returns

(list) – Contains the name(s) for the target node(s) according to the specified resource. This means if the interaction is bidirectional, the list will contain both identifiers on the edge. If the specified source is not found or invalid, an empty list will be returned.

translate(ids, new_attrs=None)[source]

Translates the node names/identifiers according to the dictionary ids. Also is able to change attributes like id_type, taxon and entity_type.

Parameters
  • ids (dict) – Dictionary containing (at least) the current names of the nodes as keys and their translation as values.

  • new_attrs (dict) – Dictionary with new IDs as keys and their dicts of their new attributes as values. For any attribute not provided here the attributes from the original instance will be used. E.g. you can provide `{‘1956’: {‘id_type’: ‘entrez’}}’ if the new ID type for protein EGFR is Entrez Gene ID.

Returns

(pypath.main.Direction) – The copy of current edge object with translated node names.

unset_dir(direction, only_sign=False, resource=None, interaction_type=None, via=False, source=None)

Removes directionality and/or source information of the specified direction. Modifies attribute dirs and sources.

Parameters
  • direction (tuple) – Or [str] (if 'undirected') the pair of nodes specifying the directionality from which the information is to be removed.

  • resource (set) – Optional, None by default. If specified, determines which specific source(s) is(are) to be removed from sources attribute in the specified direction.

unset_direction(direction, only_sign=False, resource=None, interaction_type=None, via=False, source=None)[source]

Removes directionality and/or source information of the specified direction. Modifies attribute dirs and sources.

Parameters
  • direction (tuple) – Or [str] (if 'undirected') the pair of nodes specifying the directionality from which the information is to be removed.

  • resource (set) – Optional, None by default. If specified, determines which specific source(s) is(are) to be removed from sources attribute in the specified direction.

unset_interaction_type(interaction_type)[source]

Removes all evidences with a certain interaction_type.

unset_sign(direction, sign, resource=None, interaction_type=None, via=False, source=None)[source]

Removes sign and/or source information of the specified direction and sign. Modifies attribute positive and positive_sources or negative and negative_sources (or positive_attributes/negative_sources only if source=True).

Parameters
  • direction (tuple) – The pair of nodes specifying the directionality from which the information is to be removed.

  • sign (str) – Sign from which the information is to be removed. Must be either 'positive' or 'negative'.

  • source (set) – Optional, None by default. If specified, determines which source(s) is(are) to be removed from the sources in the specified direction and sign.

which_directions(resources=None, effect=None)[source]

Returns the pair(s) of nodes for which there is information about their directionality.

Parameters
  • effect (str) – Either positive or negative.

  • resources (str,set) – Limits the query to one or more resources. Optional.

Returns

(tuple) – Tuple of tuples with pairs of nodes where the first element is the source and the second is the target entity, according to the given resources and limited to the effect.

which_dirs(resources=None, effect=None)

Returns the pair(s) of nodes for which there is information about their directionality.

Parameters
  • effect (str) – Either positive or negative.

  • resources (str,set) – Limits the query to one or more resources. Optional.

Returns

(tuple) – Tuple of tuples with pairs of nodes where the first element is the source and the second is the target entity, according to the given resources and limited to the effect.

which_signs(resources=None, effect=None)[source]

Returns the pair(s) of nodes for which there is information about their effect signs.

Parameters
  • resources (str,set) – Limits the query to one or more resources. Optional.

  • effect (str) – Either positive or negative, limiting the query to positive or negative effects; for any other values effects of both signs will be returned.

Returns

(tuple) – Tuple of tuples with pairs of nodes where the first element is a tuple of the source and the target entity, while the second element is the effect sign, according to the given resources. E.g. (((‘A’, ‘B’), ‘positive’),)

class pypath.interaction.InteractionDataFrameRecord(id_a, id_b, type_a, type_b, directed, effect, type, dmodel, sources, references)
directed

Alias for field number 4

dmodel

Alias for field number 7

effect

Alias for field number 5

id_a

Alias for field number 0

id_b

Alias for field number 1

references

Alias for field number 9

sources

Alias for field number 8

type

Alias for field number 6

type_a

Alias for field number 2

type_b

Alias for field number 3

class pypath.interaction.InteractionKey(entity_a, entity_b)
entity_a

Alias for field number 0

entity_b

Alias for field number 1

intera

This module provides classes to represent and handle structural details of protein interactions i.e. residues, post-translational modifications, short motifs, domains, domain-motifs and domain-motif interactions, binding interfaces.

intercell_annot

pypath.intercell_annot.go_single_terms = {'C': {'axolemma', 'banded collagen fibril', 'cell junction', 'cell surface', 'clathrin-coated pit', 'collagen beaded filament', 'collagen network', 'complex of collagen trimers', 'cytoplasmic side of plasma membrane', 'elastic fiber', 'external side of plasma membrane', 'extracellular matrix', 'extracellular matrix of synaptic cleft', 'extracellular region', 'extracellular region part', 'extracellular vesicle', 'extrinsic component of plasma membrane', 'extrinsic component of postsynaptic density membrane', 'extrinsic component of presynaptic membrane', 'fibronectin fibril', 'immunological synapse', 'intrinsic component of plasma membrane', 'intrinsic component of postsynaptic density membrane', 'intrinsic component of presynaptic membrane', 'intrinsic component of synaptic vesicle membrane', 'neuron projection membrane', 'neuronal cell body membrane', 'photoreceptor inner segment membrane', 'photoreceptor outer segment membrane', 'plasma membrane', 'plasma membrane raft', 'postsynaptic density membrane', 'presynaptic active zone membrane', 'presynaptic endocytic zone', 'presynaptic endocytic zone membrane', 'presynaptic membrane', 'stereocilia coupling link', 'stereocilium membrane', 'synaptic vesicle', 'synaptic vesicle lumen', 'synaptic vesicle membrane'}, 'F': {'antigen binding', 'antioxidant activity', 'binding', 'cargo adaptor activity', 'cargo receptor activity', 'catalytic activity', 'catalytic activity, acting on a protein', 'cell adhesion mediator activity', 'channel activator activity', 'channel inhibitor activity', 'channel regulator activity', 'drug transmembrane transporter activity', 'enzyme activator activity', 'enzyme inhibitor activity', 'enzyme regulator activity', 'extracellular matrix binding', 'extracellular matrix structural constituent', 'hormone binding', 'hydroxyapatite binding', 'ion channel inhibitor activity', 'ion channel regulator activity', 'ion transmembrane transporter activity', 'molecular carrier activity', 'negative regulation of binding', 'negative regulation of catalytic activity', 'negative regulation of ion transmembrane transporter activity', 'negative regulation of molecular function', 'negative regulation of signaling receptor activity', 'negative regulation of transporter activity', 'neurotransmitter binding', 'neurotransmitter receptor regulator activity', 'peptidase activator activity', 'peptidase activity', 'peptidase inhibitor activity', 'peptidase regulator activity', 'positive regulation of binding', 'positive regulation of catalytic activity', 'positive regulation of ion transmembrane transporter activity', 'positive regulation of molecular function', 'positive regulation of signaling receptor activity', 'positive regulation of transporter activity', 'protein folding chaperone', 'receptor complex', 'receptor inhibitor activity', 'receptor ligand activity', 'receptor regulator activity', 'regulation of binding', 'regulation of catalytic activity', 'regulation of ion transmembrane transporter activity', 'regulation of molecular function', 'regulation of peptidase activity', 'regulation of signaling receptor activity', 'regulation of transmembrane transporter activity', 'regulation of transporter activity', 'signaling receptor activator activity', 'signaling receptor activity', 'structural constituent of bone', 'structural molecule activity', 'transforming growth factor beta receptor,cytoplasmic mediator activity', 'transmembrane transporter activity', 'transporter activity'}, 'P': {'autocrine signaling', 'cell activation', 'cell adhesion', 'cell adhesion molecule production', 'cell chemotaxis to fibroblast growth factor', 'cell communication', 'cell communication by chemical coupling', 'cell communication by electrical coupling', 'cell junction assembly', 'cell junction organization', 'cell-cell adhesion', 'cell-cell adhesion in response to extracellular stimulus', 'cell-cell recognition', 'cell-cell signaling', 'cell-cell signaling via exosome', 'cell-matrix recognition', 'cell-substrate adhesion', 'cellular response to cell-matrix adhesion', 'cellular response to extracellular stimulus', 'collagen metabolic process', 'connective tissue replacement', 'contact inhibition', 'cytokine production', 'cytokine secretion', 'endothelial cell activation', 'endothelial cell chemotaxis', 'endothelial cell migration', 'epithelial cell apoptotic process', 'epithelial cell migration', 'epithelial structure maintenance', 'epithelial-mesenchymal cell signaling', 'establishment or maintenance of cell polaritymyofibroblast cell apoptotic process', 'exocytic process', 'extracellular exosome assembly', 'extracellular matrix assembly', 'extracellular matrix constituent secretion', 'extracellular matrix organization', 'extracellular matrix-cell signaling', 'extracellular vesicle biogenesis', 'fibroblast activation', 'fibroblast apoptotic process', 'fibroblast chemotaxis', 'fibroblast migration', 'gap junction-mediated intercellular transport', 'hormone metabolic process', 'hormone secretion', 'inner medulla of kidney', 'intercellular bridge organization', 'ion channel activity', 'kidney pyramid', 'leukocyte activation', 'leukocyte chemotaxis', 'leukocyte migration', 'membrane docking', 'membrane raft localization', 'membrane to membrane docking', 'nephron', 'outer medulla of kidney', 'paracrine signaling', 'protein to membrane docking', 'receptor clustering', 'receptor diffusion trapping', 'regulation of receptor recycling', 'secretion by cell', 'signal release', 'substrate-dependent cell migration', 'synaptic signaling', 'vesicle-mediated intercellular transport'}}

Higher level classes of intercellular communication roles.

intercell

class pypath.intercell.IntercellRole(source, role)
role

Alias for field number 1

source

Alias for field number 0

log

pypath.log.new_logger(name=None, logdir=None, verbosity=None, **kwargs)[source]

Returns a new logger with default settings (can be customized).

namestr

Custom name for the log.

logdirstr

Path to the directoty to store log files.

verbosityint

Verbosity level, lowest is 0. Messages from levels above this won’t be written to the log..

log.Logger instance.

main

class pypath.main.PyPath(ncbi_tax_id=None, copy=None, name='unnamed', cache_dir=None, outdir='results', loglevel=0, loops=False)[source]

This is the a legacy object representing a molecular interaction network. At some point it will be removed, we don’t recommend to rely on it when you build your applications. The pypath.network.Network object offers a much clearer and more versatile API. As of end of 2019 not all functionalities have been migrated to the new API. For this reason we offer an intermediate solution: in this igraph based object the attrs edge attribute holds instances of pypath.interaction.Interaction objects, the same type of object we use to represent interactions in the new pypath.network.Network. At the same time we will keep supporting igraph with a method for converting pypath.network.Network to a igraph.Graph object, however this won’t provide all the methods available here but will serve only the purpose to make it possible to use the graph theory methods from the igraph library on networks built with pypath.

An object representing a molecular interaction network.

Parameters
  • ncbi_tax_id (int) – Optional, 9606 (Homo sapiens) by default. NCBI Taxonomic identifier of the organism from which the data will be downloaded.

  • default_name_type (dict) – Optional, {'protein': 'uniprot', 'mirna': 'mirbase', 'drug': 'chembl', 'lncrna': 'lncrna-genesymbol'} by default. Contains the default identifier types to which the downloaded data will be converted. If others are used, user may need to provide the format definitions for the conversion tables.

  • copy (pypath.main.PyPath) – Optional, None by default. Other pypath.main.PyPath instance from which the data will be copied.

  • name (str) – Optional, 'unnamed' by default. Session or project name (custom).

  • outdir (str) – Optional, 'results' by default. Output directory where to store all output files.

  • loglevel (int) – Optional, 0 by default. Sets the level of the logger. The higher the level the more messages will be written to the log.

  • loops (bool) – Optional, False by default. Determines if self-loop edges are allowed in the graph.

Variables
  • adjlist (list) – List of [set] containing the adjacency of each node. See PyPath.update_adjlist() method for more information.

  • chembl (pypath.chembl.Chembl) – Contains the ChEMBL data. See pypath.chembl module documentation for more information.

  • chembl_mysql (tuple) – DEPRECATED Contains the MySQL parameters used by the pypath.mapping module to load the ChEMBL ID conversion tables.

  • data (dict) – Stores the loaded interaction and attribute table. See PyPath.read_data_file() method for more information.

  • db_dict (dict) – Dictionary of dictionaries. Outer-level keys are 'nodes' and 'edges', corresponding values are [dict] whose keys are the database sources with values of type [set] containing the edge/node indexes for which that database provided some information.

  • dgraph (igraph.Graph) – Directed network graph object.

  • disclaimer (str) – Disclaimer text.

  • dlabDct (dict) – Maps the directed graph node labels [str] (keys) to their indices [int] (values).

  • dnodDct (dict) – Maps the directed graph node names [str] (keys) to their indices [int] (values).

  • dnodInd (set) – Stores the directed graph node names [str].

  • dnodLab (dict) – Maps the directed graph node indices [int] (keys) to their labels [str] (values).

  • dnodNam (dict) – Maps the directed graph node indices [int] (keys) to their names [str] (values).

  • edgeAttrs (dict) – Stores the edge attribute names [str] as keys and their corresponding types (e.g.: set, list, str, …) as values.

  • exp (pandas.DataFrame) – Stores the expression data for the nodes (if loaded).

  • exp_prod (pandas.DataFrame) – Stores the edge expression data (as the product of the normalized expression between the pair of nodes by default). For more details see pypath.main.PyPath.edges_expression().

  • exp_samples (set) – Contains a list of tissues as downloaded by ProteomicsDB. See PyPath.get_proteomicsdb() for more information.

  • failed_edges (list) – List of lists containing information about the failed edges. Each failed edge sublist contains (in this order): [tuple] with the node IDs, [str] names of nodes A and B, [int] IDs of nodes A and B and [int] IDs of the edges in both directions.

  • go (dict) – Contains the organism(s) NCBI taxonomy ID as key [int] and pypath.go.GOAnnotation object as value, which contains the GO annotations for the nodes in the graph. See pypath.go.GOAnnotation for more information.

  • graph (igraph.Graph) – Undirected network graph object.

  • gsea (pypath.gsea.GSEA) – Contains the loaded gene-sets from MSigDB. See pypath.gsea.GSEA for more information.

  • has_cats (set) – Contains the categories (e.g.: resource types) [str] loaded in the current network. Possible categories are: 'm' for PTM/enzyme-substrate resources, 'p' for pathway/activity flow resources, 'i' for undirected/PPI resources, 'r' for process description/reaction resources and 't' for transcription resources.

  • htp (dict) – Contains information about high-throughput data of the network for different thresholds [int] (keys). Values are [dict] containing the number of references ('rnum') [int], number of edges ('enum') [int], number of sources ('snum') [int] and list of PMIDs of the most common references above the given threshold ('htrefs') [set].

  • labDct (dict) – Maps the undirected graph node labels [str] (keys) to their indices [int] (values).

  • lists (dict) – Contains specific lists of nodes (values) for different categories [str] (keys). These can to be loaded from a file or a resource. Some methods include pypath.main.PyPath.receptor_list() ('rec'), pypath.main.PyPath.druggability_list() ('dgb'), pypath.main.PyPath.kinases_list() ('kin'), pypath.main.PyPath.tfs_list() ('tf'), pypath.main.PyPath.disease_genes_list() ('dis'), pypath.main.PyPath.signaling_proteins_list() ('sig'), pypath.main.PyPath.proteome_list() ('proteome') and pypath.main.PyPath.cancer_drivers_list() ('cdv').

  • loglevel (str) – The level of the logger.

  • loops (bool) – Whether if self-loop edges are allowed in the graph.

  • mapper (pypath.mapping.Mapper) – pypath.mapper.Mapper object for ID conversion and other ID-related operations across resources.

  • mutation_samples (list) – DEPRECATED

  • mysql_conf (tuple) – DEPRECATED Contains the MySQL parameters used by the pypath.mapping module to load the ID conversion tables.

  • name (str) – Session or project name (custom).

  • ncbi_tax_id (int) – NCBI Taxonomic identifier of the organism from which the data will be downloaded.

  • negatives (dict) – Contains a list of negative interactions according to a given source (e.g.: Negatome database). See pypath.main.PyPath.apply_negative() for more information.

  • nodDct (dict) – Maps the undirected graph node names [str] (keys) to their indices [int] (values).

  • nodInd (set) – Stores the undirected graph node names [str].

  • nodLab (dict) – Maps the undirected graph node indices [int] (keys) to their labels [str] (values).

  • nodNam (dict) – Maps the directed graph node indices [int] (keys) to their names [str] (values).

  • outdir (str) – Output directory where to store all output files.

  • palette (list) – Contains a list of hexadecimal [str] of colors. Used for plotting purposes.

  • pathway_types (list) – Contains the names of all the loaded pathway resources [str].

  • pathways (dict) – Contains the list of pathways (values) for each resource (keys) loaded in the network.

  • plots (dict) – DEPRECATED (?)

  • proteomicsdb (pypath.proteomicsdb.ProteomicsDB) – Contains a pypath.proteomicsdb.ProteomicsDB instance, see the class documentation for more information.

  • raw_data (list) – Contains a list of loaded edges [dict] from a data file. See PyPath.read_data_file() for more information.

  • seq (dict) – (?)

  • session (str) – Session ID, a five random alphanumeric characters.

  • session_name (str) – Session name and ID (e.g. 'unnamed-abc12').

  • sourceNetEdges (igraph.Graph) – (?)

  • sourceNetNodes (igraph.Graph) – (?)

  • sources (list) – List contianing the names of the loaded resources [str].

  • u_pfam (dict) – Dictionary of dictionaries, contains the mapping of UniProt IDs to their respective protein families and other information.

  • uniprot_mapped (list) – DEPRECATED (?)

  • unmapped (list) – Contains the names of unmapped items [str]. See pypath.main.PyPath.map_item() for more information.

  • vertexAttrs (dict) – Stores the node attribute names [str] as keys and their corresponding types (e.g.: set, list, str, …) as values.

acsn_effects(graph=None)[source]
add_genesets(genesets)[source]
add_grouped_eattr(edge, attr, group, value)[source]

Merges (or creates) a given edge attribute as [dict] of [list] values.

Parameters
  • edge (int) – Edge index where the given attribute value is to be merged or created.

  • attr (str) – The name of the attribute. If such attribute does not exist in the network edges, it will be created on all edges (as an empty [dict], value will only be assigned to the given edge and group).

  • group (str) – The key of the attribute dictionary where value is to be assigned.

  • value (list) – The value of the attribute to be assigned/merged.

add_grouped_set_eattr(edge, attr, group, value)[source]

Merges (or creates) a given edge attribute as [dict] of [set] values.

Parameters
  • edge (int) – Edge index where the given attribute value is to be merged or created.

  • attr (str) – The name of the attribute. If such attribute does not exist in the network edges, it will be created on all edges (as an empty [dict], value will only be assigned to the given edge and group).

  • group (str) – The key of the attribute dictionary where value is to be assigned.

  • value (set) – The value of the attribute to be assigned/merged.

add_list_eattr(edge, attr, value)[source]

Merges (or creates) a given edge attribute as [list].

Parameters
  • edge (int) – Edge index where the given attribute value is to be merged or created.

  • attr (str) – The name of the attribute. If such attribute does not exist in the network edges, it will be created on all edges (as an empty [list], value will only be assigned to the given edge).

  • value (list) – The value of the attribute to be assigned/merged.

add_set_eattr(edge, attr, value)[source]

Merges (or creates) a given edge attribute as [set].

Parameters
  • edge (int) – Edge index where the given attribute value is to be merged or created.

  • attr (str) – The name of the attribute. If such attribute does not exist in the network edges, it will be created on all edges (as an empty [set], value will only be assigned to the given edge).

  • value (set) – The value of the attribute to be assigned/merged.

affects(identifier)[source]
all_between(id_a, id_b)[source]

Checks for any edges (in any direction) between the provided nodes.

Parameters
  • id_a (str) – The name of the source node.

  • id_b (str) – The name of the target node.

Returns

(dict) – Contains information on the directionality of the requested edge. Keys are 'ab' and 'ba', denoting the straight/reverse directionalities respectively. Values are [list] whose elements are the edge ID or None according to the existance of that edge in the following categories: undirected, straight and reverse (in that order).

all_neighbours(indices=False)[source]

Looks for the first neighbours of all the nodes and creates an attribute ('neighbours') on each one of them containing a list of their UniProt IDs.

Parameters

indices (bool) – Optional, False by default. Whether to list the neighbour nodes indices or their UniProt IDs.

apply_list(name, node_or_edge='node')[source]

Creates vertex or edge attribute based on a list.

Parameters
  • name (str) – The name of the list to be added as attribute. Must have been previously loaded with pypath.main.PyPath.load_list() or other methods. See description of pypath.main.PyPath.lists attribute for more information.

  • node_or_edge (str) – Optional, 'node' by default. Whether the attribute list is to be added to the nodes or to the edges.

apply_negative(settings)[source]

Loads a negative interaction source (e.g.: Negatome) into the current network.

Parameters

settings (pypath.input_formats.NetworkInput) – pypath.input_formats.NetworkInput instance containing the detailed definition of the input format to the downloaded file. For instance pypath.data_formats.negative['negatome']

basic_stats(latex=False, caption='', latex_hdr=True, fontsize=8, font='HelveticaNeueLTStd-LtCn', fname=None, header_format='%s', row_order=None, by_category=True, use_cats=['p', 'm', 'i', 'r'], urls=True, annots=False)[source]

Returns basic numbers about the network resources, e.g. edge and node counts.

latex

Return table in a LaTeX document. This can be compiled by PDFLaTeX: latex stats.tex

basic_stats_intergroup(groupA, groupB, header=None)[source]
cancer_drivers_list(intogen_file=None)[source]

Loads the list of cancer drivers. Contains information from COSMIC (needs user log in credentials) and IntOGen (if provided) and adds the attribute to the undirected network nodes.

Parameters

intogen_file (str) – Optional, None by default. Path to the data file. Can also be [function] that provides the data. In general, anything accepted by pypath.input_formats.NetworkInput.input.

cancer_gene_census_list()[source]

Loads the list of cancer driver proteins from the COSMIC Cancer Gene Census.

clean_graph(organisms_allowed=None)[source]

Removes multiple edges, unknown molecules and those from wrong taxon. Multiple edges will be combined by pypath.main.PyPath.combine_attr() method. Loops will be deleted unless the attribute pypath.main.PyPath.loops is set to True.

Parameters

organisms_allowed (set) – NCBI Taxonomy identifiers [int] of the organisms allowed in the network.

collapse_by_name(graph=None)[source]

Collapses nodes with the same name by copying and merging all edges and attributes. Operates directly on the provided network object.

Parameters

graph (igraph.Graph) – Optional, None by default. The network for which the nodes are to be collapsed. If none is provided, takes pypath.main.PyPath.graph (undirected network) by default.

collect(method, **kwargs)[source]

Collects various entities over the network according to method.

combine_attr(lst, num_method=<built-in function max>)[source]

Combines multiple attributes into one. This method attempts to find out which is the best way to combine attributes.

  • If there is only one value or one of them is None, then returns the one available.

  • Lists: concatenates unique values of lists.

  • Numbers: returns the greater by default or calls num_method if given.

  • Sets: returns the union.

  • Dictionaries: calls pypath.common.merge_dicts().

  • Direction: calls their special pypath.main.Direction.merge() method.

Works on more than 2 attributes recursively.

Parameters
  • lst (list) – List of one or two attribute values.

  • num_method (function) – Optional, max by default. Method to merge numeric attributes.

communities(method, **kwargs)[source]
complex_comembership_network(graph=None, resources=None)[source]
complexes(methods=['3dcomplexes', 'havugimana', 'corum', 'complexportal', 'compleat'])[source]
complexes_in_network(csource='corum', graph=None)[source]
compounds_from_chembl(chembl_mysql=None, nodes=None, crit=None, andor='or', assay_types=['B', 'F'], relationship_types=['D', 'H'], multi_query=False, **kwargs)[source]

Loads compound data from ChEMBL to the network.

Parameters
  • chebl_mysql (tuple) – Optional, None by default. Contains the MySQL parameters used by the pypath.mapping module to loadthe ChEMBL ID conversion tables. If none is passed, takes the current instance pypath.main.PyPath.chembl_mysql attribute.

  • nodes (list) – Optional, None by default. List of node indices for which the information is to be loaded. If none is provided calls the method pypath.main.PyPath.get_sub() with the provided crit parameter.

  • crit (dict) – Optional, None by default. Defines the critical attributes to generate a subnetwork to extract the nodes in case nodes is not provided. Keys are 'edge' and 'node' and values are [dict] containing the critical attribute names [str] and values are [set] containing those attributes of the nodes/edges that are to be kept in the subnetwork. If none is provided, takes the whole network.

  • andor (str) – Optional, 'or' by default. Determines the search mode for the subnetwork generation (if nodes=None). See pypath.main.PyPath.search_attr_or() and pypath.main.PyPath.search_attr_and() for more details.

  • assay_types (list) – Optional, ['B', 'F'] by default. Types of assay to query Options are: 'A' (ADME), 'B' (Binding),``’F’`` (Functional), 'P' (Physicochemical), 'T' (Toxicity) and/or 'U' (Unassigned).

  • relationship_types (list) – Optional, ['D', 'H'] by default. Assay relationship types to query. Possible values are: 'D' (Direct protein target assigned), 'H' (Homologous protein target assigned), 'M' (Molecular target other than protein assigned), 'N' (Non-molecular target assigned), 'S' (Subcellular target assigned) and/or 'U' (Default value, target has yet to be curated).

  • multi_query (bool) – Optional, False by default. Not used.

  • **kwargs – Additional keyword arguments for pypath.chembl.Chembl.compounds_targets().

consistency()[source]
copy(other)[source]

Copies another pypath.main.PyPath instance into the current one.

Parameters

other (pypath.main.PyPath) – The instance to be copied from.

copy_edges(sources, target, move=False, graph=None)[source]

Copies edges from sources node(s) to another one (target), keeping attributes and directions.

Parameters
  • sources (list) – Contains the vertex index(es) [int] of the node(s) to be copied or moved.

  • target (int) – Vertex index where edges and attributes are to be copied to.

  • move (bool) – Optional, False by default. Whether to perform copy or move (remove or keep the source edges).

  • graph (igraph.Graph) – Optional, None by default. The network graph object from which the nodes are to be merged. If none is passed, takes the undirected network graph.

count_sol()[source]

Counts the number of nodes with zero degree.

Returns

(int) – The number of nodes with zero degree.

counts(collection_method, add_total=True, add_percent=True, add_cat_total=True, **kwargs)[source]

Collects various entities over the network according to method and counts them in total and by resources.

coverage(lst)[source]

Computes the coverage (range [0, 1]) of a list of nodes against the current (undirected) network.

Parameters

lst (set) – Can also be [list] (will be converted to [set]) or [str]. In the latter case it will retrieve the list with that name (if such list exists in pypath.main.PyPath.lists).

curation_effort(resources=None, **kwargs)[source]

Returns a set of reference-interactions pairs.

curation_effort_by_resource(resources=None, **kwargs)[source]

A dict with resources as keys and *set*s of curation items (interaction-reference pairs) as values.

curation_stats(by_category=True)[source]
curation_tab(fname='curation_stats.tex', by_category=True, use_cats=['p', 'm', 'i', 'r'], header_size='normalsize', **kwargs)[source]
curators_work()[source]

Computes and prints an estimation of how many years of curation took to achieve the amount of information on the network.

databases_similarity(index='simpson')[source]

Computes the similarity across databases according to a given index metric. Computes the similarity across the loaded resources (listed in pypath.main.PyPath.sources in terms of nodes and edges separately.

Parameters

index (str) – Optional, 'simpson' by default. The type of index metric to use to compute the similarity. Options are 'simpson', 'sorensen' and 'jaccard'.

Returns

(dict) – Nested dictionaries (three levels). First-level keys are 'nodes' and 'edges', then second and third levels correspond to sources names which map to the similarity index between those sources [float].

degree_dist(prefix, g=None, group=None)[source]

Computes the degree distribution over all nodes of the network. If group is provided, also across nodes of that group(s).

Parameters
  • prefix (str) – Prefix for the file name(s).

  • g (igraph.Graph) – Optional, None by default. The network over which to compute the degree distribution. If none is passed, takes the undirected network of the current instance.

  • group (list) – Optional, None by default. Additional group(s) name(s) [str] of node attributes to subset the network and compute its degree distribution.

degree_dists()[source]

Computes the degree distribution for all the different network sources. This is, for each source, the subnetwork comprising all interactions coming from it is extracted and the degree distribution information is computed and saved into a file. A file is created for each resource under the name 'pwnet-<session_id>-degdist-<resource>''. Files are stored in pypath.main.PyPath.outdir ('results' by default).

delete_by_organism(organisms_allowed=None)[source]

Removes the proteins of all organisms which are not given in tax.

Parameters

organisms_allowed (list,set) – List of NCBI Taxonomy IDs [int] of the organism(s) that are to be kept.

delete_by_source(source, vertexAttrsToDel=None, edgeAttrsToDel=None)[source]

Deletes nodes and edges from the network according to a provided source name. Optionally can also remove the given list of attributes from nodes and/or edges.

Parameters
  • source (str) – Name of the source from which the nodes and edges have to be removed.

  • vertexAttrsToDel (list) – Optional, None by default. Contains the names [str] of the attributes to be removed from the nodes.

  • edgeAttrsToDel (list) – Optional, None by default. Contains the names [str] of the attributes to be removed from the edges.

delete_unknown(organisms_allowed=None, entity_type='protein', default_name_type=None)[source]

Removes those items which are not in the list of all default IDs of the organisms. By default, it means to remove all protein nodes not having a human UniProt ID.

Parameters
  • typ (str) – Optional, 'protein' by default. Determines the molecule type. These can be 'protein', 'drug', 'lncrna', 'mirna' or any other type defined in pypath.main.PyPath.default_name_type.

  • default_name_type (str) – Optional, None by default. The default name type for the given molecular species. If none is specified takes it from pypath.main.PyPath.default_name_type (e.g.: for 'protein', default is 'uniprot').

  • organisms_allowed (set) – NCBI Taxonomy identifiers [int] of the organisms allowed in the network.

delete_unmapped()[source]

Checks the network for any existing unmapped node and removes it.

dgenesymbol(genesymbol)[source]

Returns igraph.Vertex() object if the GeneSymbol can be found in the default directed network, otherwise None.

@genesymbolstr

GeneSymbol.

dgenesymbols(genesymbols)[source]
dgs(genesymbol)

Returns igraph.Vertex() object if the GeneSymbol can be found in the default directed network, otherwise None.

@genesymbolstr

GeneSymbol.

dgss(genesymbols)
dneighbors(identifier, mode='ALL')[source]
dp(identifier)

Same as PyPath.get_node, just for the directed graph. Returns igraph.Vertex() object if the identifier is a valid vertex index in the default directed graph, or a UniProt ID or GeneSymbol which can be found in the default directed network, otherwise None.

@identifierint, str

Vertex index (int) or GeneSymbol (str) or UniProt ID (str) or igraph.Vertex object.

dproteins(identifiers)
dps(identifiers)
duniprot(uniprot)[source]

Same as PyPath.uniprot(), just for directed graph. Returns ``igraph.Vertex() object if the UniProt can be found in the default directed network, otherwise None.

@uniprotstr

UniProt ID.

duniprots(uniprots)[source]

Returns list of igraph.Vertex() object for a list of UniProt IDs omitting those could not be found in the default directed graph.

dup(uniprot)

Same as PyPath.uniprot(), just for directed graph. Returns ``igraph.Vertex() object if the UniProt can be found in the default directed network, otherwise None.

@uniprotstr

UniProt ID.

dups(uniprots)

Returns list of igraph.Vertex() object for a list of UniProt IDs omitting those could not be found in the default directed graph.

dv(identifier)

Same as PyPath.get_node, just for the directed graph. Returns igraph.Vertex() object if the identifier is a valid vertex index in the default directed graph, or a UniProt ID or GeneSymbol which can be found in the default directed network, otherwise None.

@identifierint, str

Vertex index (int) or GeneSymbol (str) or UniProt ID (str) or igraph.Vertex object.

dvs(identifiers)
edge_exists(id_a, id_b)[source]

Returns a tuple of vertex indices if edge doesn’t exist, otherwise, the edge ID. Not sensitive to direction.

Parameters
  • id_a (str) – Name of the source node.

  • id_b (str) – Name of the target node.

Returns

(int) – The edge index, if exists such edge. Otherwise, [tuple] of [int] corresponding to the node IDs.

edge_loc(graph=None, topn=2)[source]
edge_names(e)[source]

Returns the node names of a given edge.

Parameters

e (int) – The edge index.

Returns

(tuple) – Contains the source and target node names of the edge [str].

edges_3d(methods=['dataio.get_instruct', 'dataio.get_i3d'])[source]
edges_between(group1, group2, directed=True, strict=False)[source]

Selects edges between two groups of vertex IDs. Returns set of edge IDs.

Parameters
  • group1,group2 (set) – List, set or tuple of vertex IDs.

  • directed (bool) – Only edges with direction group1 -> group2 selected.

  • strict (bool) – Edges with no direction information still selected even if directed is False.

edges_expression(func=<function PyPath.<lambda>>)[source]

Executes function func for each pairs of connected proteins in the network, for every expression dataset. By default, func simply gives the product the (normalized) expression values.

funccallable

Function to handle 2 vectors (pandas.Series() objects), should return one vector of the same length.

edges_in_complexes(csources=['corum'], graph=None)[source]

Creates edge attributes complexes and in_complex. These are both dicts where the keys are complex resources. The values in complexes are the list of complex names both the source and the target vertices belong to. The values in_complex are boolean values whether there is at least one complex in the given resources both the source and the target vertex of the edge belong to.

@csourceslist

List of complex resources. Should be already loaded.

@graphigraph.Graph()

The graph object to do the calculations on.

edges_ptms()[source]
edgeseq_inverse(edges)[source]

Returns the sequence of all edge indexes that are not in the argument edges.

Parameters

edges (set) – Sequence of edge indices [int] that will not be returned.

Returns

(list) – Contains all edge indices [int] of the undirected network except the ones on edges argument.

entities_by_resource(resources=None, entity_type=None, **kwargs)[source]

Returns a dict of *set*s with resources as keys and sets of entities as values.

entities_by_resources()[source]

Returns a dict of sets with resources as keys and sets of entity IDs as values.

export_dot(nodes=None, edges=None, directed=True, labels='genesymbol', edges_filter=<function PyPath.<lambda>>, nodes_filter=<function PyPath.<lambda>>, edge_sources=None, dir_sources=None, graph=None, return_object=False, save_dot=None, save_graphics=None, prog='neato', format=None, hide=False, font=None, auto_edges=False, hide_nodes=[], defaults={}, **kwargs)[source]

Builds a pygraphviz.AGraph() object with filtering the edges and vertices along arbitrary criteria. Returns the Agraph object if requesred, or exports the dot file, or saves the graphics.

@nodes : list List of vertex ids to be included. @edges : list List of edge ids to be included. @directed : bool Create a directed or undirected graph. @labels : str Name type to be used as id/label in the dot format. @edges_filter : function Function to filter edges, accepting igraph.Edge as argument. @nodes_filter : function Function to filter vertices, accepting igraph.Vertex as argument. @edge_sources : list Sources to be included. @dir_sources : list Direction and effect sources to be included. @graph : igraph.Graph The graph object to export. @return_object : bool Whether to return the pygraphviz.AGraph object. @save_dot : str Filename to export the dot file to. @save_graphics : str Filename to export the graphics, the extension defines the format. @prog : str The graphviz layout algorithm to use. @format : str The graphics format passed to pygraphviz.AGrapg().draw(). @hide : bool Hide filtered edges instead of omit them. @hide nodes : list Nodes to hide. List of vertex ids. @auto_edges : str Automatic, built-in style for edges. ‘DIRECTIONS’ or ‘RESOURCE_CATEGORIES’ are supported. @font : str Font to use for labels. For using more than one fonts refer to graphviz attributes with constant values or define callbacks or mapping dictionaries. @defaults : dict Default values for graphviz attributes, labeled with the entity, e.g. {‘edge_penwidth’: 0.2}. @**kwargs : constant, callable or dict Graphviz attributes, labeled by the target entity. E.g. edge_penwidth, ‘vertex_shape` or graph_label. If the value is constant, this value will be used. If the value is dict, and has _name as key, for every instance of the given entity, the value of the attribute defined by _name will be looked up in the dict, and the corresponding value will be given to the graphviz attribute. If the key _name is missing from the dict, igraph vertex and edge indices will be looked up among the keys. If the value is callable, it will be called with the current instance of the entity and the returned value will be used for the graphviz attribute. E.g. edge_arrowhead(edge) or vertex_fillcolor(vertex) Example:

import pypath from pypath import data_formats net = pypath.PyPath() net.init_network(pfile = ‘cache/default.pickle’) #net.init_network({‘arn’: data_formats.omnipath[‘arn’]}) tgf = [v.index for v in net.graph.vs if ‘TGF’ in v[‘slk_pathways’]] dot = net.export_dot(nodes = tgf, save_graphics = ‘tgf_slk.pdf’, prog = ‘dot’,

main_title = ‘TGF-beta pathway’, return_object = True, label_font = ‘HelveticaNeueLTStd Med Cn’, edge_sources = [‘SignaLink3’], dir_sources = [‘SignaLink3’], hide = True)

export_edgelist(fname, graph=None, names=['name'], edge_attributes=[], sep='\t')[source]

Write edge list to text file with attributes

Parameters
  • fname – the name of the file or a stream to read from.

  • graph – the igraph object containing the network

  • names – list with the vertex attribute names to be printed for source and target vertices

  • edge_attributes – list with the edge attribute names to be printed

  • sep – string used to separate columns

export_graphml(outfile=None, graph=None, name='main')[source]

Saves the network in a .graphml file.

Parameters
  • outfile (str) – Optional, None by default. Name/path of the output file. If none is passed, 'results/netrowk-<session_id>.graphml' is used.

  • graph (igraph.Graph) – Optional, None by default. The network object to be saved. If none is passed, takes the undirected network of the current instance.

  • name (str) – Optional, 'main' by default. The graph name for the output file.

export_ptms_tab(outfile=None)[source]

Exports a tab file containing the PTM interaction information loaded in the network.

Parameters

outfile (str) – Optional, None by default. The output file nama/path to store the PTM information. If none is provided, the default is 'results/network-<session_id>.tab'.

Returns

(list) – Contains the edge indices [int] of all PTM interactions.

export_sif(outfile=None)[source]

Exports the network interactions in .sif format (Simple Interaction Format).

Parameters

outfile (str) – Optional, None by default. Name/path of the output file. If none is passed, 'results/netrowk-<session_id>.sif' is used.

<