Bio::Map
CytoMarker
Toolbar
Summary
Bio::Map::CytoMarker - An object representing a marker.
Package variables
No package variables defined.
Included modules
Inherit
Synopsis
$o_usat = new Bio::Map::CytoMarker(-name=>'Chad Super Marker 2',
-position => $pos);
Description
This object handles markers with a positon in a cytogenetic map known.
This marker will have a name and a position.
Methods
Methods description
Title : contains Usage : if($r1->contains($r2) { do stuff } Function : tests wether $r1 totaly contains $r2 Args : a range to test for being contained Returns : true if the argument is totaly contained within this range Inherited: Bio::RangeI |
Title : equals Usage : if( $mappable->equals($mapable2)) ... Function: Test if a position is equal to another position Returns : boolean Args : Bio::Map::MappableI or Bio::Map::PositionI |
Title : get_chr Usage : my $mychr = $marker->get_chr(); Function: Read only method for the chromosome string of the location. A shotrcut to $marker->position->chr(). Returns : chromosome value Args : [optional] new chromosome value |
Title : get_position_class Usage : my $pos = $marker->get_position_object(); Function: To get an object of the default Position class for this Marker. Subclasses should redefine this method. The Position needs to be Bio::Map::PositionI. Returns : Bio::Map::CytoPosition Args : none |
Title : greater_than Usage : if( $mappable->greater_than($m2) ) ... Function: Tests if position is greater than another position Returns : boolean Args : Bio::Map::MappableI or Bio::Map::PositionI |
Title : intersection Usage : ($start, $stop, $strand) = $r1->intersection($r2) Function : gives the range that is contained by both ranges Args : a range to compare this one to Returns : nothing if they do not overlap, or the range that they do overlap Inherited: Bio::RangeI::intersection |
Title : less_than Usage : if( $mappable->less_than($m2) ) ... Function: Tests if a position is less than another position Returns : boolean Args : Bio::Map::MappableI or Bio::Map::PositionI |
Title : overlaps Usage : if($r1->overlaps($r2)) { do stuff } Function : tests if $r2 overlaps $r1 Args : a range to test for overlap with Returns : true if the ranges overlap, false otherwise Inherited: Bio::RangeI |
Title : union Usage : ($start, $stop, $strand) = $r1->union($r2); : ($start, $stop, $strand) = Bio::Range->union(@ranges); Function : finds the minimal range that contains all of the ranges Args : a range or list of ranges to find the union of Returns : the range containing all of the ranges Inherited: Bio::RangeI::union |
Methods code
sub contains
{ my ($self,$compare) = @_;
my ($me, $you) = $self->tuple($compare);
return 0 unless $me->isa('Bio::RangeI') and $you->isa('Bio::RangeI');
print STDERR "me=", $me->start. "-", $me->end, " ",
"you=", $you->start. "-", $you->end, "\n"
if $self->verbose > 0;
return $me->contains($you); } |
sub equals
{ my ($self,$compare) = @_;
my ($me, $you) = $self->tuple($compare);
return 0 unless $me->isa('Bio::RangeI') and $you->isa('Bio::RangeI');
return $me->equals($you); } |
sub get_chr
{ my ($self) = @_;
return undef unless $self->position;
return $self->position->chr;
}
1; } |
sub get_position_object
{ my ($self) = @_;
return new Bio::Map::CytoPosition(); } |
sub greater_than
{ my ($self,$compare) = @_;
my ($me, $you) = $self->tuple($compare);
return 0 if $me == -1 or $you == -1 ;
$me = $me->start;
$you = $you->end;
print STDERR "me=$me, you=$you\n" if $self->verbose > 0;
return $me > $you; } |
sub intersection
{ my ($self,$compare) = @_;
my ($me, $you) = $self->tuple($compare);
return 0 unless $me->isa('Bio::RangeI') and $you->isa('Bio::RangeI');
return $me->intersection($you); } |
sub less_than
{ my ($self,$compare) = @_;
my ($me, $you) = $self->tuple($compare);
return 0 if $me == -1 or $you == -1 ;
$me = $me->end;
$you = $you->start;
print STDERR "me=$me, you=$you\n" if $self->verbose > 0;
return $me < $you; } |
sub overlaps
{ my ($self,$compare) = @_;
my ($me, $you) = $self->tuple($compare);
return 0 unless $me->isa('Bio::RangeI') and $you->isa('Bio::RangeI');
return $me->overlaps($you); } |
sub union
{ my ($self,$compare) = @_;
my ($me, $you) = $self->tuple($compare);
return 0 unless $me->isa('Bio::RangeI') and $you->isa('Bio::RangeI');
return $me->union($you); } |
General documentation
User feedback is an integral part of the evolution of this and other
Bioperl modules. Send your comments and suggestions preferably to the
Bioperl mailing list. Your participation is much appreciated.
bioperl-l@bioperl.org - General discussion
http://bioperl.org/MailList.shtml - About the mailing lists
Report bugs to the Bioperl bug tracking system to help us keep track
of the bugs and their resolution. Bug reports can be submitted via
email or the web:
bioperl-bugs@bioperl.org
http://bugzilla.bioperl.org/
AUTHOR - Heikki Lehvaslaiho | Top |
The rest of the documentation details each of the object methods.
Internal methods are usually preceded with a _
Bio::Map::MarkerI methods | Top |
The numeric values for cutogeneic loctions go from the p tip of
chromosome 1, down to the q tip and similarly throgh consecutive
chromosomes, through X and end the the q tip of X. See
Bio::Map::CytoPosition::cytorange for more details.
The numeric values for cytogenetic positions are ranges of type
Bio::Range, so MarkerI type of operators (equals, less_than,
greater_than) are not very meaningful, but they might be of some use
combined with
Bio::RangeI methods (overlaps, contains, equals,
intersection, union). equals(), present in both interfaces is treated
as a more precice RangeI method.
CytoMarker has a method
get_chr which might turn out to be useful
in this context.
The
less_than and
greater_than methods are implemented by
comparing the end values of the range, so you better first check that
markers do not overlap, or you get an opposite result than expected.
The numerical values are not metric, so avarages are not meaningful.
Note: These methods always return a value. A false value (0) might
mean that you have not set the position! Check those warnings.
Bio::Map::MarkerI comparison methods | Top |
Title : tuple
Usage : ($me, $you) = $self->_tuple($compare)
Function: Utility method to extract numbers and test for missing values.
Returns : two ranges or tuple of -1
Args : Bio::Map::MappableI or Bio::Map::PositionI