ensembl-hive  2.8.1
Bio::EnsEMBL::IdMapping::Cache Class Reference

Public Member Functions

public Bio::EnsEMBL::IdMapping::Cache new ()
 
public List build_cache_by_slice ()
 
public List build_cache_all ()
 
public Int build_cache_from_genes ()
 
public Listref filter_biotypes ()
 
public Bio::EnsEMBL::IdMapping::TinyFeature add ()
 
public Listref add_list ()
 
public get_by_key ()
 
public get_by_name ()
 
public get_count_by_name ()
 
public find_common_coord_systems ()
 
public seq_regions_compatible ()
 
public check_db_connection ()
 
public check_db_read_permissions ()
 
public check_db_write_permissions ()
 
public do_upload ()
 
public get_db_privs ()
 
public check_empty_tables ()
 
public check_sequence ()
 
public check_meta_entries ()
 
public fetch_value_from_db ()
 
public get_DBAdaptor ()
 
public get_production_DBAdaptor ()
 
public cache_file_exists ()
 
public cache_file ()
 
public instance_file ()
 
public dump_path ()
 
public write_all_to_file ()
 
public write_to_file ()
 
public write_instance_to_file ()
 
public read_from_file ()
 
public read_and_merge ()
 
public merge ()
 
public read_instance_from_file ()
 
public slice_names ()
 
public logger ()
 
public conf ()
 
public cache_method ()
 
public highest_common_cs ()
 
public highest_common_cs_version ()
 
public add_common_cs ()
 
public is_common_cs ()
 

Detailed Description

Description

 

Definition at line 18 of file Cache.pm.

Member Function Documentation

◆ add()

public Bio::EnsEMBL::IdMapping::TinyFeature Bio::EnsEMBL::IdMapping::Cache::add ( )
  Arg[1]      : String $name - a cache name (e.g. 'genes_by_id')
  Arg[2]      : String type - a cache type (e.g. "source.$slice_name")
  Arg[3]      : String $key - key of this entry (e.g. a gene dbID)
  Arg[4]      : Bio::EnsEMBL::IdMappping::TinyFeature $val - value to cache
  Example     :
$cache->add('genes_by_id',
                  'source.chromosome:NCBI36:X:1:1000000:1', '1234', $tiny_gene);
  Description : Adds a TinyFeature object to a named cache.
  Return type : Bio::EnsEMBL::IdMapping::TinyFeature
  Exceptions  : thrown on wrong or missing arguments
  Caller      : internal
  Status      : At Risk
              : under development
 
Code:
click to view

◆ add_common_cs()

public Bio::EnsEMBL::IdMapping::Cache::add_common_cs ( )

Undocumented method

Code:
click to view

◆ add_list()

public Listref Bio::EnsEMBL::IdMapping::Cache::add_list ( )
  Arg[1]      : String $name - a cache name (e.g. 'genes_by_id')
  Arg[2]      : String type - a cache type (e.g. "source.$slice_name")
  Arg[3]      : String $key - key of this entry (e.g. a gene dbID)
  Arg[4]      : List of Bio::EnsEMBL::IdMappping::TinyFeature @val - values
                to cache
  Example     :
$cache->add_list('transcripts_by_exon_id',
                  'source.chromosome:NCBI36:X:1:1000000:1', '1234',
                  $tiny_transcript1, $tiny_transcript2);
  Description : Adds a list of TinyFeature objects to a named cache.
  Return type : Listref of Bio::EnsEMBL::IdMapping::TinyFeature objects
  Exceptions  : thrown on wrong or missing arguments
  Caller      : internal
  Status      : At Risk
              : under development
 
Code:
click to view

◆ build_cache_all()

public List Bio::EnsEMBL::IdMapping::Cache::build_cache_all ( )
  Arg[1]      : String $dbtype - db type (source|target)
  Example     :
my ($num_genes, $filesize) = $cache->build_cache_all('source');
  Description : Builds a cache of genes, transcripts, translations and exons
                needed by the IdMapping application and serialises the
                resulting cache object to a file. All genes across the genome
                are processed in one go. This method should be used when
                build_cache_by_seq_region can't be used due to a large number
                of toplevel seq_regions (e.g. 2x genomes).
  Return type : list of the number of genes processed and the size of the
                serialised cache file
  Exceptions  : thrown on invalid slice name
  Caller      : general
  Status      : At Risk
              : under development
 
Code:
click to view

◆ build_cache_by_slice()

