ensembl-hive
2.6
|
Public Member Functions | |
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 () |
This is the base object for some of the objects used in the IdMapping application. An object that extends BaseObject will have a ConfParser, Logger and Cache object. BaseObject also implements some useful utility functions related to file and db access. This isn't very clean OO design but it's efficient and easy to use...
Definition at line 25 of file BaseObject.pm.
public Bio::EnsEMBL::IdMapping::Cache Bio::EnsEMBL::IdMapping::BaseObject::cache | ( | ) |
Arg[1] : (optional) Bio::EnsEMBL::IdMapping::Cache - the cache to set Example :
Description : Getter/setter for cache object Return type : Bio::EnsEMBL::IdMapping::Cache Exceptions : none Caller : constructor Status : At Risk : under development
public Bio::EnsEMBL::Utils::ConfParser Bio::EnsEMBL::IdMapping::BaseObject::conf | ( | ) |
Arg[1] : (optional) Bio::EnsEMBL::Utils::ConfParser - the configuration to set Example :
Description : Getter/setter for configuration object Return type : Bio::EnsEMBL::Utils::ConfParser Exceptions : none Caller : constructor Status : At Risk : under development
public Int Bio::EnsEMBL::IdMapping::BaseObject::dump_table_to_file | ( | ) |
Arg[1] : String $dbtype - db type (source|target) Arg[2] : String $table - name of table to dump Arg[3] : String $filename - name of dump file Arg[4] : Boolean $check_existing - turn on test for existing dump Example :
Description : Dumps the contents of a db table to a tab-delimited file. The dump file will be written to a subdirectory called 'tables' under the basedir from your configuration. Return type : Int - the number of rows dumped Exceptions : thrown on wrong or missing arguments Caller : general Status : At Risk : under development
public SQLStatement Bio::EnsEMBL::IdMapping::BaseObject::fetch_value_from_db | ( | ) |
Arg[1] : DBI::db $dbh - a DBI database handle Arg[2] : String $sql - SQL statement to execute Example :
Description : Executes an SQL statement on a db handle and returns the first column of the first row returned. Useful for queries returning a single value, like table counts. Return type : Return type of SQL statement Exceptions : thrown on wrong or missing arguments Caller : general Status : At Risk : under development
public Boolean Bio::EnsEMBL::IdMapping::BaseObject::file_exists | ( | ) |
Arg[1] : String $filename - filename to test Arg[2] : Boolean $path_append - turn on pre-pending of basedir Example :
Description : Tests if a file exists and has non-zero size. Return type : Boolean Exceptions : none Caller : general Status : At Risk : under development
public Filehandle Bio::EnsEMBL::IdMapping::BaseObject::get_filehandle | ( | ) |
Arg[1] : String $filename - filename for filehandle Arg[2] : String $path_append - append subdirectory name to basedir Arg[3] : String $mode - filehandle mode (<|>|>>) Example :
print $fh "Stats:\n"; Description : Returns a filehandle to a file for reading or writing. The file is qualified with the basedir defined in the configuration and an optional subdirectory name. Return type : filehandle Exceptions : thrown on missing filename Caller : general Status : At Risk : under development
public Bio::EnsEMBL::Utils::Logger Bio::EnsEMBL::IdMapping::BaseObject::logger | ( | ) |
Arg[1] : (optional) Bio::EnsEMBL::Utils::Logger - the logger to set Example :
Description : Getter/setter for logger object Return type : Bio::EnsEMBL::Utils::Logger Exceptions : none Caller : constructor Status : At Risk : under development
public $this Bio::EnsEMBL::IdMapping::BaseObject::new | ( | ) |
Arg [LOGGER]: Bio::EnsEMBL::Utils::Logger $logger - a logger object Arg [CONF] : Bio::EnsEMBL::Utils::ConfParser $conf - a configuration object Arg [CACHE] : Bio::EnsEMBL::IdMapping::Cache $cache - a cache object Example :
Description : Constructor Return type : implementing subclass type Exceptions : thrown on wrong or missing arguments Caller : general Status : At Risk : under development
public Int Bio::EnsEMBL::IdMapping::BaseObject::upload_file_into_table | ( | ) |
Arg[1] : String $dbtype - db type (source|target) Arg[2] : String $table - name of table to upload the data to Arg[3] : String $filename - name of dump file Arg[4] : Boolean $no_check_empty - don't check if table is empty Example :
Description : Uploads a tab-delimited data file into a db table. The data file will be taken from a subdirectory 'tables' under your configured basedir. If the db table isn't empty and $no_check_empty isn't set, no data is uploaded (and a warning is issued). Return type : Int - the number of rows uploaded Exceptions : thrown on wrong or missing arguments Caller : general Status : At Risk : under development