BiobaseTypes-0.2.0.1: Collection of types for bioinformatics

Safe HaskellNone
LanguageHaskell2010

Biobase.Types.Accession

Contents

Description

Accession numbers. These numbers are not really numbers because they they are made up of alphanumeric characters.

Synopsis

Accession with phantom types.

newtype Accession t Source #

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.

Constructors

Accession 

Fields

Instances
Eq (Accession t) Source # 
Instance details

Defined in Biobase.Types.Accession

Methods

(==) :: Accession t -> Accession t -> Bool #

(/=) :: Accession t -> Accession t -> Bool #

Ord (Accession t) Source # 
Instance details

Defined in Biobase.Types.Accession

Read (Accession t) Source # 
Instance details

Defined in Biobase.Types.Accession

Show (Accession t) Source # 
Instance details

Defined in Biobase.Types.Accession

IsString (Accession t) Source # 
Instance details

Defined in Biobase.Types.Accession

Methods

fromString :: String -> Accession t #

Generic (Accession t) Source # 
Instance details

Defined in Biobase.Types.Accession

Associated Types

type Rep (Accession t) :: Type -> Type #

Methods

from :: Accession t -> Rep (Accession t) x #

to :: Rep (Accession t) x -> Accession t #

NFData (Accession t) Source # 
Instance details

Defined in Biobase.Types.Accession

Methods

rnf :: Accession t -> () #

Hashable (Accession t) Source # 
Instance details

Defined in Biobase.Types.Accession

Methods

hashWithSalt :: Int -> Accession t -> Int #

hash :: Accession t -> Int #

ToJSON (Accession t) Source # 
Instance details

Defined in Biobase.Types.Accession

FromJSON (Accession t) Source # 
Instance details

Defined in Biobase.Types.Accession

Binary (Accession t) Source # 
Instance details

Defined in Biobase.Types.Accession

Methods

put :: Accession t -> Put #

get :: Get (Accession t) #

putList :: [Accession t] -> Put #

Serialize (Accession t) Source # 
Instance details

Defined in Biobase.Types.Accession

Methods

put :: Putter (Accession t) #

get :: Get (Accession t) #

type Rep (Accession t) Source # 
Instance details

Defined in Biobase.Types.Accession

type Rep (Accession t) = D1 (MetaData "Accession" "Biobase.Types.Accession" "BiobaseTypes-0.2.0.1-B9coIbijR6NEFcCxvqIOZp" True) (C1 (MetaCons "Accession" PrefixI True) (S1 (MetaSel (Just "_getAccession") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)))

accession' :: ConvertibleStrings s Text => t -> s -> Accession t Source #

Generate an accession with an explicit phantom type: accession' Nucleotide Bla has type :: Accession Nucleotide.

accession :: ConvertibleStrings s Text => s -> Accession t Source #

Generate an accession when the type Accession t is clear from the context.

retagAccession :: Accession f -> Accession t Source #

Retag an accession

Phantom types. All with an excliti data constructor to guide

NCBI phantom types

data Nucleotide Source #

nucleotide sequence

Constructors

Nucleotide 

data Protein Source #

protein sequence

Constructors

Protein 

Rfam phantom types

data Clan Source #

Tag as being a clan.

Constructors

Clan 

data Pfam Source #

Tag as being a Pfam model.

Constructors

Pfam 

data Rfam Source #

Tag as being an Rfam model. Used for Stockholm and CM files.

Constructors

Rfam 

data Species Source #

Species have an accession number, too.

Constructors

Species 

Helper functions

guessAccessionType :: Accession t -> Maybe Text Source #

Guess the type of accession number. Returns Nothing if unknown structure.