Safe Haskell | None |
---|---|
Language | Haskell2010 |
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".
Since we often want to make "pairedness" explicit, we have a newtype for this as well.
TODO set ext-annotations to be (isomerism,edge,edge) and have a asString instance to read "cWW" "tSH" and other notation.
Synopsis
- newtype Basepair = BP {}
- pattern AA :: Basepair
- pattern AC :: Basepair
- pattern AG :: Basepair
- pattern AU :: Basepair
- pattern CA :: Basepair
- pattern CC :: Basepair
- pattern CG :: Basepair
- pattern CU :: Basepair
- pattern GA :: Basepair
- pattern GC :: Basepair
- pattern GG :: Basepair
- pattern GU :: Basepair
- pattern UA :: Basepair
- pattern UC :: Basepair
- pattern UG :: Basepair
- pattern UU :: Basepair
- pattern NS :: Basepair
- pattern NoBP :: Basepair
- newtype Edge = Edge {}
- pattern W :: Edge
- pattern S :: Edge
- pattern H :: Edge
- newtype CTisomerism = CT {}
- pattern Cis :: CTisomerism
- pattern Trn :: CTisomerism
- type PairIdx = (Int, Int)
- type Pair n = (Letter RNA n, Letter RNA n)
- type ExtPairAnnotation = (CTisomerism, Edge, Edge)
- type ExtPairIdx = (PairIdx, ExtPairAnnotation)
- type ExtPair n = (Pair n, ExtPairAnnotation)
- pattern CHH :: (CTisomerism, Edge, Edge)
- pattern CHS :: (CTisomerism, Edge, Edge)
- pattern CHW :: (CTisomerism, Edge, Edge)
- pattern CSH :: (CTisomerism, Edge, Edge)
- pattern CSS :: (CTisomerism, Edge, Edge)
- pattern CSW :: (CTisomerism, Edge, Edge)
- pattern CWH :: (CTisomerism, Edge, Edge)
- pattern CWS :: (CTisomerism, Edge, Edge)
- pattern CWW :: (CTisomerism, Edge, Edge)
- pattern THH :: (CTisomerism, Edge, Edge)
- pattern THS :: (CTisomerism, Edge, Edge)
- pattern THW :: (CTisomerism, Edge, Edge)
- pattern TSH :: (CTisomerism, Edge, Edge)
- pattern TSS :: (CTisomerism, Edge, Edge)
- pattern TSW :: (CTisomerism, Edge, Edge)
- pattern TWH :: (CTisomerism, Edge, Edge)
- pattern TWS :: (CTisomerism, Edge, Edge)
- pattern TWW :: (CTisomerism, Edge, Edge)
Newtype for efficient basepair encoding.
Encode a base pair as a single Int
.
Instances
Newtypes for extended secondary structures
Encode which of three edges is engaged in base pairing
Each nucleotide in a pair may be paired using one of three edges: watson-crick, sugar, or hoogsteen.
Instances
Is the base pair in cis or trans configuration
newtype CTisomerism Source #
Nucleotides in a pairing may be in the cis(==?) or trans(==?) state.
Instances
pattern Cis :: CTisomerism Source #
pattern Trn :: CTisomerism Source #
Types
type PairIdx = (Int, Int) Source #
A basepair is simply a pair of Ints which are 0-indexing a sequence.
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 n = (Pair n, ExtPairAnnotation) Source #
An extended basepair, with nucleotides an annotation.