bio-0.4.7: A bioinformatics library

Bio.Location.SeqLocation

Contents

Description

Data types for sequence locations and sequence positions associated with specific, named sequences.

Synopsis

Positions on named sequences

type SeqPos = OnSeq PosSource

A position on a named sequence

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

type SeqLoc = OnSeq LocSource

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

display :: SeqLoc -> StringSource

Display a human-friendly representation of a SeqLoc