public List Bio::EnsEMBL::IdMapping::Cache::build_cache_by_slice ( )
  Arg[1]      : String $dbtype - db type (source|target)
  Arg[2]      : String $slice_name - the name of a slice (format as returned by
                Bio::EnsEMBL::Slice->name)
  Example     :
my ($num_genes, $filesize) = $cache->build_cache_by_slice(
                  'source', 'chromosome:NCBI36:X:1:1000000:-1');
  Description : Builds a cache of genes, transcripts, translations and exons
                needed by the IdMapping application and serialises the resulting
                cache object to a file, one slice at a time.
  Return type : list of the number of genes processed and the size of the
                serialised cache file
  Exceptions  : thrown on invalid slice name
  Caller      : general
  Status      : At Risk
              : under development
 
Code:
click to view

◆ build_cache_from_genes()

public Int Bio::EnsEMBL::IdMapping::Cache::build_cache_from_genes ( )
  Arg[1]      : String $type - cache type
  Arg[2]      : Listref of Bio::EnsEMBL::Genes $genes - genes to build cache
                from
  Arg[3]      : Boolean $need_project - indicate if we need to project exons to
                common coordinate system
  Example     :
$cache->build_cache_from_genes(
                  'source.chromosome:NCBI36:X:1:100000:1', @genes);
  Description : Builds the cache by fetching transcripts, translations and exons
                for a list of genes from the database, and creating lightweight
                Bio::EnsEMBL::IdMapping::TinyFeature objects containing only the
                data needed by the IdMapping application. These objects are
                attached to a name cache in this cache object. Exons only need
                to be projected to a commond coordinate system if their native
                coordinate system isn't common to source and target assembly
                itself.
  Return type : int - number of genes after filtering
  Exceptions  : thrown on wrong or missing arguments
  Caller      : internal
  Status      : At Risk
              : under development
 
Code:
click to view

◆ cache_file()

public Bio::EnsEMBL::IdMapping::Cache::cache_file ( )

Undocumented method

Code:
click to view

◆ cache_file_exists()

public Bio::EnsEMBL::IdMapping::Cache::cache_file_exists ( )

Undocumented method

Code:
click to view

◆ cache_method()

public Bio::EnsEMBL::IdMapping::Cache::cache_method ( )

Undocumented method

Code:
click to view

◆ check_db_connection()

public Bio::EnsEMBL::IdMapping::Cache::check_db_connection ( )

Undocumented method

Code:
click to view

◆ check_db_read_permissions()

public Bio::EnsEMBL::IdMapping::Cache::check_db_read_permissions ( )

Undocumented method

Code:
click to view

◆ check_db_write_permissions()

public Bio::EnsEMBL::IdMapping::Cache::check_db_write_permissions ( )

Undocumented method

Code:
click to view

◆ check_empty_tables()

public Bio::EnsEMBL::IdMapping::Cache::check_empty_tables ( )

Undocumented method

Code:
click to view

◆ check_meta_entries()

public Bio::EnsEMBL::IdMapping::Cache::check_meta_entries ( )

Undocumented method

Code:
click to view

◆ check_sequence()

public Bio::EnsEMBL::IdMapping::Cache::check_sequence ( )

Undocumented method

Code:
click to view

◆ conf()

public Bio::EnsEMBL::IdMapping::Cache::conf ( )

Undocumented method

Code:
click to view

◆ do_upload()

public Bio::EnsEMBL::IdMapping::Cache::do_upload ( )

Undocumented method

Code:
click to view

◆ dump_path()

public Bio::EnsEMBL::IdMapping::Cache::dump_path ( )

Undocumented method

Code:
click to view

◆ fetch_value_from_db()

public Bio::EnsEMBL::IdMapping::Cache::fetch_value_from_db ( )

Undocumented method

Code:
click to view

◆ filter_biotypes()

public Listref Bio::EnsEMBL::IdMapping::Cache::filter_biotypes ( )
  Arg[1]      : Listref of Bio::EnsEMBL::Genes $genes - the genes to filter
  Example     :
my @filtered = @{ $cache->filter_biotypes(\@genes) };
  Description : Filters a list of genes by biotype.  Biotypes are
                taken from the IdMapping configuration parameter
                'biotypes_include' or 'biotypes_exclude'.
                If the configuration parameter 'biotypes_exclude' is
                defined, then rather than returning the genes whose
                biotype is listed in the configuration parameter
                'biotypes_include' the method will return the genes
                whose biotype is *not* listed in the 'biotypes_exclude'
                configuration parameter.
                It is an error to define both these configuration
                parameters.
                The old parameter 'biotypes' is equivalent to
                'biotypes_include'.
  Return type : Listref of Bio::EnsEMBL::Genes (or empty list)
  Exceptions  : none
  Caller      : internal
  Status      : At Risk
              : under development
 
