From 1ce5da9bee2c54bc4bc19259f2e7e16639ef578d Mon Sep 17 00:00:00 2001 From: Eric Coissac Date: Wed, 11 Feb 2026 06:31:03 +0100 Subject: [PATCH] Support new sequence file formats and improve error handling Add support for .gbff and .gbff.gz file extensions in sequence reader. Update the logic to return an error instead of using NilIBioSequence when no sequence files are found, improving the error handling and user feedback. --- pkg/obitools/obiconvert/sequence_reader.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/obitools/obiconvert/sequence_reader.go b/pkg/obitools/obiconvert/sequence_reader.go index aff14fd..d05c881 100644 --- a/pkg/obitools/obiconvert/sequence_reader.go +++ b/pkg/obitools/obiconvert/sequence_reader.go @@ -68,6 +68,8 @@ func ExpandListOfFiles(check_ext bool, filenames ...string) ([]string, error) { strings.HasSuffix(path, "seq.gz") || strings.HasSuffix(path, "gb") || strings.HasSuffix(path, "gb.gz") || + strings.HasSuffix(path, "gbff") || + strings.HasSuffix(path, "gbff.gz") || strings.HasSuffix(path, "dat") || strings.HasSuffix(path, "dat.gz") || strings.HasSuffix(path, "ecopcr") || @@ -204,7 +206,7 @@ func CLIReadBioSequences(filenames ...string) (obiiter.IBioSequence, error) { iterator = iterator.PairTo(ip) } } else { - iterator = obiiter.NilIBioSequence + return obiiter.NilIBioSequence, fmt.Errorf("no sequence files found in the provided paths") } }