mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
Patch a bug in the obi2 annotation parser on map indexed by integers
This commit is contained in:
@ -18,6 +18,7 @@ import (
|
||||
|
||||
var __obi_header_value_string_pattern__ = regexp.MustCompile(`^'\s*([^']*'|"[^"]*")\s*;`)
|
||||
var __obi_header_value_numeric_pattern__ = regexp.MustCompile(`^\s*([+-]?\.\d+|[+-]?\d+(\.\d*)?([eE][+-]?\d+)?)\s*;`)
|
||||
var __obi_header_map_int_key__ = regexp.MustCompile("([{,])([0-9]+):")
|
||||
|
||||
func __match__dict__(text []byte) []int {
|
||||
|
||||
@ -212,6 +213,7 @@ func ParseOBIFeatures(text string, annotations obiseq.Annotation) string {
|
||||
if len(m) > 0 {
|
||||
bvalue = bytes.TrimSpace(part[m[0]:(m[1] - 1)])
|
||||
j := bytes.ReplaceAll(bvalue, []byte("'"), []byte(`"`))
|
||||
j = __obi_header_map_int_key__.ReplaceAll(j, []byte(`$1"$2":`))
|
||||
var err error
|
||||
switch {
|
||||
case strings.HasPrefix(key, "merged_") ||
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
// corresponds to the last commit, and not the one when the file will be
|
||||
// commited
|
||||
|
||||
var _Commit = "5a3705b"
|
||||
var _Commit = "fd80249"
|
||||
var _Version = "Release 4.4.0"
|
||||
|
||||
// Version returns the version of the obitools package.
|
||||
|
Reference in New Issue
Block a user