mirror of
https://github.com/metabarcoding/obitools4.git
synced 2026-11-09 17:24:41 +00:00
feat: add JSON input support for biological sequences
Introduce a streaming JSON parser that decodes biological sequences using `goccy/go-json` with configurable batching to minimize memory overhead. Extend the CLI, file suffix filters, and MIME type detection to automatically recognize and route JSON inputs. Refactor header parsing into a centralized switch-case handler for improved maintainability.
This commit is contained in:
1 parent
9de463ef1e
commit
d735ac6188
6 files changed
+273
-97
No files matched your search
@@ -145,6 +145,8 @@ func ReadSequencesFromFile(filename string,
|
||||
return ReadGenbank(reader, options...)
|
||||
case "text/csv":
|
||||
return ReadCSV(reader, options...)
|
||||
case "application/json":
|
||||
return ReadJSON(reader, options...)
|
||||
default:
|
||||
log.Fatalf("File %s has guessed format %s which is not yet implemented",
|
||||
filename, mime.String())
|
||||
|
||||
Reference in new issue
Block a user