| Safe Haskell | None |
|---|
Biobase.SElab.Types
Description
Infernal Stockholm files and covariance models, and other related files use a bunch of different identifiers. We provide newtypes for more type safety.
TODO Use (Bio.Core.Sequence.Offset) instead of Int for sequence info
TODO move BitScores, null models, probabilities into its own library.
- newtype Accession t = ACC {}
- newtype Identification t = IDD {
- unIDD :: ByteString
- data Clan
- data Pfam
- data Rfam
- data Species
- newtype BitScore = BitScore {
- unBitScore :: Double
- prob2Score :: Double -> Double -> BitScore
- score2Prob :: Double -> BitScore -> Double
- newtype Classification = Classification {}
Accession and string Identifier with phantom types.
Accession number, in the format of RFxxxxx, PFxxxxx, or CLxxxxx. We keep only the Int-part. A phantom type specifies which kind of accession number this is. For Species, we just have an index, it seems.
newtype Identification t Source
One word name for the family or clan. Phantom-typed with the correct type of model. Can be a longer name for species.
Constructors
| IDD | |
Fields
| |
Instances
| Eq (Identification t) | |
| Eq (Identification t) => Ord (Identification t) | |
| Read (Identification t) | |
| Show (Identification t) |
Infernal bit score. Behaves like a double (deriving Num).
Infernal users guide, p.42: log-odds score in log_2 (aka bits).
S = log_2 (P(seq|CM) / P(seq|null))
Constructors
| BitScore | |
Fields
| |
prob2Score :: Double -> Double -> BitScoreSource
Given a null model and a probability, calculate the corresponding
BitScore.
score2Prob :: Double -> BitScore -> DoubleSource
Given a null model and a BitScore return the corresponding probability.
newtype Classification Source
Classification names (taxonomic classification)
Constructors
| Classification | |
Fields | |