From c6391878b4be0715efddcad8ce11fff3f9802dd3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Carn=C3=AB=20Draug?= Date: Tue, 29 Jan 2019 17:51:35 +0000 Subject: [PATCH] bin/bp_genbank2gff3: fix sorting by feature type (issue #285) If comparison by typeorder failed, it never sorted by primary tag because "or" has lower precedence than return. --- bin/bp_genbank2gff3 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/bp_genbank2gff3 b/bin/bp_genbank2gff3 index 046f73fc2..7149b8445 100644 --- a/bin/bp_genbank2gff3 +++ b/bin/bp_genbank2gff3 @@ -680,9 +680,9 @@ sub typeorder { sub sort_by_feattype { my($at,$bt)= ($a->primary_tag, $b->primary_tag); - return (typeorder($at) <=> typeorder($bt)) - or ($at cmp $bt); - ## or ($a->name() cmp $b->name()); + return (typeorder($at) <=> typeorder($bt)) + || ($at cmp $bt); + ## || ($a->name() cmp $b->name()); } sub print_held { -- 2.11.4.GIT