From db6de58548e9920f864ca76e25ec29158ed442ed Mon Sep 17 00:00:00 2001 From: Eric Coissac Date: Sat, 25 Nov 2023 13:55:43 +0100 Subject: [PATCH] Patch bug in ngsfilter reader Former-commit-id: 77a1c39bf9c023bf4a3f58167e1e8a4d5d82e7c9 --- Release-notes.md | 2 ++ pkg/obiformats/ngsfilter_read.go | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Release-notes.md b/Release-notes.md index 87cc731..ad79c6c 100644 --- a/Release-notes.md +++ b/Release-notes.md @@ -6,6 +6,8 @@ - In `obicsv` the **--keep count** was not equivalent to **--count**. - In `obipairing` and `obipcrtag` correct a bug in the alignment procedure leading to negative scores. +- In `obimultiplex` correct a bug leading to a miss-read of the ngsfilter file when tags where written in + lower case. ### New feature diff --git a/pkg/obiformats/ngsfilter_read.go b/pkg/obiformats/ngsfilter_read.go index 3cd0dd0..069c8fb 100644 --- a/pkg/obiformats/ngsfilter_read.go +++ b/pkg/obiformats/ngsfilter_read.go @@ -8,6 +8,7 @@ import ( "git.metabarcoding.org/lecasofts/go/obitools/pkg/obingslibrary" "git.metabarcoding.org/lecasofts/go/obitools/pkg/obiseq" + log "github.com/sirupsen/logrus" ) func _readLines(reader io.Reader) []string { @@ -38,10 +39,12 @@ func _parseMainNGSFilterTags(text string) obingslibrary.TagPair { tags := strings.Split(text, ":") + log.Infof("text: %s, Tags: %v", text, tags) + if len(tags) == 1 { return obingslibrary.TagPair{ - Forward: tags[0], - Reverse: tags[0], + Forward: strings.ToLower(tags[0]), + Reverse: strings.ToLower(tags[0]), } }