Bio::EnsEMBL OligoFeature
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Bio::EnsEMBL::OligoFeature - A module to represent an oligonucleotide probe's
genomic mapping.
Package variables
No package variables defined.
Included modules
Bio::EnsEMBL::Feature
Bio::EnsEMBL::Utils::Argument qw ( rearrange )
Bio::EnsEMBL::Utils::Exception qw ( throw )
Inherit
Bio::EnsEMBL::Feature
Synopsis
  use Bio::EnsEMBL::OligoFeature;
my $feature = Bio::EnsEMBL::OligoFeature->new( -PROBE => $probe, -MISMATCHCOUNT => 0, -SLICE => $chr_1_slice, -START => 1_000_000, -END => 1_000_024, -STRAND => -1, );
Description
An OligoFeature object represents the genomic placement of an OligoProbe
object. The data are stored in the oligo_feature table.
Methods
mismatchcountDescriptionCode
newDescriptionCode
new_fastDescriptionCode
probeDescriptionCode
probelengthDescriptionCode
probesetDescriptionCode
Methods description
mismatchcountcode    nextTop
  Arg [1]    : int - number of mismatches
Example : my $mismatches = $feature->mismatchcount();
Description: Getter and setter for number of mismatches for this feature.
Returntype : int
Exceptions : None
Caller : General
Status : Medium Risk
newcodeprevnextTop
  Arg [-PROBE]        : Bio::EnsEMBL::OligoProbe - probe
An OligoFeature must have a probe. This probe must already be stored if
you plan to store the feature.
Arg [-MISMATCHCOUNT]: int
Number of mismatches over the length of the probe.
Arg [-SLICE] : Bio::EnsEMBL::Slice
The slice on which this feature is.
Arg [-START] : int
The start coordinate of this feature relative to the start of the slice
it is sitting on. Coordinates start at 1 and are inclusive.
Arg [-END] : int
The end coordinate of this feature relative to the start of the slice
it is sitting on. Coordinates start at 1 and are inclusive.
Arg [-STRAND] : int
The orientation of this feature. Valid values are 1, -1 and 0.
Arg [-dbID] : (optional) int
Internal database ID.
Arg [-ADAPTOR] : (optional) Bio::EnsEMBL::DBSQL::BaseAdaptor
Database adaptor.
Example : my $feature = Bio::EnsEMBL::OligoFeature->new(
-PROBE => $probe,
-MISMATCHCOUNT => 0,
-SLICE => $chr_1_slice,
-START => 1_000_000,
-END => 1_000_024,
-STRAND => -1,
);
Description: Constructor for OligoFeature objects.
Returntype : Bio::EnsEMBL::OligoFeature
Exceptions : None
Caller : General
Status : Medium Risk
new_fastcodeprevnextTop
  Args       : Hashref with all internal attributes set
Example : none
Description: Quick and dirty version of new. Only works if the code is very
disciplined.
Returntype : Bio::EnsEMBL::OligoFeature
Exceptions : None
Caller : General
Status : Medium Risk
probecodeprevnextTop
  Arg [1]    : Bio::EnsEMBL::AffyProbe - probe
Example : my $probe = $feature->probe();
Description: Getter, setter and lazy loader of probe attribute for
OligoFeature objects. Features are retrieved from the database
without attached probes, so retrieving probe information for a
feature will involve another query.
Returntype : Bio::EnsEMBL::OligoProbe
Exceptions : None
Caller : General
Status : Medium Risk
probelengthcodeprevnextTop
  Args       : None 
Example : my $probelength = $feature->probelength();
Description: Getter for the length of the probe. Shortcut for
$feature->probe->probelength(), which should be used instead.
Originally, this method returned the length of the feature,
which was often, but not always, the same as the length of the
probe.
Returntype : int
Exceptions : None
Caller : General
Status : Medium Risk
: Use $feature->probe->probelength() because this may be removed
probesetcodeprevnextTop
  Arg [1]    : (optional) string - probeset
Example : my $probeset = $feature->probeset();
Description: Getter and setter for the probeset for this feature. Shortcut
for $feature->probe->probeset(), which should be used instead.
Probeset is not persisted if set with this method.
Returntype : string
Exceptions : None
Caller : General
Status : Medium Risk
: Use $feature->probe->probeset() because this may be removed
Methods code
mismatchcountdescriptionprevnextTop
sub mismatchcount {
    my $self = shift;
	
    $self->{'mismatchcount'} = shift if @_;
	
    return $self->{'mismatchcount'};
}
newdescriptionprevnextTop
sub new {
	my $caller = shift;
	
	my $class = ref($caller) || $caller;
	
	my $self = $class->SUPER::new(@_);
	
	my ($probe, $mismatchcount )
		= rearrange(['PROBE', 'MISMATCHCOUNT'], @_);
	
	$self->probe($probe);
	$self->mismatchcount($mismatchcount);
	
	return $self;
}
new_fastdescriptionprevnextTop
sub new_fast {
   my ($class, $hashref)  = @_;

   return bless ($hashref, $class);
}
probedescriptionprevnextTop
sub probe {
    my $self = shift;
	my $probe = shift;
    if ($probe) {
		if ( !ref $probe || !$probe->isa('Bio::EnsEMBL::OligoProbe') ) {
			throw('Probe must be a Bio::EnsEMBL::OligoProbe object');
		}
		$self->{'probe'} = $probe;
    }
	if ( !defined $self->{'probe'} && $self->dbID() && $self->adaptor() ) {
	    $self->{'probe'} = $self->adaptor()->db()->get_OligoProbeAdaptor()->fetch_by_OligoFeature($self);
	}
    return $self->{'probe'};
}

1;
}
probelengthdescriptionprevnextTop
sub probelength {
    my $self = shift;
	
    return $self->probe->probelength();
}
probesetdescriptionprevnextTop
sub probeset {
    my $self = shift;
	
    $self->{'probeset'} = shift if @_;
	
    if ($self->{'probe'}) {
		$self->{'probeset'} = $self->probe()->probeset();
    }
	
    return $self->{'probeset'};
}
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>.