From 32e03721e66e20c4af413126a9c07b490cd1ebe5 Mon Sep 17 00:00:00 2001 From: Kim Rutherford Date: Thu, 13 Jan 2022 23:17:49 +1300 Subject: [PATCH] Fix load of RNA ID that looks like a transcript ID "SPNCRNA.5" was confusing the code because it looks like the 5th transcript of gene "SPNCRNA". Fixed by adding special cases in the code. Refs pombase/pombase-chado#904 --- lib/PomBase/Chado/LoadFeat.pm | 3 ++- lib/PomBase/Role/Embl/SystematicID.pm | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/PomBase/Chado/LoadFeat.pm b/lib/PomBase/Chado/LoadFeat.pm index 30ba3b1..2ecb3a8 100644 --- a/lib/PomBase/Chado/LoadFeat.pm +++ b/lib/PomBase/Chado/LoadFeat.pm @@ -682,7 +682,8 @@ sub store_transcript_parts { my $introns = shift; my $uniquename = ($bioperl_cds->get_tag_values('systematic_id'))[0]; - if ($uniquename !~ /\.\d$/) { + + if ($uniquename !~ /\.\d$/ || $uniquename =~ /^SPNCRNA\.\d+$/) { $uniquename .= '.1'; } diff --git a/lib/PomBase/Role/Embl/SystematicID.pm b/lib/PomBase/Role/Embl/SystematicID.pm index 0cb233b..221cb99 100644 --- a/lib/PomBase/Role/Embl/SystematicID.pm +++ b/lib/PomBase/Role/Embl/SystematicID.pm @@ -101,8 +101,10 @@ sub get_uniquename { # warn "BEFORE $so_type - systematic_id: $systematic_id\n"; - if ($is_transcript && $systematic_id !~ /\.\d$/) { - $systematic_id .= '.1'; + if ($is_transcript) { + if ($systematic_id =~ /^SPNCRNA\.\d+$/ || $systematic_id !~ /\.\d$/) { + $systematic_id .= '.1'; + } } # warn "AFTER $so_type - systematic_id: $systematic_id\n";