Adds a genbank parser

This commit is contained in:
2022-08-23 11:04:57 +02:00
parent a71e65963b
commit 5a81525e46
2 changed files with 171 additions and 1 deletions

View File

@ -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)