From 4a1aad3940db2932f8fbbe39143554349ba5d6fa Mon Sep 17 00:00:00 2001 From: Arne Becker Date: Thu, 30 May 2024 16:01:28 +0100 Subject: [PATCH] Fix the id we use for Bio::Seq - We use an id to construct a Bio::Seq object. Before, we would pass in an actual object reference instead of a string. This could result in a segfault later. This occurs because BioPerl will clone the object. The Transcript object contains DBI handles, these will frequently result in segfaults when cloned. Force a string instead. --- modules/Bio/EnsEMBL/Transcript.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Bio/EnsEMBL/Transcript.pm b/modules/Bio/EnsEMBL/Transcript.pm index a81ac07a0..e29b64fc1 100755 --- a/modules/Bio/EnsEMBL/Transcript.pm +++ b/modules/Bio/EnsEMBL/Transcript.pm @@ -2154,7 +2154,7 @@ sub translate { if ( CORE::length($mrna) < 1 ) { return undef } my $display_id = $self->translation->display_id() - || scalar( $self->translation() ); + || "" . $self->translation(); my $peptide = Bio::Seq->new( -seq => $mrna, -moltype => 'dna',