Safe Haskell | Safe-Infered |
---|
Bio.Location.SeqLocMap
Contents
Description
Efficient lookup of query positions in a collection of target sequence
locations where positions and locations are associated with specific
sequence names. This is an extension of LocMap
to use locations and
positions on named sequences as in SeqLocation
.
Location lookup maps for named sequences
type SeqLocMap a = OnSeqs (LocMap a)
A data structure for efficiently finding target sequence
locations (Loc
) that overlap query positions or locations.
Each target location can be associated with an arbitrary additional
value in the lookup map.
fromList :: [(SeqLoc, a)] -> SeqLocMap a
Creates a SeqLocMap
from a list of target locations and their
associated objects
Modifying location lookup maps
insert :: SeqLoc -> a -> SeqLocMap a -> SeqLocMap a
Inserts a new target location and associated object into the location lookup map.
Searching for target locations
lookupWithin :: SeqPos -> SeqLocMap a -> [(SeqLoc, a)]
Find the (possibly empty) list of target locations and associated
objects that contain a sequence position, in the sense of
isWithin
.
lookupOverlaps :: SeqLoc -> SeqLocMap a -> [(SeqLoc, a)]
Find the (possibly empty) list of target locations and associated
objects that overlap a sequence location, in the sense of
overlaps
.