[BioRuby] new module map.rb
jan aerts (RI)
jan.aerts at bbsrc.ac.uk
Thu May 4 14:04:26 UTC 2006
Hi all,
I've added a new module map.rb to the cvs repository that describes
markers and maps (such as linkage maps, radiation hybrid maps and the
sort):
* Bio::Map::SimpleMap
* Bio::Map::Marker
* Bio::Map::Mapping
* Bio::Map::ActsLikeMap
* Bio::Map::ActsLikeMarker
Two important design decisions were taken in writing these modules:
(1) relationship map-mapping-marker:
------------------------------------
In an early implementation, Map objects could have a list of Marker
objects associated with them. However, a single Marker object can also
be mapped to different Maps. As a result, to check which maps have a
certain marker in common, all markers of all maps would have to be
screened. Therefore, to facilitate this many-to-many relationship
complication, I decided to put a Mapping object in between Map and
Marker. Such a Mapping object has three things associated with it: Map,
Marker and location (which is a Bio::Location object).
If a marker A is added to a map B, a Mapping object is created and added
to both the @mappings array in marker A, _and_ the @mappings array in
map B.
(2) mixins ActsLikeMap and ActsLikeMarker:
------------------------------------------
Different things can be mapped to different things, or in other words:
different things can act as markers or as maps.
* can act as markers:
** a microsatellite: when it's mapped on a linkage group
** a clone: when it's mapped to the cytogenetic map (using FISH), or if
it's included in the physical map (FPC)
** a piece of sequence: a BAC-end sequence is mapped to a BAC clone
** ...
* can act as maps:
** a linkage group
** a radiation hybrid map
** a clone: when it has a BAC end sequence associated with it
** ...
As it is nonsense to create a Marker class and have all these different
types of markers inherit from it (would a clone inherit from
Bio::Marker, or from Bio::Map?), I created two modules that can be mixed
in with any class: Bio::Map::ActsLikeMap and Bio::Map::ActsLikeMarker.
As a result, a Clone class (which doesn't exist yet) can include both,
and have properties of a map _and_ a marker.
Give it a go.
PS: Thinking about what can act like a map or a marker: a sequence can
essentially also be considered a map (we actually talk about it that way
in our department), with for example BLAST hits (or any other feature
with a location) that act as markers. The unit of the map is 'bp'.
Jan Aerts, PhD
Bioinformatics Group
Roslin Institute
Roslin, Scotland, UK
+44 131 527 4200
---------The obligatory disclaimer--------
The information contained in this e-mail (including any attachments) is
confidential and is intended for the use of the addressee only. The
opinions expressed within this e-mail (including any attachments) are
the opinions of the sender and do not necessarily constitute those of
Roslin Institute (Edinburgh) ("the Institute") unless specifically
stated by a sender who is duly authorised to do so on behalf of the
Institute.
More information about the BioRuby
mailing list