Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/src/aln_param.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ int aln_param_init(struct aln_param **aln_param,int biotype , int n_threads, int
ap->gpe = gpe;
}

if(gpe >= 0.0){
if(tgpe >= 0.0){
ap->tgpe = tgpe;
}
/* LOG_MSG("%f %f %f", ap->gpo, ap->gpe, ap->tgpe); */
Expand Down
16 changes: 7 additions & 9 deletions python-kalign/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,25 +200,23 @@ def align(
gap_open = -1.0
elif not isinstance(gap_open, (int, float)):
raise ValueError("gap_open must be a number")
elif gap_open > 0:
raise ValueError("gap_open must be negative or zero (penalty values)")
elif gap_open < 0:
raise ValueError("gap_open must be positive or zero")

if gap_extend is None:
gap_extend = -1.0
elif not isinstance(gap_extend, (int, float)):
raise ValueError("gap_extend must be a number")
elif gap_extend > 0:
raise ValueError("gap_extend must be negative or zero (penalty values)")
elif gap_extend < 0:
raise ValueError("gap_extend must be positive or zero")

if terminal_gap_extend is None:
terminal_gap_extend = -1.0
elif not isinstance(terminal_gap_extend, (int, float)):
raise ValueError("terminal_gap_extend must be a number")
elif terminal_gap_extend > 0:
raise ValueError(
"terminal_gap_extend must be negative or zero (penalty values)"
)

elif terminal_gap_extend < 0:
raise ValueError("terminal_gap_extend must be positive or zero")

# Handle thread count
if n_threads is None:
n_threads = get_num_threads()
Expand Down