From 034211fb22188930161a9d79d0e52b92f7c4b948 Mon Sep 17 00:00:00 2001 From: Kez Cleal <42997789+kcleal@users.noreply.github.com> Date: Wed, 31 Jul 2024 16:50:47 +0100 Subject: [PATCH] Updated GFF3 GTF names --- src/hts_funcs.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/hts_funcs.cpp b/src/hts_funcs.cpp index 332e7f2..d1fbb8d 100644 --- a/src/hts_funcs.cpp +++ b/src/hts_funcs.cpp @@ -1821,6 +1821,10 @@ namespace HGW { std::vector keyval = Utils::split(item, '='); if (keyval[0] == "ID") { rid = keyval[1]; + } else if (keyval[0] == "Name") { + parent = keyval[1]; + rid = keyval[1]; + break; } else if (keyval[0] == "Parent") { parent = keyval[1]; @@ -1828,12 +1832,12 @@ namespace HGW { } } else { std::vector keyval = Utils::split(item, ' '); - if (keyval[0] == "transcript_id") { - rid = keyval[1]; - } - else if (keyval[0] == "gene_id") { + if (keyval[0] == "gene_id") { parent = keyval[1]; + rid = keyval[1]; break; + } else if (keyval[0] == "transcript_id") { + rid = keyval[1]; } } }