Skip to content

Commit

Permalink
Trim byte for refSeqLen
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Nov 1, 2021
1 parent 9e05acb commit 8a9a9dc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions products/jbrowse-desktop/public/generateFastaIndex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@ class FastaIndexTransform extends Transform {

_transform(chunk: Buffer, encoding: any, done: () => void) {
const line = chunk.toString()
const currentLineBytes =
line.indexOf('\r') !== -1 ? line.length + 2 : line.length + 1
const currentLineBases = line.length
// line length in bytes including the \n that we split on
const currentLineBytes = chunk.length + 1
// chop off \r if exists
const currentLineBases = line.trim().length
if (line[0] === '>') {
this.foundAny = true
if (
Expand Down

0 comments on commit 8a9a9dc

Please sign in to comment.