seqloc-0.6.1.1: Handle sequence locations for bioinformatics

Safe HaskellNone
LanguageHaskell2010

Bio.SeqLoc.Position

Contents

Description

Data type for a sequence position.

Zero-based Offsetindices are used throughout, to facilitate direct use of indexing functions on SeqData.

Synopsis

Sequence positions

newtype Offset :: * #

An Offset is a zero-based index into a sequence

Constructors

Offset 

Fields

data Pos #

Stranded position in a sequence

Constructors

Pos 

Fields

Instances

Eq Pos # 

Methods

(==) :: Pos -> Pos -> Bool #

(/=) :: Pos -> Pos -> Bool #

Ord Pos # 

Methods

compare :: Pos -> Pos -> Ordering #

(<) :: Pos -> Pos -> Bool #

(<=) :: Pos -> Pos -> Bool #

(>) :: Pos -> Pos -> Bool #

(>=) :: Pos -> Pos -> Bool #

max :: Pos -> Pos -> Pos #

min :: Pos -> Pos -> Pos #

Show Pos # 

Methods

showsPrec :: Int -> Pos -> ShowS #

show :: Pos -> String #

showList :: [Pos] -> ShowS #

Stranded Pos # 

Methods

revCompl :: Pos -> Pos #

LocRepr Pos # 

Manipulating positions

slide :: Pos -> Offset -> Pos #

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

atPos :: SeqLike s => s -> Pos -> Maybe Char #

Extract Just the item at a specific sequence position, or Nothing if the position lies outside the bounds of the sequence.