diff --git a/__pycache__/select.cpython-36.pyc b/__pycache__/select.cpython-36.pyc new file mode 100644 index 0000000..ba05861 Binary files /dev/null and b/__pycache__/select.cpython-36.pyc differ diff --git a/prediction_thread_multiple.py b/prediction_thread_multiple.py new file mode 100644 index 0000000..d39b203 --- /dev/null +++ b/prediction_thread_multiple.py @@ -0,0 +1,169 @@ +import json +import gc +import pandas as pd +import numpy as np +import pickle +import tensorflow as tf +import sys +import time +from test_prepare_functions import create_data_homology_ls,read_gene_sequences,create_tree_data,read_data,update_rest +from process_data import create_map_list +from threading import Thread,Lock +import traceback +from threads import Procerssrunner + +def main(): + arg=sys.argv + fname=arg[-6] + model_name=arg[-5] + n_of_t=int(arg[-4]) + st=int(arg[-3]) + end=int(arg[-2]) + name=arg[-1] + + df=pd.read_csv(fname,sep="\t",header=None) + label_dict=dict(ortholog_one2one="Orthologs", + other_paralog="Paralogs", + ortholog_one2many="Orthologs", + ortholog_many2many="Orthologs", + within_species_paralog="Paralogs", + gene_split="Gene Split", + non_homolog="non_homolog") + label_dict_2=dict(ortholog_one2one=1,other_paralog=0,non_homolog=2,ortholog_one2many=1,ortholog_many2many=1,within_species_paralog=0,gene_split=4) + label_2=[] + label_1=[] + for _,row in df.iterrows(): + label_1.append(label_dict_2[row[7]]) + label_2.append(label_dict[row[7]]) + df=df.assign(label=label_1) + df[7]=label_2 + try: + if end