Esempio n. 1
0
#from matplotlib_venn import venn3
import networkx as nx
import itertools
import matplotlib.pyplot as plt
from export_downloads import ComppiInterface

# filter to species: -1: disabled, 0 (human), 1 (drosi), 2 (c.elegans), 3 (yeast)
species_filter = -1

# group of custom sources, currently set to protein-protein interaction databases
custom_source_group = ['MINT', 'IntAct', 'MIPS', 'DroID', 'MatrixDB', 'BioGRID', 'HPRD', 'DIP', 'CCSB']
# all proteins from ANY source DB (not intersection, but union!!)
# SELECT COUNT(DISTINCT id) FROM Protein WHERE id IN ( SELECT proteinId FROM ProteinToDatabase WHERE sourceDb IN ('MINT', 'IntAct', 'MIPS', 'MatrixDB', 'DroID', 'BioGRID', 'HPRD', 'HomoMINT', 'DIP', 'CCSB') );

c = ComppiInterface()
comppi_graph = c.buildGlobalComppi()

# filter to species if needed
if species_filter >= 0:
	print("Filtering to species: {}".format(species_filter))
	comppi_graph = c.filterGraph(comppi_graph, None, species_filter)

comppi_number_of_all_nodes = comppi_graph.number_of_nodes()
print("Number of all nodes: {}".format(comppi_number_of_all_nodes))
print()

# collect the proteins per source databases and localizations per source databases
loc_sources = {
	'No Loc Source': []
}