Safe Haskell | None |
---|---|
Language | Haskell2010 |
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
- locate :: o -> SpliceSeqLoc
- 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 Source
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 Source
Insert a new object / location pair and reutrn the updated map
queryLoc :: Location l => l -> LocMap a -> [a] Source
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
emptySLM :: Offset -> SeqLocMap a Source
Create an empty object / location map
Specify a characteristic size as per emptyLM
.
insertSeqLoc :: Location l => OnSeq l -> a -> SeqLocMap a -> SeqLocMap a Source
Insert a new object / location pair and reutrn the updated map
querySeqLoc :: Location l => OnSeq l -> SeqLocMap a -> [a] Source
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 Source
Construct a mapping from transcripts to their genomic locations.
Generalization of objects with locations
class Locatable o where Source
Object with a genomic location expressed by SpliceSeqLoc
.
locate :: o -> SpliceSeqLoc Source
data WithLocation a Source
Simple representation of a Locatable
object as an arbitrary
object adjoined with a location.
WithLocation | |
|
Eq a => Eq (WithLocation a) | |
Locatable (WithLocation a) |
locatableSeqLocMap :: Locatable l => Offset -> [l] -> SeqLocMap l Source
Construct a mapping from a general Locatable
object to its
genomic location
queryLocatable :: (Locatable o, Location l) => Maybe Strand -> OnSeq l -> SeqLocMap o -> [o] Source
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] Source
Retrieve a list of Locatable
objects whose spliced structure
contains the query location specifically.
queryLocInto :: Locatable o => Maybe Strand -> SpliceSeqLoc -> SeqLocMap o -> [(o, SpliceLoc)] Source