Handle fasta with no line breaks.
authorTom Clegg <tom@curii.com>
Fri, 7 Jan 2022 16:20:06 +0000 (11:20 -0500)
committerTom Clegg <tom@curii.com>
Fri, 7 Jan 2022 16:20:06 +0000 (11:20 -0500)
fixes #18619

Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@curii.com>

tilelib.go

index 289f8895e5ba420b00d0d449f9a916cfcaf5d4f5..6acd8d6a26f9f91a07e30b8803bab04d95d57a7a 100644 (file)
@@ -556,6 +556,7 @@ func (tilelib *tileLibrary) TileFasta(filelabel string, rdr io.Reader, matchChro
        }
        todo := make(chan jobT, 1)
        scanner := bufio.NewScanner(rdr)
        }
        todo := make(chan jobT, 1)
        scanner := bufio.NewScanner(rdr)
+       scanner.Buffer(make([]byte, 256), 1<<29) // 512 MiB, in case fasta does not have line breaks
        go func() {
                defer close(todo)
                var fasta []byte
        go func() {
                defer close(todo)
                var fasta []byte