Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Collects all functions pertaining to the translation of nucleotides to amino acids for Lazy ByteString.
- chunksOf :: Int64 -> ByteString -> [ByteString]
- codon2aa :: Codon -> Either ByteString AA
- customCodon2aa :: [(Codon, Char)] -> Codon -> Either ByteString AA
- translate :: Int64 -> FastaSequence -> Either ByteString FastaSequence
- customTranslate :: [(Codon, AA)] -> Int64 -> FastaSequence -> Either ByteString FastaSequence
Documentation
chunksOf :: Int64 -> ByteString -> [ByteString] Source #
Lazy ByteString version of chunksOf
codon2aa :: Codon -> Either ByteString AA Source #
Converts a codon to an amino acid Remember, if there is an N in that DNA sequence, then it is translated as an X, an unknown amino acid.
customCodon2aa :: [(Codon, Char)] -> Codon -> Either ByteString AA Source #
Translate a codon using a custom table
translate :: Int64 -> FastaSequence -> Either ByteString FastaSequence Source #
Translates a bytestring of nucleotides given a reading frame (1, 2, or 3) -- drops the first 0, 1, or 2 nucleotides respectively. Returns a bytestring with the error if the codon is invalid.
customTranslate :: [(Codon, AA)] -> Int64 -> FastaSequence -> Either ByteString FastaSequence Source #
Translates a bytestring of nucleotides given a reading frame (1, 2, or 3) -- drops the first 0, 1, or 2 nucleotides respectively. Returns a bytestring with the error if the codon is invalid. Also has customized codon translations as well overriding the defaults.