bio-0.3.5: A bioinformatics librarySource codeContentsIndex
Bio.Location.LocMap
Description
A structure to allow fast lookup of objects whose sequence location lines up with a give position.
Synopsis
data LocMap a
mkLocMap :: Offset -> LocMap a
defaultZonesize :: Offset
fromList :: Offset -> [(Loc, a)] -> LocMap a
lookupWithin :: Pos -> LocMap a -> [(Loc, a)]
lookupOverlaps :: Loc -> LocMap a -> [(Loc, a)]
delete :: Eq a => (Loc, a) -> LocMap a -> LocMap a
deleteBy :: ((Loc, a) -> Bool) -> LocMap a -> LocMap a
insert :: Loc -> a -> LocMap a -> LocMap a
checkInvariants :: LocMap a -> [String]
Documentation
data LocMap a Source
Collection mapping a collection of Loc locations, possibly overlapping, binned for efficient lookup by position.
show/hide Instances
mkLocMap :: Offset -> LocMap aSource
Create an empty LocMap with a specified position bin size
defaultZonesize :: OffsetSource
fromList :: Offset -> [(Loc, a)] -> LocMap aSource
Create a LocMap from an associated list.
lookupWithin :: Pos -> LocMap a -> [(Loc, a)]Source
Find the (possibly empty) list of sequence regions and associated objects that contain a Pos position, in the sense of withinLoc
lookupOverlaps :: Loc -> LocMap a -> [(Loc, a)]Source
Find the (possibly empty) list of sequence regions and associated objects that overlap a Loc region, in the sense of overlapsLoc
delete :: Eq a => (Loc, a) -> LocMap a -> LocMap aSource
Remove a region / object association from the map, if it is present. If it is present multiple times, only the first occurrence will be deleted.
deleteBy :: ((Loc, a) -> Bool) -> LocMap a -> LocMap aSource
Remove the first region / object association satisfying a predicate function.
insert :: Loc -> a -> LocMap a -> LocMap aSource
Add an object with an associated Loc sequence region
checkInvariants :: LocMap a -> [String]Source
Produced by Haddock version 2.4.2