def __init__(self, G, only_add=False, only_delete=False): self.graph = G self.color_dict = gt.sort_by_colors(G) self._only_add = only_add self._only_delete = only_delete
from asymmetree.hgt import ldt_graph from tools.LDT_ILP import LDTEditor import asymmetree.tools.GraphTools as gt import os S = te.simulate_species_tree(20, model='innovation') TGT = te.simulate_dated_gene_tree(S, dupl_rate=0.5, loss_rate=0.5, hgt_rate=0.5, prohibit_extinction="per_family", replace_prob=0.0) OGT = te.observable_tree(TGT) ldt = ldt_graph(OGT, S) colors = gt.sort_by_colors(ldt) #print("edges of G: \n{}".format(G._G.edges())) #a, b, c = get_P3_data(G._G) #print("\nThe regions of P3s: {}".format(a)) #print("\nThe amounts in the regions: {}".format(b)) #print("\nThe distance between regions: {}\n".format(c)) print("Amount of nodes: {}".format(len(ldt.nodes()))) print("Amount of colors: {}".format(len(colors))) print("Amount of edges: {}".format(len(ldt.edges()))) def run_investigation(): successes = 0 tested_graphs = 0