Code:
click to view

◆ find_common_coord_systems()

public Bio::EnsEMBL::IdMapping::Cache::find_common_coord_systems ( )

Undocumented method

Code:
click to view

◆ get_by_key()

public Bio::EnsEMBL::IdMapping::Cache::get_by_key ( )

Undocumented method

Code:
click to view

◆ get_by_name()

public Bio::EnsEMBL::IdMapping::Cache::get_by_name ( )

Undocumented method

Code:
click to view

◆ get_count_by_name()

public Bio::EnsEMBL::IdMapping::Cache::get_count_by_name ( )

Undocumented method

Code:
click to view

◆ get_db_privs()

public Bio::EnsEMBL::IdMapping::Cache::get_db_privs ( )

Undocumented method

Code:
click to view

◆ get_DBAdaptor()

public Bio::EnsEMBL::IdMapping::Cache::get_DBAdaptor ( )

Undocumented method

Code:
click to view

◆ get_production_DBAdaptor()

public Bio::EnsEMBL::IdMapping::Cache::get_production_DBAdaptor ( )

Undocumented method

Code:
click to view

◆ highest_common_cs()

public Bio::EnsEMBL::IdMapping::Cache::highest_common_cs ( )

Undocumented method

Code:
click to view

◆ highest_common_cs_version()

public Bio::EnsEMBL::IdMapping::Cache::highest_common_cs_version ( )

Undocumented method

Code:
click to view

◆ instance_file()

public Bio::EnsEMBL::IdMapping::Cache::instance_file ( )

Undocumented method

Code:
click to view

◆ is_common_cs()

public Bio::EnsEMBL::IdMapping::Cache::is_common_cs ( )

Undocumented method

Code:
click to view

◆ logger()

public Bio::EnsEMBL::IdMapping::Cache::logger ( )

Undocumented method

Code:
click to view

◆ merge()

public Bio::EnsEMBL::IdMapping::Cache::merge ( )

Undocumented method

Code:
click to view

◆ new()

public Bio::EnsEMBL::IdMapping::Cache Bio::EnsEMBL::IdMapping::Cache::new ( )
  Arg [LOGGER]: Bio::EnsEMBL::Utils::Logger $logger - a logger object
  Arg [CONF]  : Bio::EnsEMBL::Utils::ConfParser $conf - a configuration object
  Example     :
-LOGGER => $logger,
-CONF => $conf,
);
  Description : constructor
  Return type : Bio::EnsEMBL::IdMapping::Cache object
  Exceptions  : thrown on wrong or missing arguments
  Caller      : general
  Status      : At Risk
              : under development
 
Code:
click to view

◆ read_and_merge()

public Bio::EnsEMBL::IdMapping::Cache::read_and_merge ( )

Undocumented method

Code:
click to view

◆ read_from_file()

public Bio::EnsEMBL::IdMapping::Cache::read_from_file ( )

Undocumented method

Code:
click to view

◆ read_instance_from_file()

public Bio::EnsEMBL::IdMapping::Cache::read_instance_from_file ( )

Undocumented method

Code:
click to view

◆ seq_regions_compatible()

public Bio::EnsEMBL::IdMapping::Cache::seq_regions_compatible ( )

Undocumented method

Code:
click to view

◆ slice_names()

public Bio::EnsEMBL::IdMapping::Cache::slice_names ( )

Undocumented method

Code:
click to view

◆ write_all_to_file()

public Bio::EnsEMBL::IdMapping::Cache::write_all_to_file ( )

Undocumented method

Code:
click to view

◆ write_instance_to_file()

public Bio::EnsEMBL::IdMapping::Cache::write_instance_to_file ( )

Undocumented method

Code:
click to view

◆ write_to_file()

public Bio::EnsEMBL::IdMapping::Cache::write_to_file ( )

Undocumented method

Code:
click to view

