Skip to content

Commit

Permalink
fixing the start coord to avoid negative numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
scottcain committed Nov 25, 2024
1 parent 3b1fef3 commit 9f94ad2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/accessFasta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export async function accessFasta(
gzi: gziFilehandle,
});

const upstreamstart = start - 499;
const upstreamstart = start - 499 < 0 ? 0 : start - 499;
const downstreamend = end + 499;
const seq = await t.getSequence(refseq, start, end);
const upstream = await t.getSequence(refseq, upstreamstart, start);
Expand Down

0 comments on commit 9f94ad2

Please sign in to comment.