BiobaseTypes-0.1.2.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 # 

Methods

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

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

Ord (Accession t) Source # 
Read (Accession t) Source # 
Show (Accession t) Source # 
IsString (Accession t) Source # 

Methods

fromString :: String -> Accession t #

Generic (Accession t) Source # 

Associated Types

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

Methods

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

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

Hashable (Accession t) Source # 

Methods

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

hash :: Accession t -> Int #

ToJSON (Accession t) Source # 
FromJSON (Accession t) Source # 
Binary (Accession t) Source # 

Methods

put :: Accession t -> Put #

get :: Get (Accession t) #

putList :: [Accession t] -> Put #

Serialize (Accession t) Source # 

Methods

put :: Putter (Accession t) #

get :: Get (Accession t) #

NFData (Accession t) Source # 

Methods

rnf :: Accession t -> () #

type Rep (Accession t) Source # 
type Rep (Accession t) = D1 (MetaData "Accession" "Biobase.Types.Accession" "BiobaseTypes-0.1.2.1-1LTYzU1e5OWItpBBqXiV1g" True) (C1 (MetaCons "Accession" PrefixI True) (S1 (MetaSel (Just Symbol "_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.