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

Public Member Functions

public void analyse ()
 
public void classify_source_genes_by_type ()
 
public void classify_genes_by_mapping_simple ()
 
public void classify_genes_by_mapping ()
 
public String add ()
 
public String get ()
 
public Arrayref get_all_by_subclass ()
 
public Arrayref get_all_by_class ()
 
public Int get_count_by_subclass ()
 
public Int get_count_by_class ()
 
public Arrayref get_all_classes ()
 
public String class_key ()
 
public void write_results_to_file ()
 
public void create_clicklist ()
 
public void create_mapping_summary ()
 
public String read_from_file ()
 
- 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

# get a result analyser
-LOGGER => $logger,
-CONF => $conf,
-CACHE => $cache
);
# analyse results
$analyser->analyse( $gene_mappings,
$stable_id_mapper->get_all_stable_id_events('similarity') );
# write results to file
$analyser->write_results_to_file;
# create click lists
$analyser->create_clicklist;
# mapping_summary
$analyser->create_mapping_summary;

Description

This is a utility module which analyses the stable Id mapping results
by providing various sorts of mapping statistics. It also creates
clicklists and a mapping summary.

Definition at line 38 of file ResultAnalyser.pm.

Member Function Documentation

◆ add()

public String Bio::EnsEMBL::IdMapping::ResultAnalyser::add ( )
  Arg[1]      : String $dbtype - db type ('source' or 'target')
  Arg[2]      : String $class - key identifying a gene type (see class_key())
  Arg[3]      : String $subclass - status identifier (e.g. 'mapped', 'lost')
  Arg[4]      : String $stable_id - gene stable Id
  Arg[5]      : String $val - value (usually 0 or 1)
  Example     :
$analyser->add('source', 'KNOWN-ensembl-protein_coding',
'mapped', 'ENSG00002342', 1);
  Description : Add a stable Id / property pair to a name/dbtype lookup hash.
                The datastructure is a bit of a bloat, but is general enough to
                be used as a lookup hash and to generate statistics (counts by
                type) and debug lists (dump by type).
  Return type : String - the added value
  Exceptions  : none
  Caller      : internal
  Status      : At Risk
              : under development
 
Code:
click to view

◆ analyse()

public void Bio::EnsEMBL::IdMapping::ResultAnalyser::analyse ( )
  Arg[1]      : Bio::EnsEMBL::IdMapping::MappingList $gene_mappings - the gene
                mappings to analyse
  Arg[2]      : Arrayref of Strings - similarity events
  Example     :
$analyser->analyse($gene_mappings,
$stable_id_mapper->get_all_stable_id_events('similarity'));
  Description : Analyses the results of a stable Id mapping run.
  Return type : none
  Exceptions  : thrown on wrong or missing arguments
  Caller      : general
  Status      : At Risk
              : under development
 
Code:
click to view

◆ class_key()

public String Bio::EnsEMBL::IdMapping::ResultAnalyser::class_key ( )
  Arg[1]      : Bio::EnsEMBL::IdMapping::TinyGene $gene - a gene object
  Example     :
my $class = $analyser->class_key($gene);
  Description : Generates a key identifying a gene class. This identifier is 
                composed from the gene's logic naame, and biotye.
  Return type : String
  Exceptions  : none
  Caller      : internal
  Status      : At Risk
              : under development
 
Code:
click to view

◆ classify_genes_by_mapping()

public void Bio::EnsEMBL::IdMapping::ResultAnalyser::classify_genes_by_mapping ( )
  Arg[1]      : Bio::EnsEMBL::IdMapping::MapppingList $gene_mappings - gene
                mappings to classify
  Arg[2]      : Arrayref of Strings - similarity events
  Example     :
$analyser->classify_genes_by_mapping;
  Description : Classifies genes by mapping. Status is
                  'mapped' => stable Id was mapped
                  'lost_similar' => stable Id not mapped, but there is a
                                    similarity entry for the source Id
                  'lost_definite' => not mapped and no similarity
  Return type : none
  Exceptions  : thrown on wrong or missing argument
  Caller      : This method is not in use at the momen.
  Status      : At Risk
              : under development
 
Code:
click to view

◆ classify_genes_by_mapping_simple()

public void Bio::EnsEMBL::IdMapping::ResultAnalyser::classify_genes_by_mapping_simple ( )
  Arg[1]      : Bio::EnsEMBL::IdMapping::MapppingList $gene_mappings - gene
                mappings to classify
  Example     :
