Network Generators

magine.networks.network_generator module

magine.networks.network_generator.build_network(seed_species, species='hsa', save_name=None, all_measured_list=None, trim_source_sink=False, use_reactome=True, use_hmdb=False, use_biogrid=True, use_signor=True, verbose=False)[source]

Construct a network from a list of gene names.

Parameters
seed_specieslist

list of genes to construct network

save_namestr, optional

output name to save network. Will save one before and after ID conversion

speciesstr

species of proteins (‘hsa’: human, ‘mmu’:murine)

all_measured_listlist

list of all species that should be considered in network

use_reactomebool

Add ReactomeFunctionalInteraction reaction to network

use_biogridbool

Add BioGrid reaction to network

use_hmdbbool

Add HMDB reaction to network all_measured_list

use_signorbool

Add SIGNOR reaction to network

trim_source_sinkbool, optional

Remove source and sink nodes if they are not measured in network

verbosebool
Returns
networkx.DiGraph
magine.networks.network_generator.create_background_network(save_name='background_network', fresh_download=False, verbose=True, create_overlap=False)[source]
Parameters
save_namestr

Name of the network

fresh_downloadbool

Download a fresh copy of the databases

verbose: bool

Print information about the databases

create_overlapbool

Creates a figure comparing the databses

Returns
——-
nx.DiGraph
magine.networks.network_generator.expand_by_db(starting_network, expansion_source, measured_list, verbose=False)[source]

add reference network to main network

Parameters
starting_networknx.DiGraph
expansion_sourcenx.DiGraph
measured_listlist_like
verbosebool
Returns
new_graphnx.DiGraph

magine.networks.annotated_set module

magine.networks.subgraphs module

Subpackages

The following subpackages to download and parse data