mirror of
https://github.com/Priyatham-sai-chand/compara-deep-learning.git
synced 2026-10-05 08:11:34 -07:00
Add files via upload
This commit is contained in:
parent
ea37c29761
commit
0b4610bffc
2 changed files with 8 additions and 3 deletions
|
|
@ -65,9 +65,13 @@ def create_synteny_matrix_mul(gene_seq,g1,g2,n):
|
|||
for i in range(n):
|
||||
if g1[i]=="NULL_GENE":
|
||||
continue
|
||||
if gene_seq[g1[i]]=="":
|
||||
return np.zeros((n,n,2)),np.zeros((n,n,2))
|
||||
for j in range(n):
|
||||
if g2[j]=="NULL_GENE":
|
||||
continue
|
||||
if gene_seq[g2[j]]=="":
|
||||
return np.zeros((n,n,2)),np.zeros((n,n,2))
|
||||
norm_len=max(len(gene_seq[g1[i]]),len(gene_seq[g2[j]]))
|
||||
try:
|
||||
result = ed.align(gene_seq[g1[i]],gene_seq[g2[j]], mode="NW", task="distance")
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@ import pandas as pd
|
|||
import progressbar
|
||||
import json
|
||||
import numpy as np
|
||||
import multiprocessing
|
||||
import time
|
||||
from multiprocessing import Process
|
||||
from threading import Thread
|
||||
from ete3 import Tree
|
||||
from read_get_gene_seq import read_gene_seq,create_dict
|
||||
|
|
@ -114,7 +115,6 @@ def intermediate_process(gene_seq,x,y,n,index,sl,sg,ind):
|
|||
sl.append(smltemp)
|
||||
ind.append(index)
|
||||
|
||||
|
||||
def synteny_matrix(gene_seq,hdf,lsy,n,enable_break,sg,sl,ind):
|
||||
#sg=[]
|
||||
#sl=[]
|
||||
|
|
@ -160,8 +160,9 @@ def synteny_matrix(gene_seq,hdf,lsy,n,enable_break,sg,sl,ind):
|
|||
th.start()
|
||||
th.join(30)
|
||||
if th.is_alive():
|
||||
th.join()
|
||||
raise SystemError("Long Time")
|
||||
print(row)
|
||||
th.join()
|
||||
except Exception as e:
|
||||
print(e)
|
||||
if t==5 and enable_break==1:
|
||||
|
|
|
|||
Loading…
Reference in a new issue