$analyser->classify_genes_by_mapping_simple;
  Description : Classifies target genes by mapping ('mapped' or 'unmapped').
  Return type : none
  Exceptions  : thrown on wrong or missing argument
  Caller      : This method is not in use at the momen.
  Status      : At Risk
              : under development
 
Code:
click to view

◆ classify_source_genes_by_type()

public void Bio::EnsEMBL::IdMapping::ResultAnalyser::classify_source_genes_by_type ( )
  Example     :
$analyser->classify_source_genes_by_type;
  Description : Classifies source genes by type and adds them to the internal
                datastructure. For the format of the classification string see
                class_key().
  Return type : none
  Exceptions  : none
  Caller      : internal
  Status      : At Risk
              : under development
 
Code:
click to view

◆ create_clicklist()

public void Bio::EnsEMBL::IdMapping::ResultAnalyser::create_clicklist ( )
  Example     :
$analyser->create_clicklist;
  Description : Writes an html file which contains a list of all lost genes,
                with hyperlinks to the appropriate archive website. This is to
                manually check lost genes.
  Return type : none
  Exceptions  : none
  Caller      : general
  Status      : At Risk
              : under development
 
Code:
click to view

◆ create_mapping_summary()

public void Bio::EnsEMBL::IdMapping::ResultAnalyser::create_mapping_summary ( )
  Example     :
$analyser->create_mapping_summary();
  Description : Writes a text file containing a summary of the mapping stats.
                This will be emailed to the genebuilder for evaluation (you will
                have to manually send the email, using the text in
                "mapping_summary.txt" as the template).
  Return type : none
  Exceptions  : none
  Caller      : general
  Status      : At Risk
              : under development
 
Code:
click to view

◆ get()

public String Bio::EnsEMBL::IdMapping::ResultAnalyser::get ( )
  Arg[1]      : String $dbtype - db type ('source' or 'target')
  Arg[2]      : String $class - key identifying a gene type (see class_key())
  Arg[3]      : String $subclass - status identifier (e.g. 'mapped', 'lost')
  Arg[4]      : String $stable_id - gene stable Id
  Example     :
my $mapping_status = $analyser->get('source',
'KNOWN-ensembl-protein_coding', 'mapped', 'ENSG00002342');
  Description : Gets a stable Id mapping status from the internal datastructure.
  Return type : String
  Exceptions  : none
  Caller      : internal
  Status      : At Risk
              : under development
 
Code:
click to view

◆ get_all_by_class()

public Arrayref Bio::EnsEMBL::IdMapping::ResultAnalyser::get_all_by_class ( )
  Arg[1]      : String $dbtype - db type ('source' or 'target')
  Arg[2]      : String $class - key identifying a gene type (see class_key())
  Example     :
my @stable_ids = @{
$analyser->get_all_by_class( 'source',
'KNOWN-ensembl-protein_coding' ) };
  Description : Gets a list of stable Id for a given class.
  Return type : Arrayref of String (stable Ids)
  Exceptions  : thrown on missing arguments
  Caller      : internal
  Status      : At Risk
              : under development
 
Code:
click to view

◆ get_all_by_subclass()

public Arrayref Bio::EnsEMBL::IdMapping::ResultAnalyser::get_all_by_subclass ( )
  Arg[1]      : String $dbtype - db type ('source' or 'target')
  Arg[2]      : String $class - key identifying a gene type (see class_key())
  Arg[3]      : String $subclass - status identifier (e.g. 'mapped', 'lost')
  Example     :
my @mapped_stable_ids = @{
$analyser->get_all_by_subclass(
'source', 'KNOWN-ensembl-protein_coding',
'mapped'
) };
  Description : Gets a list of stable Id for a given subclass.
  Return type : Arrayref of String (stable Ids)
  Exceptions  : thrown on missing arguments
  Caller      : internal
  Status      : At Risk
              : under development
 
Code:
click to view

◆ get_all_classes()

public Arrayref Bio::EnsEMBL::IdMapping::ResultAnalyser::get_all_classes ( )
  Arg[1]      : String $dbtype - db type ('source' or 'target')
  Example     :
foreach my $class (@{ $analyser->get_all_classes('source') }) {
print "$class\n";
}
  Description : Gets a list of classes in the ResultAnalyser.
  Return type : Arrayref of String
  Exceptions  : thrown on missing argument
  Caller      : internal
  Status      : At Risk
              : under development
 
