ensembl-hive  2.6
Bio::EnsEMBL::IdMapping::Archiver Class Reference
+ Inheritance diagram for Bio::EnsEMBL::IdMapping::Archiver:

Public Member Functions

public void create_archive ()
 
public void dump_gene ()
 
public void dump_tuple ()
 
public Int mapping_session_id ()
 
- Public Member Functions inherited from Bio::EnsEMBL::IdMapping::BaseObject
public $this new ()
 
public Filehandle get_filehandle ()
 
public Boolean file_exists ()
 
public SQLStatement fetch_value_from_db ()
 
public Int dump_table_to_file ()
 
public Int upload_file_into_table ()
 
public Bio::EnsEMBL::Utils::Logger logger ()
 
public Bio::EnsEMBL::Utils::ConfParser conf ()
 
public Bio::EnsEMBL::IdMapping::Cache cache ()
 

Detailed Description

Synopsis

-LOGGER => $logger,
-CONF => $conf,
-CACHE => $cache
);
# create gene and peptide archive
$archiver->create_archive($mapping_session_id);
# dump existing archive tables to file
my $num_entries =
$archiver->dump_table_to_file( 'source', 'gene_archive',
'gene_archive_existing.txt', 1 );

Description

This module creates the gene_archive and peptide_archive
tables. Data is written to a file as tab-delimited text for
loading into a MySQL database (this can be done manually, or using
StableIdmapper->upload_file_into_table()).

An archive entry for a given source gene is created if no target
gene exists, or if any of its transcripts or their translations
changed. Non-coding transcripts only have an entry in gene_archive (i.e.
without a corresponding peptide_archive entry).

Definition at line 39 of file Archiver.pm.

Member Function Documentation

◆ create_archive()

public void Bio::EnsEMBL::IdMapping::Archiver::create_archive ( )
  Arg[1]      : Int $mapping_session_id - the mapping_session_id for this run
  Example     :
$archiver->create_archive($stable_id_mapper->mapping_session_id);
  Description : Creates the gene_archive and peptide_archive tables and writes
                the data to a tab-delimited file. The decision as to what to
                archive is deferred to dump_gene(), see documentation there for
                details.
  Return type : none
  Exceptions  : Thrown on missing argument.
  Caller      : id_mapping.pl
  Status      : At Risk
              : under development
 
Code:
click to view

◆ dump_gene()

public void Bio::EnsEMBL::IdMapping::Archiver::dump_gene ( )
  Arg[1]      : Bio::EnsEMBL::IdMapping::TinyGene $s_gene - source gene
  Arg[2]      : Bio::EnsEMBL::IdMapping::TinyGene $t_gene - target gene
  Arg[3]      : Filehandle $ga_fh - filehandle for writing gene_archive data
  Arg[4]      : Filehandle $pa_fh - filehandle for writing peptide_archive data
  Example     :
my $target_gene = $gene_mappings{$source_gene->stable_id};
$archiver->dump_gene($source_gene, $target_gene, $ga_fh, $pa_fh);
  Description : Given a source gene, it will write a gene_achive and
                peptide_achive entry for it if no target gene exists, or if any
                of its transcripts or their translation changed. 
  Return type : none
  Exceptions  : none
  Caller      : create_archive()
  Status      : At Risk
              : under development
 
Code:
click to view

◆ dump_tuple()

public void Bio::EnsEMBL::IdMapping::Archiver::dump_tuple ( )
  Arg[1]      : Bio::EnsEMBL::IdMapping::TinyGene $gene - gene to archive
  Arg[2]      : Bio::EnsEMBL::IdMapping::TinyTrancript $tr - its transcript
  Arg[3]      : Bio::EnsEMBL::IdMapping::TinyTranslation $tl - its translation
  Arg[4]      : Filehandle $ga_fh - filehandle for writing gene_archive data
  Arg[5]      : Filehandle $pa_fh - filehandle for writing peptide_archive data
  Example     :
$archive->dump_tuple($s_gene, $s_tr, $s_tl, $ga_fh, $pa_fh);
  Description : Writes entry lines for gene_archive and peptide_archive.
  Return type : none
  Exceptions  : none
  Caller      : dump_gene()
  Status      : At Risk
              : under development
 
Code:
click to view

◆ mapping_session_id()

public Int Bio::EnsEMBL::IdMapping::Archiver::mapping_session_id ( )
  Arg[1]      : (optional) Int - mapping_session_id to set
  Example     :
my $msi = $archiver->mapping_session_id;
  Description : Getter/setter for mapping_session_id.
  Return type : Int
  Exceptions  : none
  Caller      : create_archive()
  Status      : At Risk
              : under development
 
Code:
click to view

The documentation for this class was generated from the following file:
map
public map()
Bio::EnsEMBL::IdMapping::BaseObject::new
public $this new()
Bio::EnsEMBL::IdMapping::Archiver::dump_tuple
public void dump_tuple()
Bio::EnsEMBL::IdMapping::Archiver::mapping_session_id
public Int mapping_session_id()
Bio::EnsEMBL::IdMapping::Archiver::create_archive
public void create_archive()
Bio::EnsEMBL::IdMapping::Archiver::dump_gene
public void dump_gene()
Bio::EnsEMBL::IdMapping::Archiver
Definition: Archiver.pm:39