Update of obipcr and homogenization of logging

Former-commit-id: 46abf47c19ace5248042c02cf1f81d9f6c12eb10
This commit is contained in:
Eric Coissac
2024-05-16 15:18:30 +02:00
parent 61be8a55b1
commit 55ce36f329
27 changed files with 345 additions and 58 deletions

View File

@ -14,6 +14,7 @@ type __options__ struct {
total_seq_size int
full_file_batch bool
parallel_workers int
no_order bool
closefile bool
appendfile bool
compressed bool
@ -48,6 +49,7 @@ func MakeOptions(setters []WithOption) Options {
parallel_workers: obioptions.CLIReadParallelWorkers(),
batch_size: obioptions.CLIBatchSize(),
total_seq_size: 1024 * 1024 * 100, // 100 MB by default
no_order: false,
full_file_batch: false,
closefile: false,
appendfile: false,
@ -101,6 +103,10 @@ func (opt Options) FormatFastSeqHeader() func(*obiseq.BioSequence) string {
return opt.pointer.fastseq_header_writer
}
func (opt Options) NoOrder() bool {
return opt.pointer.no_order
}
func (opt Options) ProgressBar() bool {
return opt.pointer.with_progress_bar
}
@ -205,6 +211,16 @@ func OptionsAppendFile(append bool) WithOption {
return f
}
func OptionNoOrder(no_order bool) WithOption {
f := WithOption(func(opt Options) {
opt.pointer.no_order = no_order
})
return f
}
func OptionsCompressed(compressed bool) WithOption {
f := WithOption(func(opt Options) {
opt.pointer.compressed = compressed