Skip to content

Commit

Permalink
Merge pull request #27 from scottcain/fetch_less_than_zero
Browse files Browse the repository at this point in the history
fixing the start coord to avoid negative numbers
  • Loading branch information
scottcain authored Nov 25, 2024
2 parents 3b1fef3 + da35968 commit 36cbe71
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"main": "dist/index.js",
"module": "esm/index.js",
"version": "1.5.1",
"version": "1.5.2",
"keywords": [
"bioinformatics",
"gene page",
Expand Down
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 36cbe71

Please sign in to comment.