bio-0.3.5: A bioinformatics librarySource codeContentsIndex
Bio.Location.Location
Description
Data types for working with locations in a sequence. Zero-based Int64 indices are used throughout, to facilitate direct use of indexing functions on SeqData.
Synopsis
newtype Loc = Loc [ContigLoc]
bounds :: Loc -> (Offset, Offset)
length :: Loc -> Offset
startPos :: Loc -> Pos
endPos :: Loc -> Pos
extend :: (Offset, Offset) -> Loc -> Loc
posInto :: Pos -> Loc -> Maybe Pos
posOutof :: Pos -> Loc -> Maybe Pos
isWithin :: Pos -> Loc -> Bool
overlaps :: Loc -> Loc -> Bool
seqData :: (Error e, MonadError e m) => SeqData -> Loc -> m SeqData
seqDataPadded :: SeqData -> Loc -> SeqData
display :: Loc -> String
Documentation
newtype Loc Source
General (disjoint) sequence region consisting of a concatenated set of contiguous regions
Constructors
Loc [ContigLoc]
show/hide Instances
bounds :: Loc -> (Offset, Offset)Source
The bounds of a Loc, consisting of the lowest & highest sequence indices lying within the region. The first element of the pair will always be lower than the second.
length :: Loc -> OffsetSource
Length of the region
startPos :: Loc -> PosSource
0-based starting (5' in the region orientation) offset of the region on its sequence.
endPos :: Loc -> PosSource
0-based ending (3' in the region orientation) offset of the region on its sequence.
extendSource
:: (Offset, Offset)(5' extension, 3' extension)
-> Loc
-> Loc
Extend a Loc region by incorporating contigous nucleotide regions of the specified lengths on the 5' and 3' ends
posInto :: Pos -> Loc -> Maybe PosSource
For a Pos and a Loc region on the same sequence, find the corresponding Pos relative to the region, if the Pos is within the region. If the Loc region has redundant positions for a given sequence position, the first is returned.
posOutof :: Pos -> Loc -> Maybe PosSource
For a Loc region on a sequence and a Pos relative to the region, find the corresponding Pos on the sequence, provided that the position is within the bounds of the region.
isWithin :: Pos -> Loc -> BoolSource
For a Pos and a Loc on the same sequence, does the position fall within the Loc region?
overlaps :: Loc -> Loc -> BoolSource
For a pair of Loc regions on the same sequence, do they overlap at all?
seqData :: (Error e, MonadError e m) => SeqData -> Loc -> m SeqDataSource
Subsequence SeqData for a Loc, provided that the region is entirely within the sequence.
seqDataPadded :: SeqData -> Loc -> SeqDataSource
display :: Loc -> StringSource
Produced by Haddock version 2.4.2