BiobaseENA-0.0.0.2: European Nucleotide Archive data
Safe HaskellNone
LanguageHaskell2010

Biobase.GeneticCodes

Synopsis

Documentation

fromFileOrCached :: (MonadIO m, MonadError String m) => FilePath -> m (TranslationTable Char Char) Source #

If the given filepath exists, then we try to load the genetic table from the file. This will fail if there is not exactly one genetic table there. If fp is not a file, we try parsing fp as a numeric ID and look for that table. Finally we try finding an infix with that name.

This is all slightly "unsafe" but captures the most common scenario where we either load such a table from file or need selection of the correct one.

If the given filepath is "list", then a list of table id's and table names is returned.

fromByteString :: MonadError String m => ByteString -> m [TranslationTable Char Char] Source #

Parse a ByteString with translation tables.

fromFile :: (MonadIO m, MonadError String m) => FilePath -> m [TranslationTable Char Char] Source #

Import translation tables from a given file. In case of parse error, print the error and exit with a failure.

translate :: Translation t => TranslationTable (CodonType t) (AAType t) -> t -> TargetType t Source #

Translate from a given type of sequence t into the target type.