Code:
click to view

◆ get_count_by_class()

public Int Bio::EnsEMBL::IdMapping::ResultAnalyser::get_count_by_class ( )
  Arg[1]      : String $dbtype - db type ('source' or 'target')
  Arg[2]      : String $class - key identifying a gene type (see class_key())
  Example     :
my $num_mapped = $analyser->get_count_by_class('source',
'KNOWN-ensembl-protein_coding');
  Description : Gets the number of stable Ids for a given class.
  Return type : Int
  Exceptions  : thrown on missing arguments
  Caller      : internal
  Status      : At Risk
              : under development
 
Code:
click to view

◆ get_count_by_subclass()

public Int Bio::EnsEMBL::IdMapping::ResultAnalyser::get_count_by_subclass ( )
  Arg[1]      : String $dbtype - db type ('source' or 'target')
  Arg[2]      : String $class - key identifying a gene type (see class_key())
  Arg[3]      : String $subclass - status identifier (e.g. 'mapped', 'lost')
  Example     :
my $num_mapped = $analyser->get_count_by_subclass('source',
'KNOWN-ensembl-protein_coding', 'mapped');
  Description : Gets the number of stable Ids for a given subclass.
  Return type : Int
  Exceptions  : thrown on missing arguments
  Caller      : internal
  Status      : At Risk
              : under development
 
Code:
click to view

◆ read_from_file()

public String Bio::EnsEMBL::IdMapping::ResultAnalyser::read_from_file ( )
  Arg[1]      : String $filename - name of file to read
  Arg[2]      : (optional) String $append - directory name to append to basedir
  Example     :
my $stats_text = $analyser->read_from_file('gene_mapping_stats',
'stats');
  Description : Reads mapping stats from a file.
  Return type : String
  Exceptions  : none
  Caller      : internal
  Status      : At Risk
              : under development
 
Code:
click to view

◆ write_results_to_file()

public void Bio::EnsEMBL::IdMapping::ResultAnalyser::write_results_to_file ( )
  Example     :
$analyser->write_results_to_file;
  Description : Writes the results of the result analysis to a file. This is a 
                human-readable text detailing the mapping statistics.
  Return type : none
  Exceptions  : none
  Caller      : general
  Status      : At Risk
              : under development
 
Code:
click to view

The documentation for this class was generated from the following file:
transcript
public transcript()
Bio::EnsEMBL::IdMapping::ResultAnalyser::get_count_by_subclass
public Int get_count_by_subclass()
Bio::EnsEMBL::IdMapping::ResultAnalyser::get
public String get()
Bio::EnsEMBL::IdMapping::ResultAnalyser::analyse
public void analyse()
map
public map()
Bio::EnsEMBL::IdMapping::ResultAnalyser::get_count_by_class
public Int get_count_by_class()
Bio::EnsEMBL::IdMapping::ResultAnalyser::read_from_file
public String read_from_file()
Bio::EnsEMBL::IdMapping::BaseObject::new
public $this new()
Bio::EnsEMBL::IdMapping::ResultAnalyser::add
public String add()
exon
public exon()
Bio::EnsEMBL::IdMapping::ResultAnalyser
Definition: ResultAnalyser.pm:38
Bio::EnsEMBL::IdMapping::ResultAnalyser::get_all_classes
public Arrayref get_all_classes()
Bio::EnsEMBL::IdMapping::ResultAnalyser::classify_source_genes_by_type
public void classify_source_genes_by_type()
Bio::EnsEMBL::IdMapping::ResultAnalyser::classify_genes_by_mapping_simple
public void classify_genes_by_mapping_simple()
Bio::EnsEMBL::IdMapping::ResultAnalyser::create_clicklist
public void create_clicklist()
Bio::EnsEMBL::IdMapping::ResultAnalyser::create_mapping_summary
public void create_mapping_summary()
Bio::EnsEMBL::IdMapping::ResultAnalyser::class_key
public String class_key()
Bio::EnsEMBL::IdMapping::ResultAnalyser::classify_genes_by_mapping
public void classify_genes_by_mapping()
Bio::EnsEMBL::IdMapping::ResultAnalyser::write_results_to_file
public void write_results_to_file()
Bio::EnsEMBL::IdMapping::ResultAnalyser::get_all_by_class
public Arrayref get_all_by_class()
Bio::EnsEMBL::IdMapping::ResultAnalyser::get_all_by_subclass
public Arrayref get_all_by_subclass()