BiobaseXNA-0.9.3.0: Efficient RNA/DNA representations

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 Source #

The hash of a primary sequence.

Constructors

HashedPrimary 

Fields

Instances

Vector Vector (HashedPrimary a0) Source # 
MVector MVector (HashedPrimary a0) Source # 
Bounded (HashedPrimary t) Source # 
Enum (HashedPrimary t) Source # 
Eq (HashedPrimary t) Source # 
Ord (HashedPrimary t) Source # 
Read (HashedPrimary t) Source # 
Show (HashedPrimary t) Source # 
Ix (HashedPrimary t) Source # 
Unbox (HashedPrimary a0) Source # 
data MVector s (HashedPrimary a0) Source # 
data Vector (HashedPrimary a0) Source # 

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

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

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

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