BiobaseXNA-0.11.0.0: Efficient RNA/DNA/Protein Primary/Secondary Structure

Safe HaskellNone
LanguageHaskell2010

Biobase.Primary.Hashed

Description

Fast hash functions for Primary sequences. This function maps primary sequences to a continuous set of Ints [0 ..] where the maximum is dependent on the input length. This allows us to map short sequences into contiguous memory locations. Useful for, say, energy lookup tables.

Synopsis

Documentation

newtype HashedPrimary t n Source #

The hash of a primary sequence.

Constructors

HashedPrimary 

Fields

Instances
Vector Vector (HashedPrimary t n) Source # 
Instance details

Defined in Biobase.Primary.Hashed

MVector MVector (HashedPrimary t n) Source # 
Instance details

Defined in Biobase.Primary.Hashed

Bounded (HashedPrimary t n) Source # 
Instance details

Defined in Biobase.Primary.Hashed

Enum (HashedPrimary t n) Source # 
Instance details

Defined in Biobase.Primary.Hashed

Eq (HashedPrimary t n) Source # 
Instance details

Defined in Biobase.Primary.Hashed

Methods

(==) :: HashedPrimary t n -> HashedPrimary t n -> Bool #

(/=) :: HashedPrimary t n -> HashedPrimary t n -> Bool #

Ord (HashedPrimary t n) Source # 
Instance details

Defined in Biobase.Primary.Hashed

Read (HashedPrimary t n) Source # 
Instance details

Defined in Biobase.Primary.Hashed

Show (HashedPrimary t n) Source # 
Instance details

Defined in Biobase.Primary.Hashed

Ix (HashedPrimary t n) Source # 
Instance details

Defined in Biobase.Primary.Hashed

Unbox (HashedPrimary t n) Source # 
Instance details

Defined in Biobase.Primary.Hashed

newtype MVector s (HashedPrimary t n) Source # 
Instance details

Defined in Biobase.Primary.Hashed

newtype Vector (HashedPrimary t n) Source # 
Instance details

Defined in Biobase.Primary.Hashed

mkHashedPrimary :: forall t n. (Unbox (Letter t n), Bounded (Letter t n), Enum (Letter t n)) => Primary t n -> HashedPrimary t n Source #

Given a piece of primary sequence information, reduce it to an index. The empty input produces an index of 0.

hash2primary :: forall t n. (Unbox (Letter t n), Bounded (Letter t n), Enum (Letter t n)) => HashedPrimary t n -> Primary t n Source #

Turn a hash back into a sequence. Will fail if the resulting sequence has more than 100 elements.