Skip to content

Commit

Permalink
few fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
skoren committed Jul 19, 2024
1 parent 7048b79 commit 88d9cbb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/scripts/graph_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def canontip(left, right):
return (left, right)

def getone(s):
assert len(s) == 1
assert len(s) >= 1
for i in s:
return i

Expand Down
4 changes: 2 additions & 2 deletions src/scripts/pick_majority_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ def canon(p):
assert len(connectorlist) >= 1
for connection in connectorlist:
if connection[1]*2 >= connectorlist[0][1]:
print(pathstr(list(connection[0])))
print(gf.pathstr(list(connection[0])))
else:
forbidden.add(pathstr(list(connection[0])))
forbidden.add(gf.pathstr(list(connection[0])))

with open(forbidden_paths_out_file, "w") as f:
for path in forbidden:
Expand Down
3 changes: 1 addition & 2 deletions src/scripts/unroll_tip_loops.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,8 @@ def iscanon(left, right):
if "<"+node in max_overlap: nodelen -= max_overlap["<"+node]
if nodelen <= 0: nodelen = 1

sys.stderr.write("Checking node %s with len %s coverage %s which is a tip that was not unrolled\n"%(node, nodelen, coverage[node]))
# if a node is short enough (we tolerate a bit longer than the unrolling length and doesn't look like it's high coverage enough to be unrolled then we drop it's loop edge and hope we can reconnect
if node in coverage and coverage[node] < 1.1*avg_coverage and nodelen <= max_unroll_length:
if node in coverage and coverage[node] < 1.1*avg_coverage and nodelen <= 1.5*max_unroll_length:
sys.stderr.write("%s removed edges\n"%(node))
del edges[">" + node]
del edges["<" + node]
Expand Down

0 comments on commit 88d9cbb

Please sign in to comment.