def DisSim_by_NetSim(): input_file1 = "./Dataset/disease-gene_SIDD.txt" input_file2 = "./Dataset/HumanNet_symbol.txt" output_file = "./Result/NetSim_sim_DO.txt" disease2gene = FileUtil.readFile2DictSet(input_file1, header=True) gene_gene = FileUtil.readFile2List(input_file2) NetSim.calculateDisSim(disease2gene, gene_gene, output_file)
def DisSim_by_ModuleSim(): input_file1 = "./Dataset/disease-gene.txt" input_file2 = "./Dataset/PPI.txt" output_file = "./Result/ModuleSim_sim.txt" dis2gene = FileUtil.readFile2DictSet(input_file1) gene_net = ModuleSim.read_interactome(input_file2, False, False) print("number of vertices: {}, number of edges: {}".format( gene_net.vcount(), gene_net.ecount())) sims = ModuleSim.similarity_cal_spavgn(dis2gene, gene_net) FileUtil.write_sims(sims, output_file)
def DisSim_by_FunSim(): input_file1 = "./Dataset/disease-gene_SIDD.txt" input_file2 = "./Dataset/HumanNet_symbol_weighted.txt" output_file = "./Result/FunSim_sim.txt" disease2genes = FileUtil.readFile2DictSet(input_file1) weighted_PPI = FileUtil.readFile2List(input_file2) FunSim.calculateDisSim(disease2genes, weighted_PPI, output_file) # ------------------------ evaluation --------------------------------------- file_path1 = "./Evaluation/benchmark_DOID.txt" BenChmark_DO = FileUtil.readFile2List(file_path1) simi_Result = FileUtil.readFile2List(output_file) benchmark_evaluation.evaluate_by_benchmark(BenChmark_DO, simi_Result, times=10)
def DisSim_by_XuanSim(): input_file1 = "./Dataset/DO_DAG.txt" input_file2 = "./Dataset/disease-gene_SIDD.txt" output_file = "./Result/XuanSim_sim.txt" DO_DAG = FileUtil.readFile2List(input_file1, header=True) diseases2genes = FileUtil.readFile2DictSet(input_file2) XuanSim.calculateDisSim(DO_DAG, output_file, selected_diseases=set(diseases2genes.keys())) file_path1 = "./Evaluation/benchmark_DOID.txt" BenChmark_DO = FileUtil.readFile2List(file_path1) simi_Result = FileUtil.readFile2List(output_file) benchmark_evaluation.evaluate_by_benchmark(BenChmark_DO, simi_Result, times=10)