BiobaseTypes-0.2.0.1: Collection of types for bioinformatics

Safe HaskellNone
LanguageHaskell2010

Biobase.Types.Bitscore

Description

Bit scores as used by different algorithms in bioinformatics, linguistics, and probably elsewhere.

Basically, the base-2 logarithm of the probability of the input given the model vs the probability of the input given the null model.

S = log_2 (P(seq|model) / P(seq|null))
Synopsis

Documentation

newtype Bitscore Source #

Bit score; behaves like a double (deriving Num). In particular, the algebraic operations behave as expected Bitscore a + Bitscore b == Bitscore (a+b).

Currently geared towards use as in Infernal and HMMER.

Infernal users guide, p.42: log-odds score in log_2 (aka bits).

Constructors

Bitscore 

Fields

Instances
Eq Bitscore Source # 
Instance details

Defined in Biobase.Types.Bitscore

Fractional Bitscore Source # 
Instance details

Defined in Biobase.Types.Bitscore

Num Bitscore Source # 
Instance details

Defined in Biobase.Types.Bitscore

Ord Bitscore Source # 
Instance details

Defined in Biobase.Types.Bitscore

Read Bitscore Source # 
Instance details

Defined in Biobase.Types.Bitscore

Show Bitscore Source # 
Instance details

Defined in Biobase.Types.Bitscore

Generic Bitscore Source # 
Instance details

Defined in Biobase.Types.Bitscore

Associated Types

type Rep Bitscore :: Type -> Type #

Methods

from :: Bitscore -> Rep Bitscore x #

to :: Rep Bitscore x -> Bitscore #

NumericLimits Bitscore Source # 
Instance details

Defined in Biobase.Types.Bitscore

Semiring Bitscore Source # 
Instance details

Defined in Biobase.Types.Bitscore

NFData Bitscore Source # 
Instance details

Defined in Biobase.Types.Bitscore

Methods

rnf :: Bitscore -> () #

Hashable Bitscore Source # 
Instance details

Defined in Biobase.Types.Bitscore

Methods

hashWithSalt :: Int -> Bitscore -> Int #

hash :: Bitscore -> Int #

ToJSON Bitscore Source # 
Instance details

Defined in Biobase.Types.Bitscore

FromJSON Bitscore Source # 
Instance details

Defined in Biobase.Types.Bitscore

Binary Bitscore Source # 
Instance details

Defined in Biobase.Types.Bitscore

Methods

put :: Bitscore -> Put #

get :: Get Bitscore #

putList :: [Bitscore] -> Put #

Serialize Bitscore Source # 
Instance details

Defined in Biobase.Types.Bitscore

Default Bitscore Source #

A default bitscore of "-infinity", but with 10-1 wiggle room.

TODO Check out the different "defaults" Infernal uses

Instance details

Defined in Biobase.Types.Bitscore

Methods

def :: Bitscore #

Unbox Bitscore Source # 
Instance details

Defined in Biobase.Types.Bitscore

Vector Vector Bitscore Source # 
Instance details

Defined in Biobase.Types.Bitscore

MVector MVector Bitscore Source # 
Instance details

Defined in Biobase.Types.Bitscore

type Rep Bitscore Source # 
Instance details

Defined in Biobase.Types.Bitscore

type Rep Bitscore = D1 (MetaData "Bitscore" "Biobase.Types.Bitscore" "BiobaseTypes-0.2.0.1-B9coIbijR6NEFcCxvqIOZp" True) (C1 (MetaCons "Bitscore" PrefixI True) (S1 (MetaSel (Just "getBitscore") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Double)))
newtype Vector Bitscore Source # 
Instance details

Defined in Biobase.Types.Bitscore

newtype MVector s Bitscore Source # 
Instance details

Defined in Biobase.Types.Bitscore

prob2Score :: Double -> Double -> Bitscore Source #

Given a null model and a probability, calculate the corresponding BitScore.

TODO x<=epsilon ?

score2Prob :: Double -> Bitscore -> Double Source #

Given a null model and a BitScore return the corresponding probability.