mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-12-10 09:40:27 +00:00
Muspelling chunck -> chunk
This commit is contained in:
@@ -142,7 +142,7 @@ func WriteCSV(iterator obiiter.IBioSequence,
|
||||
nwriters := opt.ParallelWorkers()
|
||||
|
||||
obiiter.RegisterAPipe()
|
||||
chunkchan := make(chan FileChunck)
|
||||
chunkchan := make(chan FileChunk)
|
||||
|
||||
newIter.Add(nwriters)
|
||||
var waitWriter sync.WaitGroup
|
||||
@@ -161,7 +161,7 @@ func WriteCSV(iterator obiiter.IBioSequence,
|
||||
|
||||
batch := iterator.Get()
|
||||
|
||||
chunkchan <- FileChunck{
|
||||
chunkchan <- FileChunk{
|
||||
FormatCVSBatch(batch, opt),
|
||||
batch.Order(),
|
||||
}
|
||||
@@ -171,7 +171,7 @@ func WriteCSV(iterator obiiter.IBioSequence,
|
||||
}
|
||||
|
||||
next_to_send := 0
|
||||
received := make(map[int]FileChunck, 100)
|
||||
received := make(map[int]FileChunk, 100)
|
||||
|
||||
waitWriter.Add(1)
|
||||
go func() {
|
||||
|
||||
@@ -136,7 +136,7 @@ func WriteFasta(iterator obiiter.IBioSequence,
|
||||
nwriters := opt.ParallelWorkers()
|
||||
|
||||
obiiter.RegisterAPipe()
|
||||
chunkchan := make(chan FileChunck)
|
||||
chunkchan := make(chan FileChunk)
|
||||
|
||||
header_format := opt.FormatFastSeqHeader()
|
||||
|
||||
@@ -159,7 +159,7 @@ func WriteFasta(iterator obiiter.IBioSequence,
|
||||
|
||||
log.Debugf("Formating fasta chunk %d", batch.Order())
|
||||
|
||||
chunkchan <- FileChunck{
|
||||
chunkchan <- FileChunk{
|
||||
FormatFastaBatch(batch, header_format, opt.SkipEmptySequence()),
|
||||
batch.Order(),
|
||||
}
|
||||
@@ -177,7 +177,7 @@ func WriteFasta(iterator obiiter.IBioSequence,
|
||||
}
|
||||
|
||||
next_to_send := 0
|
||||
received := make(map[int]FileChunck, 100)
|
||||
received := make(map[int]FileChunk, 100)
|
||||
|
||||
waitWriter.Add(1)
|
||||
go func() {
|
||||
|
||||
@@ -87,7 +87,7 @@ func FormatFastqBatch(batch obiiter.BioSequenceBatch,
|
||||
return chunk
|
||||
}
|
||||
|
||||
type FileChunck struct {
|
||||
type FileChunk struct {
|
||||
text []byte
|
||||
order int
|
||||
}
|
||||
@@ -106,7 +106,7 @@ func WriteFastq(iterator obiiter.IBioSequence,
|
||||
nwriters := opt.ParallelWorkers()
|
||||
|
||||
obiiter.RegisterAPipe()
|
||||
chunkchan := make(chan FileChunck)
|
||||
chunkchan := make(chan FileChunk)
|
||||
|
||||
header_format := opt.FormatFastSeqHeader()
|
||||
|
||||
@@ -126,7 +126,7 @@ func WriteFastq(iterator obiiter.IBioSequence,
|
||||
ff := func(iterator obiiter.IBioSequence) {
|
||||
for iterator.Next() {
|
||||
batch := iterator.Get()
|
||||
chunk := FileChunck{
|
||||
chunk := FileChunk{
|
||||
FormatFastqBatch(batch, header_format, opt.SkipEmptySequence()),
|
||||
batch.Order(),
|
||||
}
|
||||
@@ -143,7 +143,7 @@ func WriteFastq(iterator obiiter.IBioSequence,
|
||||
}
|
||||
|
||||
next_to_send := 0
|
||||
received := make(map[int]FileChunck, 100)
|
||||
received := make(map[int]FileChunk, 100)
|
||||
|
||||
waitWriter.Add(1)
|
||||
go func() {
|
||||
|
||||
@@ -3,7 +3,6 @@ package obiformats
|
||||
import (
|
||||
"bufio"
|
||||
"bytes"
|
||||
"github.com/goccy/go-json"
|
||||
"io"
|
||||
"os"
|
||||
"strconv"
|
||||
@@ -11,6 +10,8 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/goccy/go-json"
|
||||
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiiter"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiseq"
|
||||
"git.metabarcoding.org/obitools/obitools4/obitools4/pkg/obiutils"
|
||||
@@ -87,7 +88,7 @@ func WriteJSON(iterator obiiter.IBioSequence,
|
||||
nwriters := opt.ParallelWorkers()
|
||||
|
||||
obiiter.RegisterAPipe()
|
||||
chunkchan := make(chan FileChunck)
|
||||
chunkchan := make(chan FileChunk)
|
||||
|
||||
newIter.Add(nwriters)
|
||||
var waitWriter sync.WaitGroup
|
||||
@@ -106,7 +107,7 @@ func WriteJSON(iterator obiiter.IBioSequence,
|
||||
|
||||
batch := iterator.Get()
|
||||
|
||||
chunkchan <- FileChunck{
|
||||
chunkchan <- FileChunk{
|
||||
FormatJSONBatch(batch),
|
||||
batch.Order(),
|
||||
}
|
||||
@@ -116,7 +117,7 @@ func WriteJSON(iterator obiiter.IBioSequence,
|
||||
}
|
||||
|
||||
next_to_send := 0
|
||||
received := make(map[int]FileChunck, 100)
|
||||
received := make(map[int]FileChunk, 100)
|
||||
|
||||
waitWriter.Add(1)
|
||||
go func() {
|
||||
|
||||
@@ -102,7 +102,7 @@ func ReadSeqFileChunk(
|
||||
buff = fullbuff[0:lremain]
|
||||
lcp := copy(buff, fullbuff[pnext:])
|
||||
if lcp < lremain {
|
||||
log.Fatalf("Error copying remaining data of chunck %d : %d < %d", i, lcp, lremain)
|
||||
log.Fatalf("Error copying remaining data of chunk %d : %d < %d", i, lcp, lremain)
|
||||
}
|
||||
} else {
|
||||
buff = buff[:0]
|
||||
Reference in New Issue
Block a user