Small bug in sequence counting on merge

This commit is contained in:
2022-05-30 16:28:59 +02:00
parent f14860a486
commit cf5b4baa54
5 changed files with 21 additions and 4 deletions

View File

@@ -41,7 +41,7 @@ func UniqueOptionSet(options *getoptions.GetOpt) {
}
// OptionSet adds to the basic option set every options declared for
// the obipcr command
// the obiuniq command
func OptionSet(options *getoptions.GetOpt) {
obiconvert.OptionSet(options)
UniqueOptionSet(options)

View File

@@ -16,6 +16,11 @@ func Unique(sequences obiiter.IBioSequenceBatch) obiiter.IBioSequenceBatch {
obichunk.OptionBatchCount(CLINumberOfChunks()),
)
//
// Considers if data splitting must be done on disk or in memory
//
// --on-disk command line option
if CLIUniqueInMemory() {
log.Printf("Running dereplication in memory on %d chunks", CLINumberOfChunks())
options = append(options, obichunk.OptionSortOnMemory())
@@ -24,6 +29,12 @@ func Unique(sequences obiiter.IBioSequenceBatch) obiiter.IBioSequenceBatch {
options = append(options, obichunk.OptionSortOnDisk())
}
//
// Considers if sequences observed a singletime in the dataset have to
// be conserved in the output
//
// --no-singleton
if CLINoSingleton() {
log.Printf("Removing sigletons from the output")
options = append(options, obichunk.OptionsNoSingleton())