diff --git a/modules/Bio/EnsEMBL/DBSQL/RepeatConsensusAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/RepeatConsensusAdaptor.pm index 11ca0faf0fd687b573c2c6e99921eef3605c7cd2..881b80492ea8ab6a4b798b4424a051db7a5c3583 100644 --- a/modules/Bio/EnsEMBL/DBSQL/RepeatConsensusAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/RepeatConsensusAdaptor.pm @@ -174,8 +174,7 @@ sub _generic_fetch { SELECT repeat_consensus_id , repeat_name , repeat_class - , repeat_type - , LENGTH(repeat_consensus) + , repeat_type , repeat_consensus FROM repeat_consensus WHERE }. $where_clause); @@ -185,11 +184,16 @@ sub _generic_fetch { \$repeat_consensus_id, \$repeat_name, \$repeat_class, - \$repeat_type, - \$repeat_length, + \$repeat_type, \$repeat_consensus ); + + if ($repeat_consensus =~ /^(\d+)\(N\)$/) { + $repeat_length = $1; + } else { + $repeat_length = CORE::length($repeat_consensus); + } my @consensi; while ($sth->fetch) { push @consensi, Bio::EnsEMBL::RepeatConsensus->new