Bio::Map CytoMarker
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Bio::Map::CytoMarker - An object representing a marker.
Package variables
No package variables defined.
Included modules
Bio::Map::CytoPosition
Bio::Map::Marker
Bio::RangeI
Inherit
Bio::Map::Marker Bio::RangeI
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
containsDescriptionCode
equalsDescriptionCode
get_chrDescriptionCode
get_position_objectDescriptionCode
greater_thanDescriptionCode
intersectionDescriptionCode
less_thanDescriptionCode
overlapsDescriptionCode
unionDescriptionCode
Methods description
containscode    nextTop
  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
equalscodeprevnextTop
 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
get_chrcodeprevnextTop
 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
get_position_objectcodeprevnextTop
 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
greater_thancodeprevnextTop
 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
intersectioncodeprevnextTop
  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
less_thancodeprevnextTop
 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
overlapscodeprevnextTop
  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
unioncodeprevnextTop
  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
containsdescriptionprevnextTop
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);
}
equalsdescriptionprevnextTop
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);
}
get_chrdescriptionprevnextTop
sub get_chr {
    my ($self) = @_;
    return undef unless $self->position;
    return $self->position->chr;
}

1;
}
get_position_objectdescriptionprevnextTop
sub get_position_object {
   my ($self) = @_;
   return new Bio::Map::CytoPosition();
}
greater_thandescriptionprevnextTop
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;
}
intersectiondescriptionprevnextTop
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);
}
less_thandescriptionprevnextTop
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;
}
overlapsdescriptionprevnextTop
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);
}
uniondescriptionprevnextTop
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
FEEDBACKTop
Mailing ListsTop
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
Reporting BugsTop
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
Email heikki@ebi.ac.uk
CONTRIBUTORSTop
Chad Matsalla bioinformatics1@dieselwurks.com
Lincoln Stein lstein@cshl.org
Jason Stajich jason@bioperl.org
APPENDIXTop
The rest of the documentation details each of the object methods.
Internal methods are usually preceded with a _
Bio::Map::MarkerI methodsTop
Comparison methodsTop
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 methodsTop
tupleTop
 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
RangeI methodsTop
New methodsTop