The documentation for this class was generated from the following file:
Bio::EnsEMBL::IdMapping::Cache::cache_file
public cache_file()
Bio::EnsEMBL::IdMapping::Cache::get_by_name
public get_by_name()
Bio::EnsEMBL::IdMapping::Cache::conf
public conf()
Bio::EnsEMBL::DBSQL::DBAdaptor
Definition: DBAdaptor.pm:40
map
public map()
Bio::EnsEMBL::IdMapping::Cache::get_by_key
public get_by_key()
Bio::EnsEMBL::IdMapping::Cache::check_db_read_permissions
public check_db_read_permissions()
Bio::EnsEMBL::IdMapping::Cache::build_cache_from_genes
public Int build_cache_from_genes()
Bio::EnsEMBL::IdMapping::Cache::slice_names
public slice_names()
Bio::EnsEMBL::IdMapping::TinyExon
Definition: TinyExon.pm:37
Bio::EnsEMBL::IdMapping::Cache::read_from_file
public read_from_file()
Bio::EnsEMBL::IdMapping::Cache::highest_common_cs_version
public highest_common_cs_version()
Bio::EnsEMBL::IdMapping::Cache::build_cache_all
public List build_cache_all()
Bio::EnsEMBL::IdMapping::Cache::is_common_cs
public is_common_cs()
Bio::EnsEMBL::IdMapping::TinyFeature::new_fast
public Bio::EnsEMBL::IdMapping::TinyFeature new_fast()
Bio::EnsEMBL::IdMapping::Cache::add_common_cs
public add_common_cs()
Bio::EnsEMBL::IdMapping::Cache::get_count_by_name
public get_count_by_name()
Bio::EnsEMBL::IdMapping::Cache::cache_file_exists
public cache_file_exists()
Bio::EnsEMBL::IdMapping::Cache::find_common_coord_systems
public find_common_coord_systems()
Bio::EnsEMBL::IdMapping::Cache::check_empty_tables
public check_empty_tables()
Bio::EnsEMBL::IdMapping::Cache::build_cache_by_slice
public List build_cache_by_slice()
Bio::EnsEMBL::IdMapping::Cache::new
public Bio::EnsEMBL::IdMapping::Cache new()
Bio::EnsEMBL::IdMapping::Cache::get_DBAdaptor
public get_DBAdaptor()
Bio::EnsEMBL::IdMapping::Cache::dump_path
public dump_path()
Bio::EnsEMBL::IdMapping::Cache::read_and_merge
public read_and_merge()
Bio::EnsEMBL::IdMapping::Cache::write_instance_to_file
public write_instance_to_file()
Bio::EnsEMBL::IdMapping::TinyTranslation
Definition: TinyTranslation.pm:27
Bio::EnsEMBL::IdMapping::Cache::do_upload
public do_upload()
Bio::EnsEMBL::IdMapping::Cache::instance_file
public instance_file()
Bio::EnsEMBL::IdMapping::Cache::seq_regions_compatible
public seq_regions_compatible()
Bio::EnsEMBL::IdMapping::Cache::write_all_to_file
public write_all_to_file()
Bio::EnsEMBL::IdMapping::Cache::check_sequence
public check_sequence()
Bio::EnsEMBL::IdMapping::TinyGene
Definition: TinyGene.pm:28
Bio::EnsEMBL::IdMapping::Cache::fetch_value_from_db
public fetch_value_from_db()
Bio::EnsEMBL::IdMapping::Cache
Definition: Cache.pm:18
Bio::EnsEMBL::IdMapping::Cache::check_db_write_permissions
public check_db_write_permissions()
Bio::EnsEMBL::IdMapping::Cache::cache_method
public cache_method()
Bio::EnsEMBL::IdMapping::Cache::add
public Bio::EnsEMBL::IdMapping::TinyFeature add()
Bio::EnsEMBL::IdMapping::Cache::check_db_connection
public check_db_connection()
Bio::EnsEMBL::IdMapping::Cache::add_list
public Listref add_list()
Bio::EnsEMBL::IdMapping::Cache::get_production_DBAdaptor
public get_production_DBAdaptor()
Bio::EnsEMBL::IdMapping::Cache::merge
public merge()
Bio::EnsEMBL::IdMapping::TinyTranscript
Definition: TinyTranscript.pm:29
Bio::EnsEMBL::IdMapping::Cache::write_to_file
public write_to_file()
Bio::EnsEMBL::IdMapping::Cache::logger
public logger()
Bio::EnsEMBL::IdMapping::Cache::get_db_privs
public get_db_privs()
Bio::EnsEMBL::IdMapping::Cache::highest_common_cs
public highest_common_cs()
Bio::EnsEMBL::IdMapping::Cache::filter_biotypes
public Listref filter_biotypes()
Bio::EnsEMBL::IdMapping::Cache::check_meta_entries
public check_meta_entries()
Bio::EnsEMBL::IdMapping::Cache::read_instance_from_file
public read_instance_from_file()