| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Biobase.Primary.Letter
Contents
Description
A newtype with an attached phantom type which allows us to encode
nucleotides and amino acids. Actual seqence-specific functions can be founds
in the appropriate modules AA and Nuc.
Synopsis
- newtype Letter (seqTy :: *) (nameTy :: k) = Letter {}
- changeNameTy :: Letter seqTy nameTy -> Letter seqTy newNameTy
- letterDataType :: DataType
- letterConstr :: Constr
- type Primary t n = Vector (Letter t n)
- class LetterChar t n where
- letterChar :: Letter t n -> Char
- charLetter :: Char -> Letter t n
- class MkPrimary c t n where
Documentation
newtype Letter (seqTy :: *) (nameTy :: k) Source #
A Letter together with its phantom type seqTy encodes bio-sequences,
while nameTy allows to specify a type-level name for a letter.
Instances
changeNameTy :: Letter seqTy nameTy -> Letter seqTy newNameTy Source #
While coerce will always work, this way restricts the change to just the
nameTy.
class LetterChar t n where Source #
Convert Letter types into character forms. DNA, RNA, and amino
acid sequences can make use of this. Other Letter types only if they
have single-char representations.
Instances
| LetterChar AA (n :: k) Source # | |
Defined in Biobase.Primary.AA | |
| LetterChar DNA (n :: k) Source # | |
Defined in Biobase.Primary.Nuc.DNA | |
| LetterChar RNA (n :: k) Source # | |
Defined in Biobase.Primary.Nuc.RNA | |
| LetterChar XNA (n :: k) Source # | |
Defined in Biobase.Primary.Nuc.XNA | |
class MkPrimary c t n where Source #
Conversion from a large number of sequence-like inputs to primary sequences.
Instances
| MkPrimary (Vector Char) t n => MkPrimary ByteString t (n :: k) Source # | |
Defined in Biobase.Primary.Letter Methods primary :: ByteString -> Primary t n Source # | |
| MkPrimary (Vector Char) t n => MkPrimary ByteString t (n :: k) Source # | |
Defined in Biobase.Primary.Letter Methods primary :: ByteString -> Primary t n Source # | |
| MkPrimary (Vector Char) t n => MkPrimary Text t (n :: k) Source # | |
| MkPrimary (Vector Char) t n => MkPrimary Text t (n :: k) Source # | |
| MkPrimary (Vector Char) t n => MkPrimary String t (n :: k) Source # | |
| MkPrimary (Vector Char) AA (n :: k) Source # | |
| MkPrimary (Vector Char) DNA (n :: k) Source # | |
| MkPrimary (Vector Char) RNA (n :: k) Source # | |
| MkPrimary (Vector Char) XNA (n :: k) Source # | |
| MkPrimary (Vector Char) DEG (n :: k) Source # | |
| MkPrimary (Vector Int) Unknown (n :: k) Source # | |