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

Description

Synopsis

Documentation

newtype Codon a Source #

Codons are triplets of characters.

Constructors

Codon (a, a, a) 

Instances

Instances details
Eq a => Eq (Codon a) Source # 
Instance details

Defined in ELynx.Data.Character.Codon

Methods

(==) :: Codon a -> Codon a -> Bool #

(/=) :: Codon a -> Codon a -> Bool #

Ord a => Ord (Codon a) Source # 
Instance details

Defined in ELynx.Data.Character.Codon

Methods

compare :: Codon a -> Codon a -> Ordering #

(<) :: Codon a -> Codon a -> Bool #

(<=) :: Codon a -> Codon a -> Bool #

(>) :: Codon a -> Codon a -> Bool #

(>=) :: Codon a -> Codon a -> Bool #

max :: Codon a -> Codon a -> Codon a #

min :: Codon a -> Codon a -> Codon a #

Read a => Read (Codon a) Source # 
Instance details

Defined in ELynx.Data.Character.Codon

Show a => Show (Codon a) Source # 
Instance details

Defined in ELynx.Data.Character.Codon

Methods

showsPrec :: Int -> Codon a -> ShowS #

show :: Codon a -> String #

showList :: [Codon a] -> ShowS #

fromVecUnsafe :: Vector v a => v a -> Codon a Source #

Unsafe conversion from vector with at least three elements; only the first three elements are used, the rest is discarded.

data UniversalCode Source #

Universal codes.

Instances

Instances details
Bounded UniversalCode Source # 
Instance details

Defined in ELynx.Data.Character.Codon

Enum UniversalCode Source # 
Instance details

Defined in ELynx.Data.Character.Codon

Eq UniversalCode Source # 
Instance details

Defined in ELynx.Data.Character.Codon

Ord UniversalCode Source # 
Instance details

Defined in ELynx.Data.Character.Codon

Read UniversalCode Source # 
Instance details

Defined in ELynx.Data.Character.Codon

Show UniversalCode Source # 
Instance details

Defined in ELynx.Data.Character.Codon

Generic UniversalCode Source # 
Instance details

Defined in ELynx.Data.Character.Codon

Associated Types

type Rep UniversalCode :: Type -> Type #

ToJSON UniversalCode Source # 
Instance details

Defined in ELynx.Data.Character.Codon

FromJSON UniversalCode Source # 
Instance details

Defined in ELynx.Data.Character.Codon

type Rep UniversalCode Source # 
Instance details

Defined in ELynx.Data.Character.Codon

type Rep UniversalCode = D1 ('MetaData "UniversalCode" "ELynx.Data.Character.Codon" "elynx-seq-0.6.0.0-LtTbvishThEEtvOIpTEQaG" 'False) (C1 ('MetaCons "Standard" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "VertebrateMitochondrial" 'PrefixI 'False) (U1 :: Type -> Type))

translate :: UniversalCode -> Codon Nucleotide -> AminoAcidS Source #

Translate a codon to amino acids including translation stops.

translateX :: UniversalCode -> Codon NucleotideX -> AminoAcidS Source #

Translate a codon to amino acids including translation stops. Translate codons including gaps to amino acid gaps. Be careful, single or two character gaps can lead to a reading frame shift and hence, the translated sequence may be bogus.

translateI :: UniversalCode -> Codon NucleotideI -> AminoAcidI Source #

Translate a codon to amino acids including translation stops. Translate gap triplets to amino acid gaps, and triplets including unknowns to amino acid unknowns. Be careful, also translates other IUPAC characters to amino acid Xs!