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".
TODO set ext-annotations to be (isomerism,edge,edge) and have a asString instance to read "cWW" "tSH" and other notation.
- 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 = (Letter RNA, Letter RNA)
- type ExtPairAnnotation = (CTisomerism, Edge, Edge)
- type ExtPairIdx = (PairIdx, ExtPairAnnotation)
- type ExtPair = (Pair, 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)
- class BaseSelect a b | a -> b where
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.
Bounded Edge Source # | |
Enum Edge Source # | |
Eq Edge Source # | |
Ord Edge Source # | |
Read Edge Source # | Human-readable Read instance. |
Show Edge Source # | Human-readable Show instance. |
Ix Edge Source # | |
Generic Edge Source # | |
ToJSON Edge Source # | |
FromJSON Edge Source # | |
Binary Edge Source # | |
Serialize Edge Source # | |
Unbox Edge Source # | |
IsostericityLookup ExtPair Source # | For extended basepairs, we take the default mapping and go from there. TODO inClass missing |
Vector Vector Edge Source # | |
MVector MVector Edge Source # | |
RemovePseudoKnots [ExtPairIdx] Source # | |
RemovePseudoKnots (Vector ExtPairIdx) Source # | Remove pseudoknotted pairs from extended RNA secondary structures. |
MkD2Secondary (Int, [ExtPairIdx]) Source # | |
BaseSelect ((a, a), ExtPairAnnotation) a Source # | extended pairtype annotation given |
type Rep Edge Source # | |
data Vector Edge Source # | |
data MVector s Edge Source # | |
Is the base pair in cis or trans configuration
newtype CTisomerism Source #
Nucleotides in a pairing may be in the cis(==?) or trans(==?) state.
Bounded CTisomerism Source # | |
Enum CTisomerism Source # | |
Eq CTisomerism Source # | |
Ord CTisomerism Source # | |
Read CTisomerism Source # | Human-readable Read instance. |
Show CTisomerism Source # | Human-readable Show instance. |
Ix CTisomerism Source # | |
Generic CTisomerism Source # | |
ToJSON CTisomerism Source # | |
FromJSON CTisomerism Source # | |
Binary CTisomerism Source # | |
Serialize CTisomerism Source # | |
Unbox CTisomerism Source # | |
IsostericityLookup ExtPair Source # | For extended basepairs, we take the default mapping and go from there. TODO inClass missing |
Vector Vector CTisomerism Source # | |
MVector MVector CTisomerism Source # | |
RemovePseudoKnots [ExtPairIdx] Source # | |
RemovePseudoKnots (Vector ExtPairIdx) Source # | Remove pseudoknotted pairs from extended RNA secondary structures. |
MkD2Secondary (Int, [ExtPairIdx]) Source # | |
BaseSelect ((a, a), ExtPairAnnotation) a Source # | extended pairtype annotation given |
type Rep CTisomerism Source # | |
data Vector CTisomerism Source # | |
data MVector s CTisomerism Source # | |
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 = (Pair, ExtPairAnnotation) Source #
An extended basepair, with nucleotides an annotation.
little helpers
tuple-like selection
class BaseSelect a b | a -> b where Source #
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 -> ExtPairAnnotation Source #
select basepair type if existing or return default cWW
update first index or nucleotide
update second index or nucleotide
updP :: (b, b) -> a -> a Source #
update complete pair
updT :: ExtPairAnnotation -> a -> a Source #
update basepair type, error if not possible due to type a
BaseSelect ((a, a), ExtPairAnnotation) a Source # | extended pairtype annotation given |
BaseSelect (a, a) a Source # | simple cis/wc-wc basepairs |