From e55c5a2997d1b55b6333c4bf3ac9ac30fc9fd993 Mon Sep 17 00:00:00 2001 From: Mark Quinton-Tulloch Date: Tue, 30 Apr 2024 11:39:37 +0100 Subject: [PATCH] Handle genes with missing gene class --- scripts/dump_citindex.pl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/dump_citindex.pl b/scripts/dump_citindex.pl index db0584586..d2a9fa1c0 100644 --- a/scripts/dump_citindex.pl +++ b/scripts/dump_citindex.pl @@ -71,14 +71,19 @@ sub print_gene{ my @c = split(/\s+/,"${\$g->History->right(2)}"); my $creation_date = $c[2]; - + + my $title = $g->CGC_name; + if ($g->Gene_class && $g->Gene_class->Description) { + $title .= " (${\$g->Gene_class->Description})"; + } + print STDERR "processing $g\n" if $debug; my $data = " $year\n". " $creation_date\n". " WormBase\n". " WormBase\n". - " ".$g->CGC_name." (${\$g->Gene_class->Description})\n"; + " " . $title . "\n"; ### people block ###################### # search through the CGC_name, the Concise_description and the Provisional_description