Skip to content

Commit

Permalink
fix bug with reverse strand if pyrodigal overlap called
Browse files Browse the repository at this point in the history
  • Loading branch information
gbouras13 committed Jan 30, 2024
1 parent 608d635 commit aead582
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "dnaapler"
version = "0.5.2" # change VERSION too
version = "0.6.0" # change VERSION too
description = "Reorients assembled microbial sequences"
authors = ["George Bouras <[email protected]>"]
license = "MIT"
Expand Down
10 changes: 9 additions & 1 deletion src/dnaapler/utils/processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,17 @@ def reorient_sequence(
# Find the gene with the max overlap
closest_gene_index = max(overlap_dict, key=lambda key: overlap_dict[key])

start = genes[closest_gene_index].begin
# get strand
strand = genes[closest_gene_index].strand

# susie error 30-01-24 - misorienting on the negative strand
# 'begin' just gives the lowest value, not the start, so was putting the terL at the end i.e. reorienting from the end of terL
# therefore need to take end
if strand == 1:
start = genes[closest_gene_index].begin
elif strand == -1:
start = genes[closest_gene_index].end

if strand == 1:
strand_eng = "forward"
else:
Expand Down

0 comments on commit aead582

Please sign in to comment.