Safe Haskell | None |
---|
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.
- threeChar :: String -> ExtPairAnnotation
- newtype Edge = Edge {}
- wc :: Edge
- charEdgeList :: [(Char, Edge)]
- edgeCharList :: [(Edge, Char)]
- newtype CTisomerism = CT {}
- cis :: CTisomerism
- antiCT :: a
- paraCT :: a
- charCTList :: [(Char, CTisomerism)]
- ctCharList :: [(CTisomerism, Char)]
- type PairIdx = (Int, Int)
- type Pair = (Nuc, Nuc)
- type ExtPairAnnotation = (CTisomerism, Edge, Edge)
- type ExtPairIdx = (PairIdx, ExtPairAnnotation)
- type ExtPair = (Pair, ExtPairAnnotation)
- cWW :: (CTisomerism, Edge, Edge)
- cWS :: (CTisomerism, Edge, Edge)
- cWH :: (CTisomerism, Edge, Edge)
- cSW :: (CTisomerism, Edge, Edge)
- cSS :: (CTisomerism, Edge, Edge)
- cSH :: (CTisomerism, Edge, Edge)
- cHW :: (CTisomerism, Edge, Edge)
- cHS :: (CTisomerism, Edge, Edge)
- cHH :: (CTisomerism, Edge, Edge)
- tWW :: (CTisomerism, Edge, Edge)
- tWS :: (CTisomerism, Edge, Edge)
- tWH :: (CTisomerism, Edge, Edge)
- tSW :: (CTisomerism, Edge, Edge)
- tSS :: (CTisomerism, Edge, Edge)
- tSH :: (CTisomerism, Edge, Edge)
- tHW :: (CTisomerism, Edge, Edge)
- tHS :: (CTisomerism, Edge, Edge)
- tHH :: (CTisomerism, Edge, Edge)
- class BaseSelect a b | a -> b where
- baseL :: a -> b
- baseR :: a -> b
- baseP :: a -> (b, b)
- baseT :: a -> ExtPairAnnotation
- updL :: b -> a -> a
- updR :: b -> a -> a
- updP :: (b, b) -> a -> a
- updT :: ExtPairAnnotation -> a -> a
Documentation
threeChar :: String -> ExtPairAnnotationSource
Easy reading of a three-Char string into a triple.
Each nucleotide in a pair may be paired using one of three edges: watson-crik, sugar, or hoogsteen.
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 |
charEdgeList :: [(Char, Edge)]Source
edgeCharList :: [(Edge, Char)]Source
newtype CTisomerism Source
Nucleotides in a pairing may be in the cis(==?) or trans(==?) state.
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 |
charCTList :: [(Char, CTisomerism)]Source
ctCharList :: [(CTisomerism, Char)]Source
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 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
cWW :: (CTisomerism, Edge, Edge)Source
cWS :: (CTisomerism, Edge, Edge)Source
cWH :: (CTisomerism, Edge, Edge)Source
cSW :: (CTisomerism, Edge, Edge)Source
cSS :: (CTisomerism, Edge, Edge)Source
cSH :: (CTisomerism, Edge, Edge)Source
cHW :: (CTisomerism, Edge, Edge)Source
cHS :: (CTisomerism, Edge, Edge)Source
cHH :: (CTisomerism, Edge, Edge)Source
tWW :: (CTisomerism, Edge, Edge)Source
tWS :: (CTisomerism, Edge, Edge)Source
tWH :: (CTisomerism, Edge, Edge)Source
tSW :: (CTisomerism, Edge, Edge)Source
tSS :: (CTisomerism, Edge, Edge)Source
tSH :: (CTisomerism, Edge, Edge)Source
tHW :: (CTisomerism, Edge, Edge)Source
tHS :: (CTisomerism, Edge, Edge)Source
tHH :: (CTisomerism, Edge, Edge)Source
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.
select first index or nucleotide
select second index or nucleotide
select both nucleotides as pair
baseT :: a -> ExtPairAnnotationSource
select basepair type if existing or return default cWW
update first index or nucleotide
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
BaseSelect ((a, a), ExtPairAnnotation) a | extended pairtype annotation given |
BaseSelect (a, a) a | simple cis/wc-wc basepairs |