From 90ba980de60d3a10ff9e1be4c7a2ca41a03eb860 Mon Sep 17 00:00:00 2001 From: Eric Coissac Date: Tue, 30 Aug 2022 10:28:05 +0200 Subject: [PATCH] correct the gml writer --- pkg/obitools/obiclean/graph.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/obitools/obiclean/graph.go b/pkg/obitools/obiclean/graph.go index fe0ad87..cce3218 100644 --- a/pkg/obitools/obiclean/graph.go +++ b/pkg/obitools/obiclean/graph.go @@ -94,11 +94,11 @@ func Gml(seqs *[]*seqPCR, sample string, statThreshold int) string { comment "Obiclean graph for sample {{ Name }}" directed 1 {{range $index, $data:= .}} - {{ if or $data.Fathers $data.HasSon}} + {{ if or $data.Fathers (gt $data.SonCount 0)}} node [ id {{$index}} graphics [ type "{{ Shape $data.Count }}" - fill "{{ if and $data.HasSon (not $data.Fathers)}}#0000FF{{ else }}#00FF00{{ end }}" + fill "{{ if and (gt $data.SonCount 0) (not $data.Fathers)}}#0000FF{{ else }}#00FF00{{ end }}" h {{ Sqrt $data.Count }} w {{ Sqrt $data.Count }} ]