[BioRuby] new module map.rb
jan aerts (RI)
jan.aerts at bbsrc.ac.uk
Thu May 4 16:27:28 UTC 2006
Done. (Except a test to check positions of markers relative to each
other on the same map)
> -----Original Message-----
> From: Moses M. Hohman [mailto:mmhohman at northwestern.edu]
> Sent: 04 May 2006 15:59
> To: jan aerts (RI)
> Cc: bioruby at open-bio.org
> Subject: Re: [BioRuby] new module map.rb
>
> Hi Jan,
>
> Cool, I'll check it out. Do you have any unit tests for this?
>
> Moses
>
> On May 4, 2006, at 10:04 AM, jan aerts (RI) wrote:
>
> > 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.
> >
> > _______________________________________________
> > BioRuby mailing list
> > BioRuby at lists.open-bio.org
> > http://lists.open-bio.org/mailman/listinfo/bioruby
> >
>
>
More information about the BioRuby
mailing list