fasta-0.7.2.1: A simple, mindless parser for fasta files.

Safe HaskellSafe-Inferred
LanguageHaskell98

Data.Fasta.ByteString.Translation

Description

Collects all functions pertaining to the translation of nucleotides to amino acids for ByteStrings

Synopsis

Documentation

chunksOf :: Int -> ByteString -> [ByteString] Source

ByteString version of chunksOf

codon2aa :: Codon -> Either ByteString ByteString Source

Converts a codon to an amino acid Remember, if there is an N in that DNA sequence, then it is invalid and treated as a gap

translate :: Int -> 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.