bio-0.3.5: A bioinformatics librarySource codeContentsIndex
Bio.Location.ContigLocation
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
data ContigLoc = ContigLoc {
offset5 :: !Offset
length :: !Offset
strand :: !Strand
}
fromStartEnd :: Offset -> Offset -> ContigLoc
fromPosLen :: Pos -> Offset -> ContigLoc
bounds :: ContigLoc -> (Offset, Offset)
startPos :: ContigLoc -> Pos
endPos :: ContigLoc -> Pos
slide :: Offset -> ContigLoc -> ContigLoc
extend :: (Offset, Offset) -> ContigLoc -> ContigLoc
posInto :: Pos -> ContigLoc -> Maybe Pos
posOutof :: Pos -> ContigLoc -> Maybe Pos
seqData :: (Error e, MonadError e m) => SeqData -> ContigLoc -> m SeqData
seqDataPadded :: SeqData -> ContigLoc -> SeqData
isWithin :: Pos -> ContigLoc -> Bool
overlaps :: ContigLoc -> ContigLoc -> Bool
display :: ContigLoc -> String
Documentation
data ContigLoc Source
Contiguous set of positions in a sequence
Constructors
ContigLoc
offset5 :: !Offset5' end of region on target sequence, 0-based index
length :: !Offsetlength of region on target sequence
strand :: !Strandstrand of region
show/hide Instances
fromStartEnd :: Offset -> Offset -> ContigLocSource
Create a ContigLoc from 0-based starting and ending positions. When start is less than end the position will be on the Fwd Strand, otherwise it will be on the RevCompl strand.
fromPosLen :: Pos -> Offset -> ContigLocSource
Create a ContigLoc from a Pos.Pos defining the start (ContigLoc 5 prime end) position on the sequence and the length.
bounds :: ContigLoc -> (Offset, Offset)Source
The bounds of a ContigLoc, a pair of the lowest and highest sequence indices covered by the region, which ignores the strand of the ContigLoc. The first element of the pair will always be lower than the second.
startPos :: ContigLoc -> PosSource
0-based starting (5' in the region orientation) position
endPos :: ContigLoc -> PosSource
0-based ending (3' in the region orientation) position
slide :: Offset -> ContigLoc -> ContigLocSource
Move a ContigLoc region by a specified offset
extend :: (Offset, Offset) -> ContigLoc -> ContigLocSource
ContigLoc extended on the 5' and 3' ends.
posInto :: Pos -> ContigLoc -> Maybe PosSource
For a Pos and a ContigLoc on the same sequence, find the corresponding Pos relative to the ContigLoc, provided it is within the ContigLoc.
posOutof :: Pos -> ContigLoc -> Maybe PosSource
For a Pos specified relative to a ContigLoc, find the corresponding Pos relative to the outer sequence, provided that the Pos is within the bounds of the ContigLoc.
seqData :: (Error e, MonadError e m) => SeqData -> ContigLoc -> m SeqDataSource
Subsequence SeqData for a ContigLoc, provided that the region is entirely within the sequence.
seqDataPadded :: SeqData -> ContigLoc -> SeqDataSource
Subsequence SeqData for a ContigLoc, padded as needed with Ns
isWithin :: Pos -> ContigLoc -> BoolSource
For a Pos and a ContigLoc on the same sequence, is the Pos within the ContigLoc.
overlaps :: ContigLoc -> ContigLoc -> BoolSource
For a pair of ContigLoc regions on the same sequence, indicates if they overlap at all.
display :: ContigLoc -> StringSource
Produced by Haddock version 2.4.2