Commit 72832865 authored by Ngan Dong's avatar Ngan Dong
Browse files

minor update to gen fold code

parent f906f1d6
...@@ -24,7 +24,7 @@ def adjMatrix2list(csv_path): ...@@ -24,7 +24,7 @@ def adjMatrix2list(csv_path):
def assocList2adjMat(pos_assoc, n_miRNA, n_disease): def assocList2adjMat(pos_assoc, n_miRNA, n_disease):
mat = np.zeros((n_miRNA, n_disease)) mat = np.zeros((n_miRNA, n_disease))
for pair in pos_assoc: for pair in pos_assoc:
mat[pair[pair[0], pair[1]]] = 1.0 mat[pair[0], pair[1]] = 1.0
return mat return mat
...@@ -33,7 +33,7 @@ def gen_fold(data_dir, save_dir, numFold=5, negative_rate=1.0, randomseed=123): ...@@ -33,7 +33,7 @@ def gen_fold(data_dir, save_dir, numFold=5, negative_rate=1.0, randomseed=123):
adj_path = data_dir + 'm-d.csv' adj_path = data_dir + 'm-d.csv'
disease_sim_path = data_dir + 'disease_sim.csv' disease_sim_path = data_dir + 'disease_sim.csv'
disease_sim_path2 = data_dir + 'disease_sim2.csv' disease_sim_path2 = data_dir + 'disease_sim2.csv'
disease_not_found_path = data_dir + 'disease_not_found_list.csv' disease_not_found_path = data_dir + 'disease_not_found_list.txt'
mirna_func_path = 'mirna_func.csv' mirna_func_path = 'mirna_func.csv'
mirna_func_path2 = 'mirna_func2.csv' mirna_func_path2 = 'mirna_func2.csv'
...@@ -146,4 +146,4 @@ hmdd3_dir = '../hmdd3/' ...@@ -146,4 +146,4 @@ hmdd3_dir = '../hmdd3/'
hmdd2_savedir = hmdd2_dir + 'folds/' hmdd2_savedir = hmdd2_dir + 'folds/'
hmdd3_savedir = hmdd3_dir + 'folds/' hmdd3_savedir = hmdd3_dir + 'folds/'
gen_fold(hmdd2_dir, hmdd2_savedir) gen_fold(hmdd2_dir, hmdd2_savedir)
gen_fold(hmdd3_dir, hmdd3_savedir) gen_fold(hmdd3_dir, hmdd3_savedir)
\ No newline at end of file
import pandas as pd import pandas as pd
import numpy as np import numpy as np
from epmda.GIP import * from GIP import *
import argparse import argparse
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment