mirror of
https://github.com/metabarcoding/obitools4.git
synced 2026-11-10 01:24:41 +00:00
Adds a genbank parser
This commit is contained in:
1 parent
a71e65963b
commit
5a81525e46
2 files changed
+171
-1
No files matched your search
@@ -30,7 +30,12 @@ func GuessSeqFileType(firstline string) string {
|
||||
return "embl"
|
||||
|
||||
case strings.HasPrefix(firstline, "LOCUS "):
|
||||
return "genebank"
|
||||
return "genbank"
|
||||
|
||||
// Special case for genbank release files
|
||||
// I hope it is enougth stringeant
|
||||
case strings.HasSuffix(firstline, " Genetic Se"):
|
||||
return "genbank"
|
||||
|
||||
default:
|
||||
return "unknown"
|
||||
@@ -86,6 +91,8 @@ func ReadSequencesBatchFromFile(filename string,
|
||||
return ReadEcoPCRBatch(reader, options...), nil
|
||||
case "embl":
|
||||
return ReadEMBLBatch(reader, options...), nil
|
||||
case "genbank":
|
||||
return ReadGenbankBatch(reader, options...), nil
|
||||
default:
|
||||
log.Fatalf("File %s has guessed format %s which is not yet implemented",
|
||||
filename, filetype)
|
||||
|
||||
Reference in new issue
Block a user