Bio::EnsEMBL::DBSQL AffyArrayAdaptor
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Bio::EnsEMBL::DBSQL::AffyArrayAdaptor - A database adaptor for fetching and
storing AffyArray objects.
Package variables
No package variables defined.
Included modules
Bio::EnsEMBL::AffyArray
Bio::EnsEMBL::DBSQL::OligoArrayAdaptor
Inherit
Bio::EnsEMBL::DBSQL::OligoArrayAdaptor
Synopsis
  my $aaa = $db->get_AffyArrayAdaptor();
my $array = $aaa->fetch_by_name('Affy-1'); my @arrays = @{ $aaa->fetch_all() };
Description
The AffyArrayAdaptor is a database adaptor for storing and retrieving
AffyArray objects.
Methods
_default_where_clauseDescriptionCode
_objs_from_sthDescriptionCode
list_dbIDsDescriptionCode
Methods description
_default_where_clausecode    nextTop
  Args       : None
Example : None
Description: PROTECTED implementation of superclass abstract method.
Ensures this adaptor only returns Affy arrays.
Returntype : string
Exceptions : None
Caller : Internal
Status : Medium Risk
_objs_from_sthcodeprevnextTop
  Arg [1]    : DBI statement handle object
Example : None
Description: PROTECTED implementation of superclass abstract method.
Creates AffyArray objects from an executed DBI statement
handle.
Returntype : Listref of Bio::EnsEMBL::AffyArray objects
Exceptions : None
Caller : Internal
Status : Medium Risk
list_dbIDscodeprevnextTop
  Args       : None
Example : my @array_ids = @{$aaa->list_dbIDs()};
Description: Gets an array of internal IDs for all AffyArray objects
in the current database. NOTE: In a multi-species
database, this method will return the dbIDs of all
AffyArray objects, not just the ones associated with the
current species.
Returntype : List of ints
Exceptions : None
Caller : ?
Status : Medium Risk
Methods code
_default_where_clausedescriptionprevnextTop
sub _default_where_clause {
  my $self = shift;

  return "oa.type='AFFY'";
}
_objs_from_sthdescriptionprevnextTop
sub _objs_from_sth {
	my ($self, $sth) = @_;
	
	my (@result, $array_id, $parent_id, $setsize, $name, $type);
	
	$sth->bind_columns(\$ array_id,\$ parent_id,\$ setsize,\$ name,\$ type );
	
	while ( $sth->fetch() ) {
		my $array = Bio::EnsEMBL::AffyArray->new(
			-dbID    => $array_id,
			-adaptor => $self,
			-name    => $name,
			-setsize => $setsize,
	  	);
		push @result, $array;
		if ($parent_id) {
			my $parent_array = Bio::EnsEMBL::AffyArray->new(
				-dbID    => $parent_id,
				-adaptor => $self,
			);
			$array->superset($parent_array);
		}
	}
	return\@ result;
}
list_dbIDsdescriptionprevnextTop
sub list_dbIDs {
	my ($self) = @_;
	
	#return $self->_list_dbIDs('oligo_array');
# Can't use _list_dbIDs because only want OligoArray objects of type AFFY
my @out; # FIXME: This SQL will not work as expected on multi-species
# databases. It needs to be anchored in a coord_system entry
# coord_system.species_id = $self->species_id(). /ak4@2008-07-15
my $sql = "SELECT oligo_array_id FROM oligo_array WHERE type='AFFY'"; my $sth = $self->prepare($sql); $sth->execute; while (my ($id) = $sth->fetchrow() ) { push @out, $id; } $sth->finish; return\@ out; } 1;
}
General documentation
LICENSETop
  Copyright (c) 1999-2009 The European Bioinformatics Institute and
Genome Research Limited. All rights reserved.
This software is distributed under a modified Apache license. For license details, please see /info/about/code_licence.html
CONTACTTop
  Please email comments or questions to the public Ensembl
developers list at <ensembl-dev@ebi.ac.uk>.
Questions may also be sent to the Ensembl help desk at <helpdesk@ensembl.org>.