Skip to content

Commit

Permalink
Resolve the B023 Function definition does not bind loop variable `ali…
Browse files Browse the repository at this point in the history
…gnment_lengths` issue.
  • Loading branch information
akikuno committed Jul 8, 2024
1 parent 0c97a9b commit 9c85d2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DAJIN2/core/preprocess/midsv_caller.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def extract_best_preset(preset_cigar_by_qname: dict[str, dict[str, str]]) -> dic
continue

# Define a custom key function to prioritize map-ont
def custom_key(key: str) -> tuple[int, bool]:
def custom_key(key: str, alignment_lengths=alignment_lengths) -> tuple[int, bool]:
return (alignment_lengths[key], key == "map-ont")

max_key = max(alignment_lengths, key=custom_key)
Expand Down

0 comments on commit 9c85d2f

Please sign in to comment.