mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-12-08 00:30:27 +00:00
Patch the fastq detector
This commit is contained in:
@@ -568,6 +568,8 @@ func ReadCSVNGSFilter(reader io.Reader) (*obingslibrary.NGSLibrary, error) {
|
|||||||
for i = 0; i < len(records) && records[i][0] == "@param"; i++ {
|
for i = 0; i < len(records) && records[i][0] == "@param"; i++ {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Infof("%d parameters found", i)
|
||||||
|
|
||||||
params := records[0:i]
|
params := records[0:i]
|
||||||
records = records[i:]
|
records = records[i:]
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
// corresponds to the last commit, and not the one when the file will be
|
// corresponds to the last commit, and not the one when the file will be
|
||||||
// commited
|
// commited
|
||||||
|
|
||||||
var _Commit = "730d448"
|
var _Commit = "7a6d552"
|
||||||
var _Version = "Release 4.4.0"
|
var _Version = "Release 4.4.0"
|
||||||
|
|
||||||
// Version returns the version of the obitools package.
|
// Version returns the version of the obitools package.
|
||||||
|
|||||||
@@ -78,7 +78,11 @@ func RegisterOBIMimeType() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fastqDetector := func(raw []byte, limit uint32) bool {
|
fastqDetector := func(raw []byte, limit uint32) bool {
|
||||||
ok, err := regexp.Match("^@[^ ].*\n[A-Za-z.-]+\n\\+", raw)
|
ok, err := regexp.Match("^@[^ ].*\n[A-Za-z.-]+", raw)
|
||||||
|
if ok && err == nil {
|
||||||
|
ok, err = regexp.Match("^@param,[^ ]", raw)
|
||||||
|
ok = !ok
|
||||||
|
}
|
||||||
return ok && err == nil
|
return ok && err == nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user