elynx-seq-0.6.0.0: Handle molecular sequences
Copyright(c) Dominik Schrempf 2021
LicenseGPL-3.0-or-later
Maintainerdominik.schrempf@gmail.com
Stabilityunstable
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

ELynx.Data.Alphabet.Alphabet

Description

Creation date: Fri May 10 11:10:32 2019.

Hierarchy:

  1. Character type.
  2. Sets of Characters form Alphabets; each Alphabet has a specification AlphabetSpec.

New alphabets have to be added manually to this module.

This way of handling characters and alphabets IS NOT TYPE SAFE, but much, much faster. A second layer of modules such as Nucleotide depend on a Character type class. Hence, they provide a type safe way of handling alphabets. Conversion is possible, for instance, with fromCVec, and toCVec.

Synopsis

Documentation

data Alphabet Source #

Available alphabets; for details see alphabetSpec.

Instances

Instances details
Bounded Alphabet Source # 
Instance details

Defined in ELynx.Data.Alphabet.Alphabet

Enum Alphabet Source # 
Instance details

Defined in ELynx.Data.Alphabet.Alphabet

Eq Alphabet Source # 
Instance details

Defined in ELynx.Data.Alphabet.Alphabet

Ord Alphabet Source # 
Instance details

Defined in ELynx.Data.Alphabet.Alphabet

Read Alphabet Source # 
Instance details

Defined in ELynx.Data.Alphabet.Alphabet

Show Alphabet Source # 
Instance details

Defined in ELynx.Data.Alphabet.Alphabet

Generic Alphabet Source # 
Instance details

Defined in ELynx.Data.Alphabet.Alphabet

Associated Types

type Rep Alphabet :: Type -> Type #

Methods

from :: Alphabet -> Rep Alphabet x #

to :: Rep Alphabet x -> Alphabet #

ToJSON Alphabet Source # 
Instance details

Defined in ELynx.Data.Alphabet.Alphabet

FromJSON Alphabet Source # 
Instance details

Defined in ELynx.Data.Alphabet.Alphabet

type Rep Alphabet Source # 
Instance details

Defined in ELynx.Data.Alphabet.Alphabet

type Rep Alphabet = D1 ('MetaData "Alphabet" "ELynx.Data.Alphabet.Alphabet" "elynx-seq-0.6.0.0-LtTbvishThEEtvOIpTEQaG" 'False) ((C1 ('MetaCons "DNA" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DNAX" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DNAI" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Protein" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ProteinX" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ProteinS" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ProteinI" 'PrefixI 'False) (U1 :: Type -> Type))))

data AlphabetSpec Source #

Alphabet specification. Set is used because it provides fast lookups.

Constructors

AlphabetSpec 

Fields

alphabetSpec :: Alphabet -> AlphabetSpec Source #

Get the alphabet specification for a given alphabet.

alphabetDescription :: Alphabet -> String Source #

Verbose alphabet name.

isStd :: Alphabet -> Character -> Bool Source #

Test if standard character.

isGap :: Alphabet -> Character -> Bool Source #

Test if gap.

isUnknown :: Alphabet -> Character -> Bool Source #

Test if unknown.

isIUPAC :: Alphabet -> Character -> Bool Source #

Test if extended IUPAC character (excluding gaps and unknowns).

isMember :: Alphabet -> Character -> Bool Source #

Test if member of alphabet.