From 2587aaded33dccb84d2d90f5bf79872492df355b Mon Sep 17 00:00:00 2001 From: Matthias Blum Date: Thu, 29 Aug 2024 00:02:10 +0100 Subject: [PATCH] Reflect schema change in InterPro payload (#83) --- data/data.go | 10 +++++----- data/interpro.go | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/data/data.go b/data/data.go index c8f80b4..9585450 100644 --- a/data/data.go +++ b/data/data.go @@ -68,14 +68,14 @@ type InterProExtraField struct { } type InterProFragment struct { - Start json.Number `json:"start"` - End json.Number `json:"end"` - SeqFeature string `json:"seq_feature"` - Representative bool `json:"representative"` + Start json.Number `json:"start"` + End json.Number `json:"end"` + SeqFeature string `json:"seq_feature"` } type InterProLocation struct { - Fragments []InterProFragment `json:"fragments"` + Fragments []InterProFragment `json:"fragments"` + Representative bool `json:"representative"` } type InterProMatch struct { diff --git a/data/interpro.go b/data/interpro.go index 0063e1a..6cea775 100644 --- a/data/interpro.go +++ b/data/interpro.go @@ -70,7 +70,7 @@ func GetProteinMatches(database string, accession string) ([]GraphicFeature, err for _, m := range e.Matches { for _, l := range m.Locations { for _, f := range l.Fragments { - if !filterDomains || f.Representative { + if !filterDomains || l.Representative { gf := GraphicFeature{ Text: e.ExtraFields.ShortName, Type: e.Metadata.Type,