BiobaseXNA-0.8.1.1: Efficient RNA/DNA representations

Safe HaskellNone

Biobase.Secondary

Contents

Description

Secondary structure: define basepairs as Int-tuples, the three edges, a nucleotide can use for pairing and the cis/trans isomerism. Both edges and cis/trans come with a tag for unknown.

TODO set ext-annotations to be (isomerism,edge,edge) and have a asString instance to read cWW tSH and other notation.

Synopsis

Documentation

threeChar :: String -> ExtPairAnnotationSource

Easy reading of a three-Char string into a triple.

newtype Edge Source

Each nucleotide in a pair may be paired using one of three edges: watson-crik, sugar, or hoogsteen.

Constructors

Edge 

Fields

unEdge :: Int
 

Instances

Bounded Edge 
Enum Edge 
Eq Edge 
Ord Edge 
Read Edge

Human-readable Read instance.

Show Edge

Human-readable Show instance.

Ix Edge 
Prim Edge 
Unbox Edge 
Bounds Edge 
IsostericityLookup ExtPair

For extended basepairs, we take the default mapping and go from there.

TODO inClass missing

Vector Vector Edge 
MVector MVector Edge 
RemovePseudoKnots [ExtPairIdx] 
RemovePseudoKnots (Vector ExtPairIdx)

Remove pseudoknotted pairs from extended RNA secondary structures.

(Shape sh, Show sh) => Shape (:. sh Edge) 
MkD2Secondary (Int, [ExtPairIdx]) 
BaseSelect ((a, a), ExtPairAnnotation) a

extended pairtype annotation given

newtype CTisomerism Source

Nucleotides in a pairing may be in the cis(==?) or trans(==?) state.

Constructors

CT 

Fields

unCT :: Int
 

Instances

Bounded CTisomerism 
Enum CTisomerism 
Eq CTisomerism 
Ord CTisomerism 
Read CTisomerism

Human-readable Read instance.

Show CTisomerism

Human-readable Show instance.

Ix CTisomerism 
Prim CTisomerism 
Unbox CTisomerism 
Bounds CTisomerism 
IsostericityLookup ExtPair

For extended basepairs, we take the default mapping and go from there.

TODO inClass missing

Vector Vector CTisomerism 
MVector MVector CTisomerism 
RemovePseudoKnots [ExtPairIdx] 
RemovePseudoKnots (Vector ExtPairIdx)

Remove pseudoknotted pairs from extended RNA secondary structures.

(Shape sh, Show sh) => Shape (:. sh CTisomerism) 
MkD2Secondary (Int, [ExtPairIdx]) 
BaseSelect ((a, a), ExtPairAnnotation) a

extended pairtype annotation given

Instances

Instances for Edge

Instances for CTisomerism

Types

type PairIdx = (Int, Int)Source

A basepair is simply a pair of Ints which are 0-indexing a sequence.

TODO storable vector, newtype, peek/poke?

type Pair = (Nuc, Nuc)Source

A pair as a tuple containing Nucs.

type ExtPairAnnotation = (CTisomerism, Edge, Edge)Source

Annotation for a basepair.

type ExtPairIdx = (PairIdx, ExtPairAnnotation)Source

An extended basepair is a basepair, annotated with edge and CTisomerism.

type ExtPair = (Pair, ExtPairAnnotation)Source

An extended basepair, with nucleotides an annotation.

little helpers

special show instances

tuple-like selection

class BaseSelect a b | a -> b whereSource

Selection of nucleotides and/or type classes independent of which type we are looking at.

Methods

baseL :: a -> bSource

select first index or nucleotide

baseR :: a -> bSource

select second index or nucleotide

baseP :: a -> (b, b)Source

select both nucleotides as pair

baseT :: a -> ExtPairAnnotationSource

select basepair type if existing or return default cWW

updL :: b -> a -> aSource

update first index or nucleotide

updR :: b -> a -> aSource

update second index or nucleotide

updP :: (b, b) -> a -> aSource

update complete pair

updT :: ExtPairAnnotation -> a -> aSource

update basepair type, error if not possible due to type a

Instances

BaseSelect ((a, a), ExtPairAnnotation) a

extended pairtype annotation given

BaseSelect (a, a) a

simple cis/wc-wc basepairs