Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Bio.Location.Position
Description
Sequence positions
Manipulating positions
Returns a position resulting from sliding the original position along the sequence by a specified offset. A positive offset will move the position away from the 5' end of the forward stand of the sequence regardless of the strand of the position itself. Thus,
slide (revCompl pos) off == revCompl (slide pos off)
Extracting sequences
seqNt :: (Error e, MonadError e m) => SeqData -> Pos -> m Char
Extract the nucleotide at a specific sequence position. If the position lies outside the bounds of the sequence, an error results.
seqNtPadded :: SeqData -> Pos -> Char
As seqNt
, extract the nucleotide at a specific sequence
position, but return N
when the position lies outside the
bounds of the sequence.
seqNtPadded sequ pos == (either 'N' id . seqNt sequ) pos