Copyright | (c) Dominik Schrempf 2021 |
---|---|
License | GPL-3.0-or-later |
Maintainer | dominik.schrempf@gmail.com |
Stability | unstable |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Creation date: Fri Oct 12 16:24:02 2018.
See header of Alphabet
.
Synopsis
- class (Show a, Read a, Eq a, Ord a, Enum a, Bounded a, Unbox a) => Character a where
- fromChar :: Character a => Char -> a
- toChar :: Character a => a -> Char
- fromString :: Character a => String -> [a]
- toString :: Character a => [a] -> String
- class Character a => CharacterX a where
- gap :: a
- isGap :: CharacterX a => a -> Bool
- class CharacterX a => CharacterI a where
- unknown :: a
- iupac :: [a]
- toStandard :: a -> [a]
- isUnknown :: CharacterI a => a -> Bool
- isIUPAC :: CharacterI a => a -> Bool
- isStandard :: CharacterI a => a -> Bool
- convert :: (Character a, Character b) => a -> b
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.
Instances
Character AminoAcidX Source # | |
Defined in ELynx.Data.Character.AminoAcidX toWord :: AminoAcidX -> Word8 Source # fromWord :: Word8 -> AminoAcidX Source # | |
Character AminoAcidS Source # | |
Defined in ELynx.Data.Character.AminoAcidS toWord :: AminoAcidS -> Word8 Source # fromWord :: Word8 -> AminoAcidS Source # | |
Character AminoAcidI Source # | |
Defined in ELynx.Data.Character.AminoAcidI toWord :: AminoAcidI -> Word8 Source # fromWord :: Word8 -> AminoAcidI Source # | |
Character AminoAcid Source # | |
Character Nucleotide Source # | |
Defined in ELynx.Data.Character.Nucleotide toWord :: Nucleotide -> Word8 Source # fromWord :: Word8 -> Nucleotide Source # | |
Character NucleotideI Source # | |
Defined in ELynx.Data.Character.NucleotideI toWord :: NucleotideI -> Word8 Source # fromWord :: Word8 -> NucleotideI Source # | |
Character NucleotideX Source # | |
Defined in ELynx.Data.Character.NucleotideX toWord :: NucleotideX -> Word8 Source # fromWord :: Word8 -> NucleotideX Source # |
class Character a => CharacterX a where Source #
An extended character type with gaps and unknowns.
Instances
CharacterX AminoAcidX Source # | |
Defined in ELynx.Data.Character.AminoAcidX gap :: AminoAcidX Source # | |
CharacterX AminoAcidS Source # | |
Defined in ELynx.Data.Character.AminoAcidS gap :: AminoAcidS Source # | |
CharacterX AminoAcidI Source # | |
Defined in ELynx.Data.Character.AminoAcidI gap :: AminoAcidI Source # | |
CharacterX NucleotideI Source # | |
Defined in ELynx.Data.Character.NucleotideI gap :: NucleotideI Source # | |
CharacterX NucleotideX Source # | |
Defined in ELynx.Data.Character.NucleotideX gap :: NucleotideX 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.
Instances
CharacterI AminoAcidI Source # | |
Defined in ELynx.Data.Character.AminoAcidI unknown :: AminoAcidI Source # iupac :: [AminoAcidI] Source # toStandard :: AminoAcidI -> [AminoAcidI] Source # | |
CharacterI NucleotideI Source # | |
Defined in ELynx.Data.Character.NucleotideI unknown :: NucleotideI Source # iupac :: [NucleotideI] Source # toStandard :: NucleotideI -> [NucleotideI] 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?