Patch the empty batch bug

Former-commit-id: fcee04b58f2c4a0bf2c27792f991391c0b6ce78e
This commit is contained in:
coissac committed 2023-03-07 20:16:06 +07:00
1 parent 1e7756ec91
commit 5fbe52368c
6 files changed
+11 -35

No files matched your search

+1
View File
@@ -69,6 +69,7 @@ func WriteFasta(iterator obiiter.IBioSequence,
options ...WithOption) (obiiter.IBioSequence, error) {
opt := MakeOptions(options)
iterator = iterator.Rebatch(10000)
file, _ = goutils.CompressStream(file, opt.CompressedFile(), opt.CloseFile())
newIter := obiiter.MakeIBioSequence()
+3
View File
@@ -56,6 +56,9 @@ type FileChunck struct {
func WriteFastq(iterator obiiter.IBioSequence,
file io.WriteCloser,
options ...WithOption) (obiiter.IBioSequence, error) {
iterator = iterator.Rebatch(10000)
opt := MakeOptions(options)
file, _ = goutils.CompressStream(file, opt.CompressedFile(), opt.CloseFile())
-2
View File
@@ -14,8 +14,6 @@ func WriteSequence(iterator obiiter.IBioSequence,
file io.WriteCloser,
options ...WithOption) (obiiter.IBioSequence, error) {
iterator = iterator.Rebatch(1000)
ok := iterator.Next()
if ok {