Bio::EnsEMBL OligoArray
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Bio::EnsEMBL::OligoArray - A module to represent an oligonucleotide microarray.
Package variables
No package variables defined.
Included modules
Bio::EnsEMBL::Storable
Bio::EnsEMBL::Utils::Argument qw ( rearrange )
Bio::EnsEMBL::Utils::Exception qw ( throw warning )
Inherit
Bio::EnsEMBL::Storable
Synopsis
  use Bio::EnsEMBL::OligoArray;
my $array = Bio::EnsEMBL::OligoArray->new( -NAME => 'Array-1', -INCLUDED_IN => $another_array, -SETSIZE => 1, -TYPE => 'OLIGO', );
Description
An OligoArray object represents an oligonucleotide microarray. The data
(currently the name, probeset size, parent array and type of array) are
stored in the oligo_array table.
OligoArray objects can currently be of type AFFY or OLIGO. Arrays of
type OLIGO will usually have a probeset size of 1 (i.e. the probes are
not grouped into probesets, unlike Affy arrays).
Each array can have a parent array (another array that contains all the
probes of this array). This is rarely (if ever) used.
Methods
get_all_ProbesDescriptionCode
nameDescriptionCode
newDescriptionCode
setsizeDescriptionCode
supersetDescriptionCode
typeDescriptionCode
Methods description
get_all_Probescode    nextTop
  Args       : None
Example : my $probes = $array->get_all_Probes();
Description: Returns all probes on an array. Needs a database connection.
Returntype : Listref of Bio::EnsEMBL::OligoProbe objects
Exceptions : None
Caller : General
Status : Medium Risk
namecodeprevnextTop
  Arg [1]    : (optional) string - the name of this array
Example : my $name = $array->name();
Description: Getter, setter and lazy loader of name attribute for OligoArray
objects.
Returntype : string
Exceptions : None
Caller : General
Status : Medium Risk
newcodeprevnextTop
  Arg [-NAME]:
string - the name of this array
Arg [-INCLUDED_IN]:
(optional) Bio::EnsEMBL::OligoArray - a possible superset array
Arg [-SETSIZE]:
int - the number of probes in a probe set (usually 1 unless Affy)
Arg [-TYPE]:
string - the type of this array (AFFY or OLIGO)
Example : my $array = Bio::EnsEMBL::OligoArray->new(
-NAME => 'Array-1',
-INCLUDED_IN => $another_array,
-SETSIZE => 1,
-TYPE => 'OLIGO',
);
Description: Creates a new Bio::EnsEMBL::OligoArray object.
Returntype : Bio::EnsEMBL::OligoArray
Exceptions : None
Caller : General
Status : Medium Risk
setsizecodeprevnextTop
  Arg [1]    : (optional) int - the number of probes in a probe set
Example : my $setsize = $array->setsize();
Description: Getter, setter and lazy loader of setsize attribute for
OligoArray objects. The setsize is the number of probes in a
probeset for this array. This is likely to be 1 for non-Affy
arrays.
Returntype : int
Exceptions : None
Caller : General
Status : Medium Risk
supersetcodeprevnextTop
  Arg [1]    : (optional) Bio::EnsEMBL::OligoArray - a superset array
Example : my $parent_array = $array->superset();
Description: Getter, setter and lazy loader of superset attribute for
OligoArray objects. A superset is another OligoArray that
contains all the probes of this OligoArray. This is bordering
on superfluous.
Returntype : Bio::EnsEMBL::OligoArray
Exceptions : Throws if argument isn't a Bio::EnsEMBL::OligoArray object
Caller : General
Status : Medium Risk
typecodeprevnextTop
  Arg [1]    : (optional) string - the type (currently either AFFY or OLIGO)
for this array
Example : my $type = $array->type();
Description: Getter, setter and lazy loader of type attribute for OligoArray
objects. Currently the type can be either AFFY or OLIGO
Returntype : string
Exceptions : Throws if argument isn't a valid type (currently AFFY or OLIGO)
Caller : General
Status : Medium Risk
Methods code
get_all_ProbesdescriptionprevnextTop
sub get_all_Probes {
	my $self = shift;

	if ( $self->dbID() && $self->adaptor() ) {
		my $opa = $self->adaptor()->db()->get_OligoProbeAdaptor();
		my $probes = $opa->fetch_all_by_Array($self);
		return $probes;
	} else {
		warning('Need database connection to retrieve Probes');
		return [];
	}
}
namedescriptionprevnextTop
sub name {
	my $self = shift;
	$self->{'name'} = shift if @_;
	if ( !exists $self->{'name'} && $self->dbID() && $self->adaptor() ) {
		$self->adaptor->fetch_attributes($self);
	}
	return $self->{'name'};
}
newdescriptionprevnextTop
sub new {
	my $caller = shift;

	my $class = ref($caller) || $caller;

	my $self = $class->SUPER::new(@_);

	my ($name, $superset, $setsize, $type)
		= rearrange( ['NAME', 'INCLUDED_IN', 'SETSIZE', 'TYPE'], @_ );
	
	$self->name($name)         if defined $name;
	$self->superset($superset) if defined $superset;
	$self->setsize($setsize)   if defined $setsize;
	$self->type($type)         if defined $type;

	return $self;
}
setsizedescriptionprevnextTop
sub setsize {
	my $self = shift;
	$self->{'setsize'} = shift if @_;
	if ( !exists $self->{'setsize'} && $self->dbID() && $self->adaptor() ) {
		$self->adaptor->fetch_attributes($self);
	}
	return $self->{'setsize'};
}
supersetdescriptionprevnextTop
sub superset {
	my $self = shift;
	my $superset = shift;
	if ($superset) {
		if (!ref $superset || !$superset->isa('Bio::EnsEMBL::OligoArray')) {
			throw('Superset must be a Bio::EnsEMBL::OligoArray');
		}
		$self->{'superset'} = $superset;
	}
	if ( !exists $self->{'superset'} && $self->dbID() && $self->adaptor() ) {
		$self->adaptor->fetch_attributes($self);
	}
	return $self->{'superset'};
}
typedescriptionprevnextTop
sub type {
	my $self = shift;
	my $type = shift;
	if ($type) {
		if ($VALID_TYPE{$type}) {
			$self->{'type'} = $type;
		} else {
			throw("$type is not a valid type for a Bio::EnsEMBL::OligoArray");
		}
	}
	if ( !exists $self->{'type'} && $self->dbID() && $self->adaptor() ) {
		$self->adaptor->fetch_attributes($self);
	}
	return $self->{'type'};
}

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>.