mirror of
https://github.com/Priyatham-sai-chand/compara-deep-learning.git
synced 2026-10-05 08:11:34 -07:00
27 lines
672 B
Python
27 lines
672 B
Python
|
|
import sys
|
||
|
|
import os
|
||
|
|
from read_data import read_data_genome,read_data_homology
|
||
|
|
from process_data import list_dict_genomes,create_chromosome_maps
|
||
|
|
|
||
|
|
def get_data_genome(dir):
|
||
|
|
a=[]
|
||
|
|
d={}
|
||
|
|
ld=[]
|
||
|
|
ldg=[]
|
||
|
|
a,d=read_data_genome(dir,a,d)
|
||
|
|
assert(len(a)==len(d))
|
||
|
|
print("Creating Maps:")
|
||
|
|
ld,ldg=list_dict_genomes(a,d)
|
||
|
|
cmap,cimap=create_chromosome_maps(a,d)
|
||
|
|
assert(len(ld)==len(ldg))
|
||
|
|
for i in range(len(ld)):
|
||
|
|
assert(len(ld[i])==len(ldg[i]))
|
||
|
|
return cmap,cimap,ld,ldg,a,d
|
||
|
|
|
||
|
|
def get_data_homology(dir):
|
||
|
|
a_h=[]
|
||
|
|
d_h={}
|
||
|
|
a_h,d_h=read_data_homology(dir)
|
||
|
|
assert(len(a_h)==len(d_h))
|
||
|
|
return a_h,d_h
|