Safe Haskell | Safe-Inferred |
---|
Data types for sequence locations and sequence positions associated with specific, named sequences.
- type SeqPos = OnSeq Pos
- type ContigSeqLoc = OnSeq ContigLoc
- withinContigSeqLoc :: SeqPos -> ContigSeqLoc -> Bool
- type SeqLoc = OnSeq Loc
- isWithin :: SeqPos -> SeqLoc -> Bool
- overlaps :: SeqLoc -> SeqLoc -> Bool
- seqData :: (Error e, MonadError e m) => (SeqName -> m SeqData) -> SeqLoc -> m SeqData
- displaySeqPos :: SeqPos -> String
- displayContigSeqLoc :: ContigSeqLoc -> String
- display :: SeqLoc -> String
Positions on named sequences
Contiguous location spans on named sequences
type ContigSeqLoc = OnSeq ContigLocSource
A location consisting of a contiguous span of positions on a named sequence.
withinContigSeqLoc :: SeqPos -> ContigSeqLoc -> BoolSource
Test whether a sequence position lies within a sequence location.
This requires that the position lie within the location as per
isWithin
and have the same sequence name.
Arbitrary location spans on named sequences
A general location, consisting of spans of sequence positions on a specific, named sequence.
Testing for location intersection on named sequences
isWithin :: SeqPos -> SeqLoc -> BoolSource
Test whether a sequence position lies within a sequence location.
This requires that the position lie within the location as per
isWithin
and have the same sequence name.
overlaps :: SeqLoc -> SeqLoc -> BoolSource
Test whether two sequence locations overlap in any position.
This requires that the locations overlap as per overlaps
and
have the same sequence name.
Extracting subsequences
seqData :: (Error e, MonadError e m) => (SeqName -> m SeqData) -> SeqLoc -> m SeqDataSource
Extract the subsequence specified by a sequence location from a
sequence database. The sequence name is used to retrieve the full
sequence and the subsequence is extracted as by seqData
Displaying locations on named sequences
displaySeqPos :: SeqPos -> StringSource
Display a human-friendly representation of a SeqPos
displayContigSeqLoc :: ContigSeqLoc -> StringSource
Display a human-friendly representation of a ContigSeqLoc