Safe Haskell | None |
---|---|
Language | Haskell2010 |
Abstract translation functionality. Given a genetic code translation table (as provided within this module), provide translation from the nucleotide to the amino acid alphabet.
Limited "backtranslation" capabilities are provided. Since this process is lossy, it should only be used in very specific circumstances.
TODO Translation from @BioSequence RNA is missing.
Synopsis
- class Translation t where
- type TargetType t :: *
- type CodonType t :: *
- type AAType t :: *
- translate :: TranslationTable (CodonType t) (AAType t) -> t -> TargetType t
- translateAllFrames :: TranslationTable (CodonType t) (AAType t) -> t -> TargetType t
Documentation
class Translation t where Source #
type TargetType t :: * Source #
Defines the target type for a given translation input.
type CodonType t :: * Source #
Type of the nucleotide characters.
Type of the amino acid characters.
translate :: TranslationTable (CodonType t) (AAType t) -> t -> TargetType t Source #
Translate from a given type of sequence t
into the target type.
translateAllFrames :: TranslationTable (CodonType t) (AAType t) -> t -> TargetType t Source #
This function works just like translate
but with an important difference of creating a
target sequence that contains all possible frames. The index mod 3
yields the current frame.