-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Collection of types for bioinformatics -- -- Types used in a number of bioinformatics libraries. -- -- @package BiobaseTypes @version 0.2.0.0 -- | Accession numbers. These numbers are not really numbers because -- they they are made up of alphanumeric characters. module Biobase.Types.Accession -- | The accession number is a unique identifier in bioinformatics. -- -- Depending on the source, accession numbers follow different -- alphanumeric formats! While letters-than-numbers is quite common, -- swissprot uses a mix. Hence, we just use a text string as accession. -- -- A phantom type is provided to enable type safety annotations. Helper -- functions provide smart construction from the Accession -- tagged generic type. newtype Accession t Accession :: Text -> Accession t [_getAccession] :: Accession t -> Text -- | Generate an accession with an explicit phantom type: accession' -- Nucleotide Bla has type :: Accession Nucleotide. accession' :: ConvertibleStrings s Text => t -> s -> Accession t -- | Generate an accession when the type Accession t is clear from -- the context. accession :: ConvertibleStrings s Text => s -> Accession t -- | Retag an accession retagAccession :: Accession f -> Accession t -- | nucleotide sequence data Nucleotide Nucleotide :: Nucleotide -- | protein sequence data Protein Protein :: Protein -- | Tag as being a clan. data Clan Clan :: Clan -- | Tag as being a Pfam model. data Pfam Pfam :: Pfam -- | Tag as being an Rfam model. Used for Stockholm and CM files. data Rfam Rfam :: Rfam -- | Species have an accession number, too. data Species Species :: Species -- | Guess the type of accession number. Returns Nothing if -- unknown structure. guessAccessionType :: Accession t -> Maybe Text instance forall k (t :: k). GHC.Generics.Generic (Biobase.Types.Accession.Accession t) instance forall k (t :: k). GHC.Show.Show (Biobase.Types.Accession.Accession t) instance forall k (t :: k). GHC.Read.Read (Biobase.Types.Accession.Accession t) instance forall k (t :: k). GHC.Classes.Ord (Biobase.Types.Accession.Accession t) instance forall k (t :: k). GHC.Classes.Eq (Biobase.Types.Accession.Accession t) instance forall k (t :: k). Data.String.IsString (Biobase.Types.Accession.Accession t) instance forall k (t :: k). Data.Binary.Class.Binary (Biobase.Types.Accession.Accession t) instance forall k (t :: k). Data.Aeson.Types.FromJSON.FromJSON (Biobase.Types.Accession.Accession t) instance forall k (t :: k). Data.Hashable.Class.Hashable (Biobase.Types.Accession.Accession t) instance forall k (t :: k). Data.Serialize.Serialize (Biobase.Types.Accession.Accession t) instance forall k (t :: k). Data.Aeson.Types.ToJSON.ToJSON (Biobase.Types.Accession.Accession t) instance forall k (t :: k). Control.DeepSeq.NFData (Biobase.Types.Accession.Accession t) -- | Bit scores as used by different algorithms in bioinformatics, -- linguistics, and probably elsewhere. -- -- Basically, the base-2 logarithm of the probability of the input given -- the model vs the probability of the input given the null model. -- --
--   S = log_2 (P(seq|model) / P(seq|null))
--   
module Biobase.Types.Bitscore -- | Bit score; behaves like a double (deriving Num). In particular, the -- algebraic operations behave as expected Bitscore a + Bitscore b == -- Bitscore (a+b). -- -- Currently geared towards use as in Infernal and -- HMMER. -- -- Infernal users guide, p.42: log-odds score in log_2 (aka bits). newtype Bitscore Bitscore :: Double -> Bitscore [getBitscore] :: Bitscore -> Double -- | Given a null model and a probability, calculate the corresponding -- BitScore. -- -- TODO x<=epsilon ? prob2Score :: Double -> Double -> Bitscore -- | Given a null model and a BitScore return the corresponding -- probability. score2Prob :: Double -> Bitscore -> Double instance Data.Vector.Unboxed.Base.Unbox Biobase.Types.Bitscore.Bitscore instance Data.Vector.Generic.Mutable.Base.MVector Data.Vector.Unboxed.Base.MVector Biobase.Types.Bitscore.Bitscore instance Data.Vector.Generic.Base.Vector Data.Vector.Unboxed.Base.Vector Biobase.Types.Bitscore.Bitscore instance Data.Default.Class.Default Biobase.Types.Bitscore.Bitscore instance GHC.Generics.Generic Biobase.Types.Bitscore.Bitscore instance GHC.Real.Fractional Biobase.Types.Bitscore.Bitscore instance GHC.Num.Num Biobase.Types.Bitscore.Bitscore instance GHC.Show.Show Biobase.Types.Bitscore.Bitscore instance GHC.Read.Read Biobase.Types.Bitscore.Bitscore instance GHC.Classes.Ord Biobase.Types.Bitscore.Bitscore instance GHC.Classes.Eq Biobase.Types.Bitscore.Bitscore instance Numeric.Limits.NumericLimits Biobase.Types.Bitscore.Bitscore instance Data.Semiring.Semiring Biobase.Types.Bitscore.Bitscore instance Data.Binary.Class.Binary Biobase.Types.Bitscore.Bitscore instance Data.Aeson.Types.FromJSON.FromJSON Biobase.Types.Bitscore.Bitscore instance Data.Hashable.Class.Hashable Biobase.Types.Bitscore.Bitscore instance Data.Serialize.Serialize Biobase.Types.Bitscore.Bitscore instance Data.Aeson.Types.ToJSON.ToJSON Biobase.Types.Bitscore.Bitscore instance Control.DeepSeq.NFData Biobase.Types.Bitscore.Bitscore module Biobase.Types.Codon -- | A single codon. -- -- TODO needs to go into its own place data Codon c Codon :: !c -> !c -> !c -> Codon c instance Data.Traversable.Traversable Biobase.Types.Codon.Codon instance Data.Foldable.Foldable Biobase.Types.Codon.Codon instance GHC.Base.Functor Biobase.Types.Codon.Codon instance GHC.Generics.Generic (Biobase.Types.Codon.Codon c) instance GHC.Show.Show c => GHC.Show.Show (Biobase.Types.Codon.Codon c) instance GHC.Read.Read c => GHC.Read.Read (Biobase.Types.Codon.Codon c) instance GHC.Classes.Ord c => GHC.Classes.Ord (Biobase.Types.Codon.Codon c) instance GHC.Classes.Eq c => GHC.Classes.Eq (Biobase.Types.Codon.Codon c) instance Control.Lens.Tuple.Field1 (Biobase.Types.Codon.Codon c) (Biobase.Types.Codon.Codon c) c c instance Control.Lens.Tuple.Field2 (Biobase.Types.Codon.Codon c) (Biobase.Types.Codon.Codon c) c c instance Control.Lens.Tuple.Field3 (Biobase.Types.Codon.Codon c) (Biobase.Types.Codon.Codon c) c c instance Control.Lens.Each.Each (Biobase.Types.Codon.Codon c) (Biobase.Types.Codon.Codon c') c c' -- | Different types of energies and conversion between. -- -- TODO enthalpy TODO entropy module Biobase.Types.Energy -- | Gibbs free energy change. -- -- For RNA structure, the change in energy from the unfolded structure to -- the given structure. -- -- In units of kcal / mol. -- -- TODO shall we phantom-type the actual units? newtype DG DG :: Double -> DG [dG] :: DG -> Double -- | Discretized DG. newtype DDG DDG :: Discretized (1 :% 100) -> DDG [dDG] :: DDG -> Discretized (1 :% 100) instance Data.Vector.Unboxed.Base.Unbox Biobase.Types.Energy.DDG instance Data.Vector.Generic.Mutable.Base.MVector Data.Vector.Unboxed.Base.MVector Biobase.Types.Energy.DDG instance Data.Vector.Generic.Base.Vector Data.Vector.Unboxed.Base.Vector Biobase.Types.Energy.DDG instance GHC.Enum.Enum Biobase.Types.Energy.DDG instance GHC.Real.Real Biobase.Types.Energy.DDG instance GHC.Generics.Generic Biobase.Types.Energy.DDG instance GHC.Show.Show Biobase.Types.Energy.DDG instance GHC.Read.Read Biobase.Types.Energy.DDG instance GHC.Num.Num Biobase.Types.Energy.DDG instance GHC.Classes.Ord Biobase.Types.Energy.DDG instance GHC.Classes.Eq Biobase.Types.Energy.DDG instance Numeric.Limits.NumericLimits Biobase.Types.Energy.DG instance Numeric.Limits.NumericEpsilon Biobase.Types.Energy.DG instance Data.Vector.Unboxed.Base.Unbox Biobase.Types.Energy.DG instance Data.Vector.Generic.Mutable.Base.MVector Data.Vector.Unboxed.Base.MVector Biobase.Types.Energy.DG instance Data.Vector.Generic.Base.Vector Data.Vector.Unboxed.Base.Vector Biobase.Types.Energy.DG instance Data.Hashable.Class.Hashable Biobase.Types.Energy.DG instance Data.Binary.Class.Binary Biobase.Types.Energy.DG instance Data.Serialize.Serialize Biobase.Types.Energy.DG instance Data.Aeson.Types.FromJSON.FromJSON Biobase.Types.Energy.DG instance Data.Aeson.Types.ToJSON.ToJSON Biobase.Types.Energy.DG instance Control.DeepSeq.NFData Biobase.Types.Energy.DG instance Data.Default.Class.Default Biobase.Types.Energy.DG instance Data.Data.Data Biobase.Types.Energy.DG instance GHC.Generics.Generic Biobase.Types.Energy.DG instance GHC.Show.Show Biobase.Types.Energy.DG instance GHC.Read.Read Biobase.Types.Energy.DG instance GHC.Real.Fractional Biobase.Types.Energy.DG instance GHC.Num.Num Biobase.Types.Energy.DG instance GHC.Classes.Ord Biobase.Types.Energy.DG instance GHC.Classes.Eq Biobase.Types.Energy.DG -- | Encode the number of hits to expect. This is typically dependent on -- some "database size". Evalues are bounded by [0,infinity). -- -- TODO Evalues close to zero are more interesting. We should strongly -- consider log-conversion here. module Biobase.Types.Evalue -- | Type-safe wrapper for e-values. newtype Evalue Evalue :: Double -> Evalue [getEvalue] :: Evalue -> Double instance Data.Vector.Unboxed.Base.Unbox Biobase.Types.Evalue.Evalue instance Data.Vector.Generic.Mutable.Base.MVector Data.Vector.Unboxed.Base.MVector Biobase.Types.Evalue.Evalue instance Data.Vector.Generic.Base.Vector Data.Vector.Unboxed.Base.Vector Biobase.Types.Evalue.Evalue instance Data.Default.Class.Default Biobase.Types.Evalue.Evalue instance Numeric.Limits.NumericLimits Biobase.Types.Evalue.Evalue instance (Biobase.Types.Evalue.Evalue Data.Type.Equality.~ t) => Control.Lens.Wrapped.Rewrapped Biobase.Types.Evalue.Evalue t instance Control.Lens.Wrapped.Wrapped Biobase.Types.Evalue.Evalue instance Data.Binary.Class.Binary Biobase.Types.Evalue.Evalue instance Data.Aeson.Types.FromJSON.FromJSON Biobase.Types.Evalue.Evalue instance Data.Hashable.Class.Hashable Biobase.Types.Evalue.Evalue instance Data.Serialize.Serialize Biobase.Types.Evalue.Evalue instance Data.Aeson.Types.ToJSON.ToJSON Biobase.Types.Evalue.Evalue instance Control.DeepSeq.NFData Biobase.Types.Evalue.Evalue instance GHC.Generics.Generic Biobase.Types.Evalue.Evalue instance GHC.Num.Num Biobase.Types.Evalue.Evalue instance GHC.Show.Show Biobase.Types.Evalue.Evalue instance GHC.Read.Read Biobase.Types.Evalue.Evalue instance GHC.Classes.Ord Biobase.Types.Evalue.Evalue instance GHC.Classes.Eq Biobase.Types.Evalue.Evalue module Biobase.Types.Index.Type -- | A linear Int-based index type. newtype Index (t :: Nat) Index :: Int -> Index [getIndex] :: Index -> Int -- | Turn an Int into an Index safely. index :: forall t. KnownNat t => Int -> Index t -- | Produce Just and Index or Nothing. maybeIndex :: forall t. KnownNat t => Int -> Maybe (Index t) instance Data.Vector.Unboxed.Base.Unbox (Biobase.Types.Index.Type.Index t) instance Data.Vector.Generic.Mutable.Base.MVector Data.Vector.Unboxed.Base.MVector (Biobase.Types.Index.Type.Index t) instance Data.Vector.Generic.Base.Vector Data.Vector.Unboxed.Base.Vector (Biobase.Types.Index.Type.Index t) instance GHC.TypeNats.KnownNat t => Data.PrimitiveArray.Index.Class.Index (Biobase.Types.Index.Type.Index t) instance (GHC.TypeNats.KnownNat t, Data.PrimitiveArray.Index.Class.IndexStream z) => Data.PrimitiveArray.Index.Class.IndexStream (z Data.PrimitiveArray.Index.Class.:. Biobase.Types.Index.Type.Index t) instance GHC.TypeNats.KnownNat t => Data.PrimitiveArray.Index.Class.IndexStream (Biobase.Types.Index.Type.Index t) instance Test.QuickCheck.Arbitrary.Arbitrary (Biobase.Types.Index.Type.Index t) instance GHC.TypeNats.KnownNat t => Data.Data.Data (Biobase.Types.Index.Type.Index t) instance GHC.Arr.Ix (Biobase.Types.Index.Type.Index t) instance GHC.Generics.Generic (Biobase.Types.Index.Type.Index t) instance GHC.Classes.Ord (Biobase.Types.Index.Type.Index t) instance GHC.Classes.Eq (Biobase.Types.Index.Type.Index t) instance GHC.Read.Read (Biobase.Types.Index.Type.Index t) instance GHC.Show.Show (Biobase.Types.Index.Type.Index t) instance GHC.TypeNats.KnownNat t => GHC.Num.Num (Biobase.Types.Index.Type.Index t) instance Control.DeepSeq.NFData (Biobase.Types.Index.Type.Index t) instance Data.Binary.Class.Binary (Biobase.Types.Index.Type.Index t) instance Data.Serialize.Serialize (Biobase.Types.Index.Type.Index t) instance Data.Aeson.Types.ToJSON.ToJSON (Biobase.Types.Index.Type.Index t) instance Data.Aeson.Types.FromJSON.FromJSON (Biobase.Types.Index.Type.Index t) instance Data.Hashable.Class.Hashable (Biobase.Types.Index.Type.Index t) -- | Biological sequence data is oftentimes indexed either 0- or -- 1-based. The Index type developed provides static -- guarantees that there is no confusion what index is in use. -- -- This module does not export the ctor Index. If you want to -- (unsafely) use it, import Biobase.Types.Index.Type directly. -- Use fromInt0 to make clear that you count from 0 and -- transform to an Index t. I.e. fromInt0 0 :: Index 1 -- yields the lowest 1-base index. -- -- Note that internally, every lowest index starts at 0 :: Int. module Biobase.Types.Index -- | One-based indices. type I1 = Index 1 -- | Zero-based indices. type I0 = Index 0 -- | Uses index to guarantee that the Index is ok. checkIndex :: forall t. KnownNat t => Index t -> Index t -- | Re-Index an index of type Index n as Index m. This -- is always safe, as 0 :: Index 0 gives 1 :: Index 1 -- for example. I.e. valid indices become valid indices. reIndex :: forall n m. (KnownNat n, KnownNat m) => Index n -> Index m -- | Helper function that allows addition of an Index and -- an Int, with the Int on the right. (+.) :: forall t. KnownNat t => Index t -> Int -> Index t -- | Helper function that allows subtraction of an Index -- and an Int, with the Int on the right. (-.) :: forall t. KnownNat t => Index t -> Int -> Index t -- | Unsafe plus. unsafePlus :: forall t. KnownNat t => Index t -> Int -> Index t -- | Delta between two Index points. delta :: forall t. KnownNat t => Index t -> Index t -> Int toInt :: forall t. KnownNat t => Index t -> Int -- | Return the index as an Int-style index that is zero-based. toInt0 :: forall t. KnownNat t => Index t -> Int -- | As an index from an Int-style zero-based one. -- -- TODO We might want to check that the argument is [0..]. fromInt0 :: forall t. KnownNat t => Int -> Index t getIndex :: Index t -> Int -- | Turn an Int into an Index safely. index :: forall t. KnownNat t => Int -> Index t -- | Produce Just and Index or Nothing. maybeIndex :: forall t. KnownNat t => Int -> Maybe (Index t) -- | A linear Int-based index type. data Index (t :: Nat) module Biobase.Types.Names.Internal speciesNameBimap :: IORef (Bimap (HashMap Text Int) (Vector Text)) -- | Add Text and return Int key. Will return key for -- existing string and thereby serves for lookup in left-to-right -- direction. speciesNameBimapAdd :: Text -> Int -- | Lookup the InternedMultiChar based on an Int key. -- Unsafe totality assumption. speciesNameBimapLookupInt :: Int -> Text -- | Names for biological things. -- -- Species names are internalized and represented as an Int. -- This allows using them in structures like an IntMap. -- -- For other names, we newtype-wrap normal text internalization. module Biobase.Types.Names -- | A species name. Represented with an Int, but behaves like a -- Text. newtype SpeciesName SpeciesName :: Int -> SpeciesName [getSpeciesNameRep] :: SpeciesName -> Int -- | Smart constructor that performs the correct internalization. speciesName :: Text -> SpeciesName -- | The taxonomic rank. This encodes the name for a given rank. newtype TaxonomicRank TaxonomicRank :: InternedText -> TaxonomicRank [getTaxonomicRank] :: TaxonomicRank -> InternedText instance GHC.Generics.Generic Biobase.Types.Names.TaxonomicRank instance GHC.Show.Show Biobase.Types.Names.TaxonomicRank instance GHC.Classes.Ord Biobase.Types.Names.TaxonomicRank instance GHC.Classes.Eq Biobase.Types.Names.TaxonomicRank instance Data.String.IsString Biobase.Types.Names.TaxonomicRank instance Control.DeepSeq.NFData Biobase.Types.Names.TaxonomicRank instance Data.String.Conversions.ConvertibleStrings Data.Text.Internal.Text Biobase.Types.Names.TaxonomicRank instance Data.String.Conversions.ConvertibleStrings Biobase.Types.Names.TaxonomicRank Data.Text.Internal.Text instance Data.Hashable.Class.Hashable Biobase.Types.Names.TaxonomicRank instance GHC.Read.Read Biobase.Types.Names.TaxonomicRank instance Data.Binary.Class.Binary Biobase.Types.Names.TaxonomicRank instance Data.Serialize.Serialize Biobase.Types.Names.TaxonomicRank instance Data.Aeson.Types.FromJSON.FromJSON Biobase.Types.Names.TaxonomicRank instance Data.Aeson.Types.ToJSON.ToJSON Biobase.Types.Names.TaxonomicRank instance Data.Vector.Unboxed.Base.Unbox Biobase.Types.Names.SpeciesName instance Data.Vector.Generic.Mutable.Base.MVector Data.Vector.Unboxed.Base.MVector Biobase.Types.Names.SpeciesName instance Data.Vector.Generic.Base.Vector Data.Vector.Unboxed.Base.Vector Biobase.Types.Names.SpeciesName instance GHC.Classes.Ord Biobase.Types.Names.SpeciesName instance Data.String.IsString Biobase.Types.Names.SpeciesName instance GHC.Show.Show Biobase.Types.Names.SpeciesName instance GHC.Read.Read Biobase.Types.Names.SpeciesName instance Data.Hashable.Class.Hashable Biobase.Types.Names.SpeciesName instance Data.String.Conversions.ConvertibleStrings Data.Text.Internal.Text Biobase.Types.Names.SpeciesName instance Data.String.Conversions.ConvertibleStrings Biobase.Types.Names.SpeciesName Data.Text.Internal.Text instance Control.DeepSeq.NFData Biobase.Types.Names.SpeciesName instance Data.Binary.Class.Binary Biobase.Types.Names.SpeciesName instance Data.Serialize.Serialize Biobase.Types.Names.SpeciesName instance Data.Aeson.Types.FromJSON.FromJSON Biobase.Types.Names.SpeciesName instance Data.Aeson.Types.ToJSON.ToJSON Biobase.Types.Names.SpeciesName instance GHC.Generics.Generic Biobase.Types.Names.SpeciesName instance GHC.Classes.Eq Biobase.Types.Names.SpeciesName -- | Strand information. A newtyped version, complete with serialization, -- pattern synonyms, being a PrimitiveArray index type, etc. -- -- TODO will be expanded to encode biological sense information more -- clearly: -- http://en.wikipedia.org/wiki/Sense_%28molecular_biology%29. module Biobase.Types.Strand -- | Encode strand information. PlusStrand is defined as the strand -- encoded in, say, the FASTA file. MinusStrand hence is the -- reverse complement. newtype Strand Strand :: Int -> Strand [getStrand] :: Strand -> Int pattern PlusStrand :: () => () => Strand pattern MinusStrand :: () => () => Strand instance Data.Vector.Unboxed.Base.Unbox Biobase.Types.Strand.Strand instance Data.Vector.Generic.Mutable.Base.MVector Data.Vector.Unboxed.Base.MVector Biobase.Types.Strand.Strand instance Data.Vector.Generic.Base.Vector Data.Vector.Unboxed.Base.Vector Biobase.Types.Strand.Strand instance Data.PrimitiveArray.Index.Class.Index Biobase.Types.Strand.Strand instance Data.PrimitiveArray.Index.Class.IndexStream z => Data.PrimitiveArray.Index.Class.IndexStream (z Data.PrimitiveArray.Index.Class.:. Biobase.Types.Strand.Strand) instance Data.PrimitiveArray.Index.Class.IndexStream Biobase.Types.Strand.Strand instance Test.QuickCheck.Arbitrary.Arbitrary Biobase.Types.Strand.Strand instance Data.Data.Data Biobase.Types.Strand.Strand instance GHC.Generics.Generic Biobase.Types.Strand.Strand instance GHC.Classes.Ord Biobase.Types.Strand.Strand instance GHC.Classes.Eq Biobase.Types.Strand.Strand instance GHC.Show.Show Biobase.Types.Strand.Strand instance GHC.Read.Read Biobase.Types.Strand.Strand instance GHC.Enum.Bounded Biobase.Types.Strand.Strand instance GHC.Enum.Enum Biobase.Types.Strand.Strand instance Control.Lens.Internal.Iso.Reversing Biobase.Types.Strand.Strand instance Data.Binary.Class.Binary Biobase.Types.Strand.Strand instance Data.Serialize.Serialize Biobase.Types.Strand.Strand instance Data.Aeson.Types.ToJSON.ToJSON Biobase.Types.Strand.Strand instance Data.Aeson.Types.FromJSON.FromJSON Biobase.Types.Strand.Strand instance Data.Hashable.Class.Hashable Biobase.Types.Strand.Strand instance Control.DeepSeq.NFData Biobase.Types.Strand.Strand -- | Stranded reading frames. module Biobase.Types.ReadingFrame -- | The Reading frame. Sequence indexing starts at position 1, which -- starts reading frame 1. Reading frame 2 and 3 start at position 2 and -- 3 respectively. newtype ReadingFrame ReadingFrame :: Int -> ReadingFrame [getReadingFrame] :: ReadingFrame -> Int -- | Convert between +1 ... +3 and ReadingFrame. rf :: Prism' Int ReadingFrame -- | A lens for the strand strandRF :: Lens' ReadingFrame Strand -- | TODO should this be a type class, since we might reasonably want to -- construct from a number of possible indices? fromIndex :: Index 1 -> ReadingFrame instance (Biobase.Types.ReadingFrame.ReadingFrame Data.Type.Equality.~ t) => Control.Lens.Wrapped.Rewrapped Biobase.Types.ReadingFrame.ReadingFrame t instance Control.Lens.Wrapped.Wrapped Biobase.Types.ReadingFrame.ReadingFrame instance GHC.Enum.Enum Biobase.Types.ReadingFrame.ReadingFrame instance GHC.Show.Show Biobase.Types.ReadingFrame.ReadingFrame instance GHC.Generics.Generic Biobase.Types.ReadingFrame.ReadingFrame instance GHC.Classes.Ord Biobase.Types.ReadingFrame.ReadingFrame instance GHC.Classes.Eq Biobase.Types.ReadingFrame.ReadingFrame -- | Abstraction over bio sequences encoded as one-ascii character as one -- symbol. We phantom-type the exact bio-sequence type and provide type -- classes that act on known types. -- -- Unknown bio sequences should be tagged with Void. module Biobase.Types.BioSequence newtype SequenceIdentifier (which :: k) SequenceIdentifier :: ByteString -> SequenceIdentifier [_sequenceIdentifier] :: SequenceIdentifier -> ByteString _SequenceIdentifier :: forall which_aPMa which_aQ5P. Iso (SequenceIdentifier which_aQ5P) (SequenceIdentifier which_aPMa) ByteString ByteString data RNA data DNA data XNA data AA newtype BioSequence (which :: k) BioSequence :: ByteString -> BioSequence [_bioSequence] :: BioSequence -> ByteString _BioSequence :: forall which_aQ61 which_aQuN. Iso (BioSequence which_aQuN) (BioSequence which_aQ61) ByteString ByteString mkRNAseq :: ByteString -> BioSequence RNA mkDNAseq :: ByteString -> BioSequence DNA mkXNAseq :: ByteString -> BioSequence XNA mkAAseq :: ByteString -> BioSequence AA -- | Phantom-typed over two types, the type w of the identifier, -- which can be descriptive (FirstInput) and the second type, -- identifying what kind of sequence types we are dealing with. Finally, -- the third type fixes the index type of the infix. data BioSequenceWindow w ty k BioSequenceWindow :: !SequenceIdentifier w -> !BioSequence ty -> !BioSequence ty -> !BioSequence ty -> !Strand -> !Index k -> BioSequenceWindow w ty k -- | Identifier for this window. Typically some fasta identifier [_bswIdentifier] :: BioSequenceWindow w ty k -> !SequenceIdentifier w -- | Any prefix for this sequence [_bswPrefix] :: BioSequenceWindow w ty k -> !BioSequence ty -- | The actual sequence, the infix [_bswSequence] :: BioSequenceWindow w ty k -> !BioSequence ty -- | any suffix [_bswSuffix] :: BioSequenceWindow w ty k -> !BioSequence ty -- | strand information. Probably + but arbitrary [_bswStrand] :: BioSequenceWindow w ty k -> !Strand -- | Provide the index for the left-most character of the -- bswSequence on + on - as well, but to be -- interpreted on the + strand. TODO this actually needs a more -- complicated encoding...! [_bswIndex] :: BioSequenceWindow w ty k -> !Index k bswSuffix :: forall w_aQv3 ty_aQv4 k_aQv5. Lens' (BioSequenceWindow w_aQv3 ty_aQv4 k_aQv5) (BioSequence ty_aQv4) bswStrand :: forall w_aQv3 ty_aQv4 k_aQv5. Lens' (BioSequenceWindow w_aQv3 ty_aQv4 k_aQv5) Strand bswSequence :: forall w_aQv3 ty_aQv4 k_aQv5. Lens' (BioSequenceWindow w_aQv3 ty_aQv4 k_aQv5) (BioSequence ty_aQv4) bswPrefix :: forall w_aQv3 ty_aQv4 k_aQv5. Lens' (BioSequenceWindow w_aQv3 ty_aQv4 k_aQv5) (BioSequence ty_aQv4) bswIndex :: forall w_aQv3 ty_aQv4 k_aQv5 k_aRb1. Lens (BioSequenceWindow w_aQv3 ty_aQv4 k_aQv5) (BioSequenceWindow w_aQv3 ty_aQv4 k_aRb1) (Index k_aQv5) (Index k_aRb1) bswIdentifier :: forall w_aQv3 ty_aQv4 k_aQv5 w_aRb0. Lens (BioSequenceWindow w_aQv3 ty_aQv4 k_aQv5) (BioSequenceWindow w_aRb0 ty_aQv4 k_aQv5) (SequenceIdentifier w_aQv3) (SequenceIdentifier w_aRb0) -- | A lens into the full sequence information of a sequence window. One -- should *NOT* modify the length of the individual sequences. bswFullSequence :: Lens' (BioSequenceWindow w ty k) (BioSequence ty) -- | Simple case translation from U to T. with upper and -- lower-case awareness. rna2dna :: Char -> Char -- | Single character RNA complement. rnaComplement :: Char -> Char -- | Simple case translation from T to U with upper- and -- lower-case awareness. dna2rna :: Char -> Char -- | Single character DNA complement. dnaComplement :: Char -> Char -- | Transcribes a DNA sequence into an RNA sequence. Note that -- transcribe is actually very generic. We just define its -- semantics to be that of biomolecular transcription. -- -- transcribe makes the assumption that, given DNA -> -- RNA, we transcribe the coding strand. -- http://hyperphysics.phy-astr.gsu.edu/hbase/Organic/transcription.html -- -- @ DNAseq ACGT ^. transcribe == RNAseq ACGU RNAseq -- ACGU ^. transcribe == DNAseq ACGT RNAseq ACGU ^. -- from transcribe :: DNAseq == DNAseq ACGT @ class Transcribe f where { type family TranscribeTo f :: *; } transcribe :: Transcribe f => Iso' f (TranscribeTo f) -- | The complement of a biosequence. class Complement f complement :: Complement f => Iso' f f instance Biobase.Types.BioSequence.Complement (Biobase.Types.BioSequence.BioSequence Biobase.Types.BioSequence.DNA) instance Biobase.Types.BioSequence.Complement (Biobase.Types.BioSequence.BioSequence Biobase.Types.BioSequence.RNA) instance Biobase.Types.BioSequence.Transcribe (Biobase.Types.BioSequence.BioSequence Biobase.Types.BioSequence.DNA) instance Biobase.Types.BioSequence.Transcribe (Biobase.Types.BioSequence.BioSequence Biobase.Types.BioSequence.RNA) instance forall k1 k2 (w :: k2) (ty :: k1) (k3 :: GHC.Types.Nat). Control.Lens.Internal.Iso.Reversing (Biobase.Types.BioSequence.BioSequenceWindow w ty k3) instance forall k1 (w :: k1) k2 (ty :: k2) (k3 :: GHC.Types.Nat). GHC.Show.Show (Biobase.Types.BioSequence.BioSequenceWindow w ty k3) instance forall k1 (w :: k1) k2 (ty :: k2) (k3 :: GHC.Types.Nat). GHC.Read.Read (Biobase.Types.BioSequence.BioSequenceWindow w ty k3) instance forall k1 (w :: k1) k2 (ty :: k2) (k3 :: GHC.Types.Nat). GHC.Classes.Ord (Biobase.Types.BioSequence.BioSequenceWindow w ty k3) instance forall k1 (w :: k1) k2 (ty :: k2) (k3 :: GHC.Types.Nat). GHC.Classes.Eq (Biobase.Types.BioSequence.BioSequenceWindow w ty k3) instance forall k1 (w :: k1) k2 (ty :: k2) (k3 :: GHC.Types.Nat). GHC.Generics.Generic (Biobase.Types.BioSequence.BioSequenceWindow w ty k3) instance forall k1 (w :: k1) k2 (ty :: k2) (k3 :: GHC.Types.Nat). (Data.Typeable.Internal.Typeable w, Data.Typeable.Internal.Typeable ty, Data.Typeable.Internal.Typeable k1, Data.Typeable.Internal.Typeable k2, GHC.TypeNats.KnownNat k3) => Data.Data.Data (Biobase.Types.BioSequence.BioSequenceWindow w ty k3) instance forall k (w :: k). Control.Lens.Internal.Iso.Reversing (Biobase.Types.BioSequence.BioSequence w) instance forall k (w :: k). Control.DeepSeq.NFData (Biobase.Types.BioSequence.BioSequence w) instance forall k (w :: k). Control.Lens.At.Ixed (Biobase.Types.BioSequence.BioSequence w) instance Data.String.IsString (Biobase.Types.BioSequence.BioSequence Data.Void.Void) instance Data.String.IsString (Biobase.Types.BioSequence.BioSequence Biobase.Types.BioSequence.RNA) instance Test.QuickCheck.Arbitrary.Arbitrary (Biobase.Types.BioSequence.BioSequence Biobase.Types.BioSequence.RNA) instance Data.String.IsString (Biobase.Types.BioSequence.BioSequence Biobase.Types.BioSequence.DNA) instance Test.QuickCheck.Arbitrary.Arbitrary (Biobase.Types.BioSequence.BioSequence Biobase.Types.BioSequence.DNA) instance Data.String.IsString (Biobase.Types.BioSequence.BioSequence Biobase.Types.BioSequence.XNA) instance Test.QuickCheck.Arbitrary.Arbitrary (Biobase.Types.BioSequence.BioSequence Biobase.Types.BioSequence.XNA) instance Data.String.IsString (Biobase.Types.BioSequence.BioSequence Biobase.Types.BioSequence.AA) instance Test.QuickCheck.Arbitrary.Arbitrary (Biobase.Types.BioSequence.BioSequence Biobase.Types.BioSequence.AA) instance forall k1 k2 (which1 :: k2) t (which2 :: k1). (Biobase.Types.BioSequence.BioSequence which1 Data.Type.Equality.~ t) => Control.Lens.Wrapped.Rewrapped (Biobase.Types.BioSequence.BioSequence which2) t instance forall k (which :: k). Control.Lens.Wrapped.Wrapped (Biobase.Types.BioSequence.BioSequence which) instance forall k (which :: k). GHC.Base.Semigroup (Biobase.Types.BioSequence.BioSequence which) instance forall k (which :: k). GHC.Show.Show (Biobase.Types.BioSequence.BioSequence which) instance forall k (which :: k). GHC.Read.Read (Biobase.Types.BioSequence.BioSequence which) instance forall k (which :: k). GHC.Classes.Ord (Biobase.Types.BioSequence.BioSequence which) instance forall k (which :: k). GHC.Classes.Eq (Biobase.Types.BioSequence.BioSequence which) instance forall k (which :: k). GHC.Generics.Generic (Biobase.Types.BioSequence.BioSequence which) instance forall k (which :: k). (Data.Typeable.Internal.Typeable which, Data.Typeable.Internal.Typeable k) => Data.Data.Data (Biobase.Types.BioSequence.BioSequence which) instance forall k (w :: k). Control.DeepSeq.NFData (Biobase.Types.BioSequence.SequenceIdentifier w) instance forall k (w :: k). Data.String.IsString (Biobase.Types.BioSequence.SequenceIdentifier w) instance forall k1 k2 (which1 :: k2) t (which2 :: k1). (Biobase.Types.BioSequence.SequenceIdentifier which1 Data.Type.Equality.~ t) => Control.Lens.Wrapped.Rewrapped (Biobase.Types.BioSequence.SequenceIdentifier which2) t instance forall k (which :: k). Control.Lens.Wrapped.Wrapped (Biobase.Types.BioSequence.SequenceIdentifier which) instance forall k (which :: k). GHC.Show.Show (Biobase.Types.BioSequence.SequenceIdentifier which) instance forall k (which :: k). GHC.Read.Read (Biobase.Types.BioSequence.SequenceIdentifier which) instance forall k (which :: k). GHC.Classes.Ord (Biobase.Types.BioSequence.SequenceIdentifier which) instance forall k (which :: k). GHC.Classes.Eq (Biobase.Types.BioSequence.SequenceIdentifier which) instance forall k (which :: k). GHC.Generics.Generic (Biobase.Types.BioSequence.SequenceIdentifier which) instance forall k (which :: k). (Data.Typeable.Internal.Typeable which, Data.Typeable.Internal.Typeable k) => Data.Data.Data (Biobase.Types.BioSequence.SequenceIdentifier which) -- | Wrappers for structural data. Encoded as bytestrings. This differs -- from BiobaseXNA, where specialized encodings are used. These -- structures are supposedly "short", they need to fit into a strict -- bytestring. -- -- TODO Consider where to move each type. There are merge possibilities -- between BiobaseXNA and BiobaseTypes. -- -- TODO QuickCheck Arbitrary for RNAss. module Biobase.Types.Structure -- | Secondary structure using () for paired elements, and -- . for unpaired ones. It is assumed that the () match -- up. These structures from a Monoid. newtype RNAss RNAss :: ByteString -> RNAss [_rnass] :: RNAss -> ByteString rnass :: Iso' RNAss ByteString -- | Ensemble structure encoding. *Very* different type ctor name chosen! -- The structure of this string makes verification much more complicated. -- -- TODO describe encoding used by RNAfold for the ensemble string. newtype RNAensembleStructure RNAes :: ByteString -> RNAensembleStructure [_rnaes] :: RNAensembleStructure -> ByteString rnaes :: Iso' RNAensembleStructure ByteString -- | Cofolded structure. data RNAds RNAds :: !ByteString -> !ByteString -> RNAds [_rnadsL] :: RNAds -> !ByteString [_rnadsR] :: RNAds -> !ByteString rnadsR :: Lens' RNAds ByteString rnadsL :: Lens' RNAds ByteString -- | A Prism that turns ByteStrings with a single & into -- RNAds. rnads :: Prism' ByteString RNAds -- | Isomorphism from RNAds to (RNAss,RNAss). The -- RNAss are only legal if taken both: rnassFromDimer . -- both. rnads2rnassPair :: Iso' RNAds (RNAss, RNAss) -- | Try to create a dimeric structure. mkRNAds :: (Monad m, MonadError RNAStructureError m) => ByteString -> m RNAds -- | Capture what might be wrong with the RNAss. data RNAStructureError RNAStructureError :: String -> ByteString -> RNAStructureError [_rnaStructureError] :: RNAStructureError -> String [_rnaOffender] :: RNAStructureError -> ByteString -- | Verifies that the given RNAss is properly formatted. Otherwise, error -- out. -- -- TODO Implement! Check with BiobaseXNA and the stack effort in there. -- This might influence if the verification goes into BiobaseXNA and -- happens via an Iso'. verifyRNAss :: (Monad m, MonadError RNAStructureError m) => RNAss -> m RNAss -- | The set of nucleotide pairs, together with the sequence length. data RNApset RNApset :: !Set (Int, Int) -> !Int -> RNApset -- | the set of nucleotide pairs. [_rnapset] :: RNApset -> !Set (Int, Int) -- | length of the underlying nucleotide sequence. [_rnapsetSLen] :: RNApset -> !Int rnapsetSLen :: Lens' RNApset Int rnapset :: Lens' RNApset (Set (Int, Int)) -- | Transform an RNAss into a set of base pairs (i,j). The -- pairs are 0-based. rnassPairSet :: MonadError String m => RNAss -> m RNApset -- | Genereate a simple structured/paired forest from a secondary structure -- string. rnassSPForest :: MonadError String m => RNAss -> m (SPForest ByteString Char) -- | Compactify such an SPForest. This means that all stems are now -- represented by a single SPT data constructor. compactifySPForest :: SPForest ByteString Char -> SPForest ByteString ByteString -- | RNA pair set, but a transformation error calls error. rnassPairSet' :: RNAss -> RNApset rnapsetRNAss :: RNApset -> RNAss -- | Calculates the number of different base pairs between two structures. -- This ignores the length of the underlying sequences. pairDist :: RNApset -> RNApset -> Int instance Control.DeepSeq.NFData Biobase.Types.Structure.RNApset instance Test.QuickCheck.Arbitrary.Arbitrary Biobase.Types.Structure.RNApset instance Test.QuickCheck.Arbitrary.Arbitrary Biobase.Types.Structure.RNAss instance GHC.Generics.Generic Biobase.Types.Structure.RNApset instance GHC.Classes.Ord Biobase.Types.Structure.RNApset instance GHC.Classes.Eq Biobase.Types.Structure.RNApset instance GHC.Show.Show Biobase.Types.Structure.RNApset instance GHC.Read.Read Biobase.Types.Structure.RNApset instance GHC.Generics.Generic Biobase.Types.Structure.RNAStructureError instance GHC.Show.Show Biobase.Types.Structure.RNAStructureError instance Control.DeepSeq.NFData Biobase.Types.Structure.RNAStructureError instance Control.DeepSeq.NFData Biobase.Types.Structure.RNAds instance GHC.Generics.Generic Biobase.Types.Structure.RNAds instance Data.Data.Data Biobase.Types.Structure.RNAds instance GHC.Read.Read Biobase.Types.Structure.RNAds instance GHC.Show.Show Biobase.Types.Structure.RNAds instance GHC.Classes.Ord Biobase.Types.Structure.RNAds instance GHC.Classes.Eq Biobase.Types.Structure.RNAds instance Control.DeepSeq.NFData Biobase.Types.Structure.RNAensembleStructure instance GHC.Generics.Generic Biobase.Types.Structure.RNAensembleStructure instance Data.Data.Data Biobase.Types.Structure.RNAensembleStructure instance GHC.Read.Read Biobase.Types.Structure.RNAensembleStructure instance GHC.Show.Show Biobase.Types.Structure.RNAensembleStructure instance GHC.Classes.Ord Biobase.Types.Structure.RNAensembleStructure instance GHC.Classes.Eq Biobase.Types.Structure.RNAensembleStructure instance Control.DeepSeq.NFData Biobase.Types.Structure.RNAss instance GHC.Base.Monoid Biobase.Types.Structure.RNAss instance GHC.Base.Semigroup Biobase.Types.Structure.RNAss instance GHC.Generics.Generic Biobase.Types.Structure.RNAss instance Data.Data.Data Biobase.Types.Structure.RNAss instance GHC.Read.Read Biobase.Types.Structure.RNAss instance GHC.Show.Show Biobase.Types.Structure.RNAss instance GHC.Classes.Ord Biobase.Types.Structure.RNAss instance GHC.Classes.Eq Biobase.Types.Structure.RNAss -- | Shape abstractions of structures. -- -- Shapes do not preserve sizes of structures (say unpaired regions or -- stem length). As such, distance measures provided here are to be used -- carefully! -- -- TODO consider how to handle the different shape levels. One option -- would be to phantom-type everything. module Biobase.Types.Shape -- | Shape levels are hardcoded according to their specification. -- -- TODO Allow compile-time check on accepted shape levels? data ShapeLevel SL1 :: ShapeLevel SL2 :: ShapeLevel SL3 :: ShapeLevel SL4 :: ShapeLevel SL5 :: ShapeLevel -- | The type of RNA shapes. Keeps the type data RNAshape RNAshape :: !ShapeLevel -> !ByteString -> RNAshape -- | The type of shape encoded here. [_rnashapelevel] :: RNAshape -> !ShapeLevel -- | The actual shape as a string. [_rnashape] :: RNAshape -> !ByteString rnashapelevel :: Lens' RNAshape ShapeLevel rnashape :: Lens' RNAshape ByteString -- | Given a compactified SPForest, creates a shape forest of the -- given level. -- -- TODO needs newtyping shapeForest :: ShapeLevel -> SPForest ByteString ByteString -> SPForest Char Char rnass2shape :: ShapeLevel -> RNAss -> RNAshape -- | turn into unit test. also reverse of the input should give reverse -- shape! this then gives a quickcheck test, reversing the input should -- reverse the shape -- -- TODO requires generating secondary structures via Arbitrary. test :: ShapeLevel -> RNAshape shapeForestshape :: ShapeLevel -> SPForest Char Char -> RNAshape generateShape :: ShapeLevel -> RNAss -> RNAshape -- | Wrapper for string-positional shapes. Intentionally chosen long name. data RNAshapepset RNAshapepset :: ShapeLevel -> Set (Int, Int) -> RNAshapepset [_rnashapepsetlevel] :: RNAshapepset -> ShapeLevel [_rnashapepset] :: RNAshapepset -> Set (Int, Int) rnashapepsetlevel :: Lens' RNAshapepset ShapeLevel rnashapepset :: Lens' RNAshapepset (Set (Int, Int)) -- | Transform an RNAss into a set of base pairs (i,j). -- The pairs are 0-based. rnashapePairSet :: MonadError String m => RNAshape -> m RNAshapepset -- | RNA pair set, but a transformation error calls error. rnassPairSet' :: RNAshape -> RNAshapepset -- | Calculates the number of different base pairs betwwen two structures. -- -- TODO error out on different shape levels shapePairDist :: RNAshapepset -> RNAshapepset -> Int instance Control.DeepSeq.NFData Biobase.Types.Shape.RNAshapepset instance GHC.Generics.Generic Biobase.Types.Shape.RNAshapepset instance GHC.Classes.Ord Biobase.Types.Shape.RNAshapepset instance GHC.Classes.Eq Biobase.Types.Shape.RNAshapepset instance GHC.Show.Show Biobase.Types.Shape.RNAshapepset instance GHC.Read.Read Biobase.Types.Shape.RNAshapepset instance Control.DeepSeq.NFData Biobase.Types.Shape.RNAshape instance GHC.Generics.Generic Biobase.Types.Shape.RNAshape instance Data.Data.Data Biobase.Types.Shape.RNAshape instance GHC.Read.Read Biobase.Types.Shape.RNAshape instance GHC.Show.Show Biobase.Types.Shape.RNAshape instance GHC.Classes.Ord Biobase.Types.Shape.RNAshape instance GHC.Classes.Eq Biobase.Types.Shape.RNAshape instance GHC.Generics.Generic Biobase.Types.Shape.ShapeLevel instance Data.Data.Data Biobase.Types.Shape.ShapeLevel instance GHC.Read.Read Biobase.Types.Shape.ShapeLevel instance GHC.Show.Show Biobase.Types.Shape.ShapeLevel instance GHC.Classes.Ord Biobase.Types.Shape.ShapeLevel instance GHC.Classes.Eq Biobase.Types.Shape.ShapeLevel instance Control.DeepSeq.NFData Biobase.Types.Shape.ShapeLevel -- | Biological classification of species. module Biobase.Types.Taxonomy -- | Taxonomic classification. Enum together with a final -- Unknown is somewhat fishy. -- -- TODO What should the order be? Kingdom > Species or Kingdom < -- Species? data Classification Kingdom :: Classification Phylum :: Classification Class :: Classification Order :: Classification SubOrder :: Classification Family :: Classification Genus :: Classification Species :: Classification Unknown :: Classification -- | A somewhat generic representation of a species within a taxonomic -- context. data Taxon Taxon :: !SpeciesName -> !Accession Species -> !Vector (TaxonomicRank, Classification) -> Taxon -- | the full, formal name of a species [species] :: Taxon -> !SpeciesName -- | the accession for the species (or "" if unknown) [accession] :: Taxon -> !Accession Species -- | vector with classification information [classification] :: Taxon -> !Vector (TaxonomicRank, Classification) instance GHC.Generics.Generic Biobase.Types.Taxonomy.Taxon instance GHC.Show.Show Biobase.Types.Taxonomy.Taxon instance GHC.Read.Read Biobase.Types.Taxonomy.Taxon instance GHC.Classes.Eq Biobase.Types.Taxonomy.Taxon instance Data.Binary.Class.Binary Biobase.Types.Taxonomy.Taxon instance Data.Aeson.Types.FromJSON.FromJSON Biobase.Types.Taxonomy.Taxon instance Data.Serialize.Serialize Biobase.Types.Taxonomy.Taxon instance Data.Aeson.Types.ToJSON.ToJSON Biobase.Types.Taxonomy.Taxon instance Control.DeepSeq.NFData Biobase.Types.Taxonomy.Taxon instance Data.Hashable.Class.Hashable Biobase.Types.Taxonomy.Taxon instance Data.Vector.Unboxed.Base.Unbox Biobase.Types.Taxonomy.Classification instance Data.Vector.Generic.Mutable.Base.MVector Data.Vector.Unboxed.Base.MVector Biobase.Types.Taxonomy.Classification instance Data.Vector.Generic.Base.Vector Data.Vector.Unboxed.Base.Vector Biobase.Types.Taxonomy.Classification instance GHC.Generics.Generic Biobase.Types.Taxonomy.Classification instance GHC.Enum.Enum Biobase.Types.Taxonomy.Classification instance GHC.Show.Show Biobase.Types.Taxonomy.Classification instance GHC.Read.Read Biobase.Types.Taxonomy.Classification instance GHC.Classes.Ord Biobase.Types.Taxonomy.Classification instance GHC.Classes.Eq Biobase.Types.Taxonomy.Classification instance Data.Binary.Class.Binary Biobase.Types.Taxonomy.Classification instance Data.Aeson.Types.FromJSON.FromJSON Biobase.Types.Taxonomy.Classification instance Data.Hashable.Class.Hashable Biobase.Types.Taxonomy.Classification instance Data.Serialize.Serialize Biobase.Types.Taxonomy.Classification instance Data.Aeson.Types.ToJSON.ToJSON Biobase.Types.Taxonomy.Classification instance Control.DeepSeq.NFData Biobase.Types.Taxonomy.Classification module DP.Backtraced.BioSequence -- | The Backtraced column structure is for codon-based alignments, -- including special cases. module DP.Backtraced.Codon -- | A single Backtraced column. Since such a column will be part -- of a Backtraced (Z:.BtCodon c aa:. ...) structure, it is -- always possible to extend even further, by having more entries. data BtCodon c aa -- | A canonical match. A codon and the translated amino acid need to be -- set. Match :: !Codon c -> !aa -> BtCodon c aa [_codon] :: BtCodon c aa -> !Codon c [_aa] :: BtCodon c aa -> !aa -- | A frameshifting match. The vector of frameshifted nucleotides will -- have a number of characters c, that encode for a single amino -- acid. Frameshift :: !Vector c -> !aa -> BtCodon c aa [_frameshift] :: BtCodon c aa -> !Vector c [_aa] :: BtCodon c aa -> !aa Insert :: !Codon c -> !aa -> BtCodon c aa [_codon] :: BtCodon c aa -> !Codon c [_aa] :: BtCodon c aa -> !aa Shifted :: !Vector c -> !aa -> BtCodon c aa [_frameshift] :: BtCodon c aa -> !Vector c [_aa] :: BtCodon c aa -> !aa Region :: !Vector c -> !ByteString -> BtCodon c aa [_region] :: BtCodon c aa -> !Vector c [_annotation] :: BtCodon c aa -> !ByteString Delete :: BtCodon c aa