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)Source
A data structure for efficiently finding target sequence
locations (SeqLoc.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 aSource
Creates a SeqLocMap
from a list of target locations and their
associated objects
Modifying location lookup maps
insert :: SeqLoc -> a -> SeqLocMap a -> SeqLocMap aSource
Inserts a new target location and associated object into the location lookup map.
Searching for target locations
lookupWithin :: SeqPos -> SeqLocMap a -> [(SeqLoc, a)]Source
Find the (possibly empty) list of target locations and associated
objects that contain a sequence position, in the sense of
Loc.isWithin
.
lookupOverlaps :: SeqLoc -> SeqLocMap a -> [(SeqLoc, a)]Source
Find the (possibly empty) list of target locations and associated
objects that overlap a sequence location, in the sense of
Loc.overlaps
.