Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- mkANuc3SubstMat :: TranslationTable (Letter DNA n) (Letter AA n) -> AASubstMat t (DiscLogOdds k) n n -> ANuc3SubstMat t (Letter AA n, DiscLogOdds k) n n
- fromFileOrCached :: (MonadIO m, MonadError String m) => FilePath -> m (AASubstMat t (DiscLogOdds (1 :% 1)) a b)
- mkProbabilityMatrix :: Double -> AASubstMat t (DiscLogOdds k) n m -> AASubstMat t (Log (Probability NotNormalized Double)) n m
Documentation
mkANuc3SubstMat :: TranslationTable (Letter DNA n) (Letter AA n) -> AASubstMat t (DiscLogOdds k) n n -> ANuc3SubstMat t (Letter AA n, DiscLogOdds k) n n Source #
The usual substitution matrix, but here with a codon and an amino acid to be compared.
The resulting AA
are tagged with the name type from the DNA n
.
TODO Definitely use the correct upper bound constants here!
TODO the amino-acid range produces wrong reads from m
. We should have this in ExceptT to make
sure we do not read from undefined memory.
fromFileOrCached :: (MonadIO m, MonadError String m) => FilePath -> m (AASubstMat t (DiscLogOdds (1 :% 1)) a b) Source #
This function does the following:
1. check if fname
is a file, and if so try to load it.
2. if not, check if fname
happens to be the name of one of the known PAM/BLOSUM
tables.
mkProbabilityMatrix :: Double -> AASubstMat t (DiscLogOdds k) n m -> AASubstMat t (Log (Probability NotNormalized Double)) n m Source #
Turn log-odds into log-probabilities. Normalizes over the whole set of values in the matrix.
TODO check if lambda should indeed be 1.0