Safe Haskell | None |
---|---|
Language | Haskell2010 |
Bio.SeqLoc.LocMap
Contents
Description
Efficient lookup based on potential location overlap
Collection of objects with locations, potentially on named sequences, that can be queried to recover all objects whose location could potentially overlap a query location.
|
- data LocMap a
- emptyLM :: Offset -> LocMap a
- insertLoc :: Location l => l -> a -> LocMap a -> LocMap a
- queryLoc :: Location l => l -> LocMap a -> [a]
- data SeqLocMap a
- emptySLM :: Offset -> SeqLocMap a
- insertSeqLoc :: Location l => OnSeq l -> a -> SeqLocMap a -> SeqLocMap a
- querySeqLoc :: Location l => OnSeq l -> SeqLocMap a -> [a]
- transcriptSeqLocMap :: Offset -> [Transcript] -> SeqLocMap Transcript
- class Locatable o where
- data WithLocation a = WithLocation {
- withoutLocation :: !a
- withLocate :: !SpliceSeqLoc
- locatableSeqLocMap :: Locatable l => Offset -> [l] -> SeqLocMap l
- queryLocatable :: (Locatable o, Location l) => Maybe Strand -> OnSeq l -> SeqLocMap o -> [o]
- queryLocCompatible :: Locatable o => Maybe Strand -> SpliceSeqLoc -> SeqLocMap o -> [o]
- queryLocInto :: Locatable o => Maybe Strand -> SpliceSeqLoc -> SeqLocMap o -> [(o, SpliceLoc)]
Mapping objects to locations
Mapping objects to sequence locations in the sense of Location
.
emptyLM :: Offset -> LocMap a #
Create an empty object / location map.
Specify a characteristic size for efficient queries, which depends on the underlying genome. Smaller sizes yield fewer false candidates but greater memory usage and potentially slower queries.
insertLoc :: Location l => l -> a -> LocMap a -> LocMap a #
Insert a new object / location pair and reutrn the updated map
queryLoc :: Location l => l -> LocMap a -> [a] #
Retrieve a list of objects that could potentially overlap the query location.
Some objects may not actually overlap the query location. Some objects may appear more than once in the list. However, no object whose location truly overlaps the query will be missing from the list.
Overlap is defined by one or more nucleotides in common between the bounds of the two locations, regardless of the relative strands of the query and the object location.
Mapping objects to locations on named sequneces
Mapping objects to locations on named sequences
emptySLM :: Offset -> SeqLocMap a #
Create an empty object / location map
Specify a characteristic size as per emptyLM
.
insertSeqLoc :: Location l => OnSeq l -> a -> SeqLocMap a -> SeqLocMap a #
Insert a new object / location pair and reutrn the updated map
querySeqLoc :: Location l => OnSeq l -> SeqLocMap a -> [a] #
Retrieve a list of objects that could potentially overlap the query location.
Some objects may not actually overlap the query location. Some objects may appear more than once in the list. However, no object whose location truly overlaps the query will be missing from the list.
Overlap is defined by one or more nucleotides in common between the bounds of the two locations, regardless of the relative strands of the query and the object location, as well as the same name for the underlying reference sequence.
To retrieve objects and test for actual overlap see the Locatable
interface and queryLocatable
or queryLocCompatible
.
Mapping transcripts to their locations
transcriptSeqLocMap :: Offset -> [Transcript] -> SeqLocMap Transcript #
Construct a mapping from transcripts to their genomic locations.
Generalization of objects with locations
Object with a genomic location expressed by SpliceSeqLoc
.
Minimal complete definition
Methods
locate :: o -> SpliceSeqLoc #
Instances
data WithLocation a #
Simple representation of a Locatable
object as an arbitrary
object adjoined with a location.
Constructors
WithLocation | |
Fields
|
Instances
Eq a => Eq (WithLocation a) # | |
Locatable (WithLocation a) # | |
locatableSeqLocMap :: Locatable l => Offset -> [l] -> SeqLocMap l #
Construct a mapping from a general Locatable
object to its
genomic location
queryLocatable :: (Locatable o, Location l) => Maybe Strand -> OnSeq l -> SeqLocMap o -> [o] #
Retrieve a list of Locatable
objects whose overall, contiguous
genomic coordinates intersect at any position the genomic interval
spanned by the specified Location
. This does not require that
the spliced structure of the query is a subset of the spliced
structure of the Locatable
nor that the query location lie
entirely within the hit location (contrast with
queryLocCompatible
).
When a strand argument is given, restrict matches to those lying on the same strand as the query location, for `Just Plus`, or the opposite strand, for `Just Minus`.
queryLocCompatible :: Locatable o => Maybe Strand -> SpliceSeqLoc -> SeqLocMap o -> [o] #
Retrieve a list of Locatable
objects whose spliced structure
contains the query location specifically.
queryLocInto :: Locatable o => Maybe Strand -> SpliceSeqLoc -> SeqLocMap o -> [(o, SpliceLoc)] #