<commit_before>use strict;
use warnings;

package Bio::EnsEMBL::DBSQL::MetaCoordContainer;

use vars qw(@ISA);
use strict;

use Bio::EnsEMBL::DBSQL::BaseAdaptor;
use Bio::EnsEMBL::Utils::Exception;

@ISA = qw(Bio::EnsEMBL::DBSQL::BaseAdaptor);




sub new {
  my $class = shift;

  my $self = $class->SUPER::new(@_);

  #
  # Retrieve the list of the coordinate systems that features are stored
  # in and cache them.
  #

  my $sth = $self->prepare(
              'SELECT mc.table_name, mc.coord_system_id, mc.max_length '
                . 'FROM meta_coord mc, coord_system cs '
                . 'WHERE mc.coord_system_id = cs.coord_system_id '
                . 'AND cs.species_id = ?' );

  $sth->bind_param( 1, $self->species_id(), SQL_INTEGER );
  $sth->execute();<commit_msg>Use the coord_system table from the database connected as the 'dnadb' database in new().<commit_after>use strict;
use warnings;

package Bio::EnsEMBL::DBSQL::MetaCoordContainer;

use vars qw(@ISA);
use strict;

use Bio::EnsEMBL::DBSQL::BaseAdaptor;
use Bio::EnsEMBL::Utils::Exception;

@ISA = qw(Bio::EnsEMBL::DBSQL::BaseAdaptor);




sub new {
  my $class = shift;

  my $self = $class->SUPER::new(@_);

  #
  # Retrieve the list of the coordinate systems that features are stored
  # in and cache them.
  #

  my $sth = $self->prepare(
            sprintf(
              'SELECT mc.table_name, mc.coord_system_id, mc.max_length '
                . 'FROM meta_coord mc, %s.coord_system cs '
                . 'WHERE mc.coord_system_id = cs.coord_system_id '
                . 'AND cs.species_id = ?',
              $self->db()->dnadb()->dbc()->dbname() ) );

  $sth->bind_param( 1, $self->species_id(), SQL_INTEGER );
  $sth->execute();
{'fraction_non_alphanumeric': 0.14593023255813953, 'fraction_numerical': 0.0011627906976744186, 'mean_word_length': 3.0494117647058823, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6807948', 'n_tokens_mistral': 645, 'n_tokens_neox': 609, 'n_words': 138}