Skip to content

Commit

Permalink
expand docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nlouwen committed Dec 5, 2024
1 parent 16b51be commit 29ea5a2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 6 additions & 2 deletions big_scape/comparison/lcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,9 @@ def find_domain_lcs_region(

# Length

# clear the lists if it's not empty and the current match is longer
# clear the longest list if it's not empty and the current match is longer.
# also clear the central list as we do not care about a shorter LCS even if it
# is more central
if len(use_longest_list) > 0 and length > use_longest_list[0][1]:
use_longest_list.clear()
use_central_list.clear()
Expand Down Expand Up @@ -524,7 +526,9 @@ def find_domain_lcs_protocluster(

# Length

# clear the lists if it's not empty and the current match is longer
# clear the longest list if it's not empty and the current match is longer.
# also clear the central list as we do not care about a shorter LCS even if it
# is more central
if len(use_longest_list) > 0 and length > use_longest_list[0][1]:
use_longest_list.clear()
use_central_list.clear()
Expand Down
4 changes: 3 additions & 1 deletion big_scape/output/legacy_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,11 +638,13 @@ def write_network_file(
.where(edge_params_table.c.weights.in_(incl_weights))
.where(edge_params_table.c.alignment_mode == aln_mode)
.where(edge_params_table.c.extend_strategy == ext_strat)
.where(distance_table.c.distance < 1)
)

if cutoff is not None:
select_statement = select_statement.where(distance_table.c.distance < cutoff)
else:
# still do not include edges with a distance of 1
select_statement = select_statement.where(distance_table.c.distance < 1)

edgelist = set(DB.execute(select_statement).fetchall())

Expand Down

0 comments on commit 29ea5a2

Please sign in to comment.