Skip to content

Commit

Permalink
reverse starnd fix
Browse files Browse the repository at this point in the history
  • Loading branch information
shashankbrgowda committed Jan 15, 2024
1 parent 6aa5542 commit 076a366
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,11 @@ function getMousePosition(
}

function getSeqRow(feature: AnnotationFeatureI, bpPerPx: number) {
const rowOffset = bpPerPx <= 1 ? 5 : 3
if (feature.type === 'CDS' && feature.phase != undefined) {
const r =
feature.strand === -1
? (feature.end - 1 - feature.phase) % 3
: (feature.start - 1 - feature.phase) % 3
return Math.abs(r - 2)
return feature.strand === -1
? Math.abs(((feature.end - 1 - feature.phase) % 3) - 2) + rowOffset
: Math.abs(((feature.start - 1 - feature.phase) % 3) - 2)
}

if (bpPerPx <= 1) {
Expand Down

0 comments on commit 076a366

Please sign in to comment.