Bio::EnsEMBL::ExternalData::Family
GenomeDB
Toolbar
Summary
Bio::EnsEMBL::ExternalData::Family::GenomeDB
Package variables
No package variables defined.
Included modules
Inherit
Synopsis
Description
Methods
Methods description
Arg [1] : (optional) Bio::EnsEMBL::Compara::GenomeDBAdaptor $adaptor Example : $adaptor = $GenomeDB->adaptor(); Description: Getter/Setter for the GenomeDB object adaptor used by this GenomeDB for database interaction. Returntype : Bio::EnsEMBL::Compara::GenomeDBAdaptor Exceptions : none Caller : general |
Arg [1] : (optional) string Example : $gdb->assembly('NCBI_31'); Description: Getter/Setter for the assembly type of this genome db. Returntype : string Exceptions : none Caller : general |
Arg [1] : (optional) int $value the new value of this objects database identifier Example : $dbID = $genome_db->dbID; Description: Getter/Setter for the internal identifier of this GenomeDB Returntype : int Exceptions : none Caller : general |
Arg [1] : (optional) Bio::EnsEMBL::DBSQL::DBConnection $dba The DBAdaptor containing sequence information for the genome represented by this object. Example : $gdb->db_adaptor($dba); Description: Getter/Setter for the DBAdaptor containing sequence information for the genome represented by this object. Returntype : Bio::EnsEMBL::DBSQL::DBConnection Exceptions : thrown if the argument is not a Bio::EnsEMBL::DBSQL::DBConnection Caller : general |
Arg [1] : Bio::EnsEMBL::Compara::GenomeDB $genomedb Example : none Description: none Returntype : int Exceptions : none Caller : general |
Arg [1] : Bio::EnsEMBL::Compara::GenomeDB $genomedb Example : none Description: none Returntype : int Exceptions : none Caller : general |
Arg [1] : (optional) string $value Example : $gdb->name('Homo sapiens'); Description: Getter setter for the name of this genome database, usually just the species name. Returntype : string Exceptions : none Caller : general |
Arg [1] : (optional) int Example : $gdb->taxon_id('9606'); Description: Getter/Setter for the taxon id of the contained genome db Returntype : int Exceptions : none Caller : general |
Methods code
sub adaptor
{ my ($self,$value) = @_;
if( defined $value) {
$self->{'adaptor'} = $value;
}
return $self->{'adaptor'}; } |
sub assembly
{ my $self = shift;
my $assembly = shift;
if($assembly) {
$self->{'assembly'} = $assembly;
}
return $self->{'assembly'}; } |
sub dbID
{ my ($self,$value) = @_;
if( defined $value) {
$self->{'dbID'} = $value;
}
return $self->{'dbID'}; } |
sub db_adaptor
{ my ( $self, $dba ) = @_;
if( $dba ) {
unless(ref $dba && $dba->isa('Bio::EnsEMBL::DBSQL::DBConnection')) {
$self->throw("dba arg must be a Bio::EnsEMBL::DBSQL::DBConnection" .
" not a [$dba]\n");
}
$self->{'_db_adaptor'} = $dba;
}
return $self->{'_db_adaptor'}; } |
sub has_consensus
{ my ($self,$con_gdb) = @_;
if( !defined $con_gdb || !$con_gdb->isa("Bio::EnsEMBL::Compara::GenomeDB")) {
$self->throw("No query genome specified or query is not a GenomeDB obj");
}
if ( $con_gdb eq $self ) {
$self->throw("Trying to return consensus / " .
"query information from the same db");
}
my $consensus = $self->adaptor->check_for_consensus_db( $self, $con_gdb);
return $consensus; } |
sub has_query
{ my ($self,$query_gdb) = @_;
if( !defined $query_gdb ||
!$query_gdb->isa("Bio::EnsEMBL::Compara::GenomeDB")) {
$self->throw("No consensus genome specified or query is not a " .
"GenomeDB object");
}
if ( $query_gdb eq $self ) {
$self->throw("Trying to return consensus / query information " .
"from the same db");
}
my $query = $self->adaptor->check_for_query_db( $self, $query_gdb );
return $query; } |
sub linked_genomes
{ my ( $self ) = @_;
my $links = $self->adaptor->get_all_db_links( $self );
return $links;
}
1; } |
sub name
{ my ($self,$value) = @_;
if( defined $value) {
$self->{'name'} = $value;
}
return $self->{'name'}; } |
sub new
{ my($caller, $dba, $name, $assembly, $taxon_id, $dbID) = @_;
my $class = ref($caller) || $caller;
my $self = bless({}, $class);
$dba && $self->db_adaptor($dba);
$name && $self->name($name);
$assembly && $self->assembly($assembly);
$taxon_id && $self->taxon_id($taxon_id);
$dbID && $self->dbID($dbID);
return $self; } |
sub taxon_id
{ my $self = shift;
my $taxon_id = shift;
if($taxon_id) {
$self->{'taxon_id'} = $taxon_id;
}
return $self->{'taxon_id'}; } |
General documentation
Arg [1] : Bio::EnsEMBL::Compara::GenomeDB $genomedb
Example : none
Description: none
Returntype : int
Exceptions : none
Caller : general