Bio::EnsEMBL::Funcgen Channel
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Bio::EnsEMBL::Funcgen::Channel - A module to represent a single channel of an ExperimentalChip
Package variables
No package variables defined.
Included modules
Bio::EnsEMBL::Funcgen::Storable
Bio::EnsEMBL::Utils::Argument qw ( rearrange )
Bio::EnsEMBL::Utils::Exception qw ( throw warning )
Inherit
Bio::EnsEMBL::Funcgen::Storable
Synopsis
use Bio::EnsEMBL::Funcgen::Channel;
my $array = Bio::EnsEMBL::Funcgen::Channel->new(
-EXPERIMENTAL_CHIP_ID => $ec_id,
-SAMPLE_ID => $sample_id,
-TYPE => $type,
-DYE => $dye,
);
#-replace TYPE with DENOMINATOR?
my $db_adaptor = Bio::EnsEMBL::Funcgen::DBSQL::DBAdaptor->new(...);
my $chan_a = $db_adaptor->get_ChannelAdaptor();
my $chan = $chan_a->fetch_by_type_ExperimentalChip($type, $ExpChip);
Description
A Channel object represents a single channel on an ExperimentalChip. The data
are stored in the channel table, and associated expermental variables are
stored in the experimental_variable table.
Methods
dyeDescriptionCode
experimental_chip_idDescriptionCode
newDescriptionCode
sample_idDescriptionCode
typeDescriptionCode
Methods description
dyecode    nextTop
  Arg [1]    : (optional) string - the channel type e.g. EXPERIMENTAL or CONTROL
Example : my $dye = $chan->dye();
Description: Getter, setter and lazy loader of dye attribute
Returntype : string
Exceptions :
Caller : General
Status : Medium Risk
experimental_chip_idcodeprevnextTop
  Arg [1]    : (optional) int - the experimenta chip dbID
Example : my $ec_id = $chan->experimental_chip_id();
Description: Getter, setter and lazy loader of experimental_chip_id attribute
Returntype : int
Exceptions : None
Caller : General
Status : Medium Risk
newcodeprevnextTop
  Arg [-EXPERIMENTAL_CHIP_ID]:  int - the experimental chip dbID
Example : my $array = Bio::EnsEMBL::Funcgen::Channel->new( -EXPERIMENTAL_CHIP_ID => $ec_id, -SAMPLE_ID => $sample_id, -TYPE => $type, -DYE => $dye, ); Description: Creates a new Bio::EnsEMBL::Funcgen::Channel object. Returntype : Bio::EnsEMBL::Funcgen::Channel Exceptions : None Caller : General Status : Medium Risk
sample_idcodeprevnextTop
  Arg [1]    : (optional) string - the sample id for this Channel
Example : my $sample_id = $chan->sample_id();
Description: Getter, setter and lazy loader of sample_id attribute.
Returntype : string
Exceptions : None
Caller : General
Status : Medium Risk
typecodeprevnextTop
  Arg [1]    : (optional) string - the channel type e.g. EXPERIMENTAL or CONTROL
Example : my $type = $chan->type();
Description: Getter, setter and lazy loader of type attribute
Returntype : string
Exceptions :
Caller : General
Status : Medium Risk
Methods code
dyedescriptionprevnextTop
sub dye {
  my $self = shift;

  $self->{'dye'} = shift if @_;
  
  #if ( !exists $self->{'dye'} && $self->dbID() && $self->adaptor() ) {
# $self->adaptor->fetch_attributes($self);
#}
return $self->{'dye'}; } 1;
}
experimental_chip_iddescriptionprevnextTop
sub experimental_chip_id {
	my $self = shift;

	$self->{'experimental_chip_id'} = shift if @_;
	if ( !exists $self->{'experimental_chip_id'} && $self->dbID() && $self->adaptor() ) {
		$self->adaptor->fetch_attributes($self);
	}
	return $self->{'experimental_chip_id'};
}
newdescriptionprevnextTop
sub new {
	my $caller = shift;

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

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

	#can we lc these?
my ($ec_id, $sample_id, $type, $dye) = rearrange( ['EXPERIMENTAL_CHIP_ID', 'SAMPLE_ID', 'TYPE', 'DYE'], @_ ); $self->sample_id($sample_id) if defined $sample_id; $self->experimental_chip_id($ec_id) if defined $ec_id; $self->type($type) if defined $type; $self->dye($dye) if defined $dye; return $self;
}
sample_iddescriptionprevnextTop
sub sample_id {
	my $self = shift;
	$self->{'sample_id'} = shift if @_;

	if ( ! exists $self->{'sample_id'} && $self->dbID() && $self->adaptor() ) {
		$self->adaptor->fetch_attributes($self);
	}

	return $self->{'sample_id'};
}
typedescriptionprevnextTop
sub type {
  my $self = shift;

  $self->{'type'} = shift if @_;

  #warn "we need to control EXPERIMENTAL OR CONTROL here or enum on DB";
if ( !exists $self->{'type'} && $self->dbID() && $self->adaptor() ) { $self->adaptor->fetch_attributes($self); } return $self->{'type'};
}
General documentation
AUTHORTop
This module was created by Nathan Johnson.
This module is part of the Ensembl project: /
CONTACTTop
Post comments or questions to the Ensembl development list: ensembl-dev@ebi.ac.uk