Copyright | 2021 Dominik Schrempf |
---|---|
License | GPL-3.0-or-later |
Maintainer | dominik.schrempf@gmail.com |
Stability | unstable |
Portability | portable |
Safe Haskell | Safe-Inferred |
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 AminoAcid Source # | |
Character AminoAcidI Source # | |
Defined in ELynx.Character.AminoAcidI toWord :: AminoAcidI -> Word8 Source # fromWord :: Word8 -> AminoAcidI Source # | |
Character AminoAcidS Source # | |
Defined in ELynx.Character.AminoAcidS toWord :: AminoAcidS -> Word8 Source # fromWord :: Word8 -> AminoAcidS Source # | |
Character AminoAcidX Source # | |
Defined in ELynx.Character.AminoAcidX toWord :: AminoAcidX -> Word8 Source # fromWord :: Word8 -> AminoAcidX Source # | |
Character Nucleotide Source # | |
Defined in ELynx.Character.Nucleotide toWord :: Nucleotide -> Word8 Source # fromWord :: Word8 -> Nucleotide Source # | |
Character NucleotideI Source # | |
Defined in ELynx.Character.NucleotideI toWord :: NucleotideI -> Word8 Source # fromWord :: Word8 -> NucleotideI Source # | |
Character NucleotideX Source # | |
Defined in ELynx.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 AminoAcidI Source # | |
Defined in ELynx.Character.AminoAcidI gap :: AminoAcidI Source # | |
CharacterX AminoAcidS Source # | |
Defined in ELynx.Character.AminoAcidS gap :: AminoAcidS Source # | |
CharacterX AminoAcidX Source # | |
Defined in ELynx.Character.AminoAcidX gap :: AminoAcidX Source # | |
CharacterX NucleotideI Source # | |
Defined in ELynx.Character.NucleotideI gap :: NucleotideI Source # | |
CharacterX NucleotideX Source # | |
Defined in ELynx.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.Character.AminoAcidI unknown :: AminoAcidI Source # iupac :: [AminoAcidI] Source # toStandard :: AminoAcidI -> [AminoAcidI] Source # | |
CharacterI NucleotideI Source # | |
Defined in ELynx.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?