<commit_before>package EnsEMBL::Web::UserConfig;

use strict;
use Data::Dumper;
use Storable qw( nfreeze freeze thaw);
use Sanger::Graphics::TextHelper;
use Bio::EnsEMBL::Registry;
my $reg = "Bio::EnsEMBL::Registry";

#########
# 'general' settings contain defaults.
# 'user' settings are restored from cookie if available
# 'general' settings are overridden by 'user' settings
#

sub new {
  my $class   = shift;
  my $adaptor = shift;
  my $type    = $class =~/([^:]+)$/ ? $1 : $class;
  my $style   = $adaptor->get_species_defs->ENSEMBL_STYLE || {};
  my $self = {
    '_colourmap' 	=> $adaptor->colourmap,
    '_font_face'        => $style->{GRAPHIC_FONT} || 'Arial',
    '_font_size'        => ( $style->{GRAPHIC_FONTSIZE} *
                             $style->{GRAPHIC_LABEL} ) || 20,
    '_texthelper' 	=> new Sanger::Graphics::TextHelper,
    '_db'         	=> $adaptor->get_adaptor,
    'type'              => $type,
    'species'           => $ENV{'ENSEMBL_SPECIES'} || '', 
    'species_defs'      => $adaptor->get_species_defs,
    'exturl'            => $adaptor->exturl,
    'general'           => {},
    'user'        	=> {},
    '_managers'         => {}, # contains list of added features....
    '_useradded'        => {}, # contains list of added features....
    '_userdatatype_ID'	=> 0, 
    '_r'                => undef, # $adaptor->{'r'} || undef,
    'no_load'     	=> undef,
    'storable'          => 1,
    'altered'           => 0,
    '_core'             => undef
  };

  bless($self, $class);

		
  ########## init sets up defaults in $self->{'general'}
  $self->init( ) if($self->can('init'));
  $self->das_sources( @_ ) if(@_); # we have das sources!!

  ########## load sets up user prefs in $self->{'user'}
#  $self->load() unless(defined $self->{'no_load'});
  return $self;
}<commit_msg>turn off image frame by default<commit_after>package EnsEMBL::Web::UserConfig;

use strict;
use Data::Dumper;
use Storable qw( nfreeze freeze thaw);
use Sanger::Graphics::TextHelper;
use Bio::EnsEMBL::Registry;
my $reg = "Bio::EnsEMBL::Registry";

#########
# 'general' settings contain defaults.
# 'user' settings are restored from cookie if available
# 'general' settings are overridden by 'user' settings
#

sub new {
  my $class   = shift;
  my $adaptor = shift;
  my $type    = $class =~/([^:]+)$/ ? $1 : $class;
  my $style   = $adaptor->get_species_defs->ENSEMBL_STYLE || {};
  my $self = {
    '_colourmap' 	=> $adaptor->colourmap,
    '_font_face'        => $style->{GRAPHIC_FONT} || 'Arial',
    '_font_size'        => ( $style->{GRAPHIC_FONTSIZE} *
                             $style->{GRAPHIC_LABEL} ) || 20,
    '_texthelper' 	=> new Sanger::Graphics::TextHelper,
    '_db'         	=> $adaptor->get_adaptor,
    'type'              => $type,
    'species'           => $ENV{'ENSEMBL_SPECIES'} || '', 
    'species_defs'      => $adaptor->get_species_defs,
    'exturl'            => $adaptor->exturl,
    'general'           => {},
    'user'        	=> {},
    '_managers'         => {}, # contains list of added features....
    '_useradded'        => {}, # contains list of added features....
    '_userdatatype_ID'	=> 0, 
    '_r'                => undef, # $adaptor->{'r'} || undef,
    'no_load'     	=> undef,
    'storable'          => 1,
    'altered'           => 0,
    '_core'             => undef
  };

  bless($self, $class);

		
  ########## init sets up defaults in $self->{'general'}
  $self->init( ) if($self->can('init'));
  $self->{'no_image_frame'}=1;
  $self->das_sources( @_ ) if(@_); # we have das sources!!

  ########## load sets up user prefs in $self->{'user'}
#  $self->load() unless(defined $self->{'no_load'});
  return $self;
}
{'fraction_non_alphanumeric': 0.19708029197080293, 'fraction_numerical': 0.003514463368477967, 'mean_word_length': 2.537284894837476, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 76, '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': '5429328', 'n_tokens_mistral': 1339, 'n_tokens_neox': 1253, 'n_words': 274}