Commit e84ee675 authored by MARIJON Pierre's avatar MARIJON Pierre

search path between all extremity not between contig

parent 6bc96577
......@@ -312,7 +312,7 @@ def main(args = None):
contig2color = read_contig2color(arg["contig2color"])
logging.debug("end read aditional info")
tig2tig = dict()
ext2ext = dict()
with open(arg["search_path"], "r") as search:
reader = csv.DictReader(search)
for row in reader:
......@@ -322,11 +322,11 @@ def main(args = None):
row["readB"] = read_b
row["length"] = l
if (row["tigA"], row["tigB"]) in tig2tig:
if l < tig2tig[(row["tigA"], row["tigB"])]["length"]:
tig2tig[(row["tigA"], row["tigB"])] = row
if (row["readA"], row["readB"]) in ext2ext:
if l < ext2ext[(row["readA"], row["readB"])]["length"]:
ex2ext[(row["readA"], row["readB"])] = row
else:
tig2tig[(row["tigA"], row["tigB"])] = row
ext2ext[(row["readA"], row["readB"])] = row
pool = mp.Pool(arg["thread"])
async_res = pool.map_async(extract_graph, ((G,
......@@ -335,7 +335,7 @@ def main(args = None):
contig2color,
(prefix, True,
row["length"], row)) \
for row in tig2tig.values() \
for row in ext2ext.values() \
if row["length"] != float("inf"))
)
res = async_res.get()
......
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