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.Character.Character

Description

Creation date: Fri Oct 12 16:24:02 2018.

See header of Alphabet.

Synopsis

Documentation

class (Show a, Read a, Eq a, Ord a, Enum a, Bounded a, Unbox a) => Character a where Source #

A set of characters forms an Alphabet. At the moment, Word8 is used, since none of the alphabets has more than 255 characters.

Methods

toWord :: a -> Word8 Source #

Write characters.

fromWord :: Word8 -> a Source #

Read characters.

fromChar :: Character a => Char -> a Source #

Conversion from Char.

toChar :: Character a => a -> Char Source #

Conversion to Char.

fromString :: Character a => String -> [a] Source #

Conversion from String.

toString :: Character a => [a] -> String Source #

Conversion to String.

class Character a => CharacterX a where Source #

An extended character type with gaps and unknowns.

Methods

gap :: a Source #

isGap :: CharacterX a => a -> Bool Source #

Is the character a gap or unknown?

class CharacterX a => CharacterI a where Source #

IUPAC characters with a mapping to extended characters.

Methods

unknown :: a Source #

iupac :: [a] Source #

toStandard :: a -> [a] Source #

isUnknown :: CharacterI a => a -> Bool Source #

Check if a IUPAC CharacterI is unknown (e.g., N for nucleotides).

isIUPAC :: CharacterI a => a -> Bool Source #

Is the given character a IUPAC character?

isStandard :: CharacterI a => a -> Bool Source #

Is the given character a standard character?

convert :: (Character a, Character b) => a -> b Source #

Convert between character classes. May throw error.