Safe Haskell | None |
---|---|
Language | Haskell2010 |
Accession numbers. These numbers are not really numbers because they they are made up of alphanumeric characters.
Synopsis
- newtype Accession t = Accession {}
- accession' :: ConvertibleStrings s Text => t -> s -> Accession t
- accession :: ConvertibleStrings s Text => s -> Accession t
- retagAccession :: Accession f -> Accession t
- data Nucleotide = Nucleotide
- data Protein = Protein
- data Clan = Clan
- data Pfam = Pfam
- data Rfam = Rfam
- data Species = Species
- guessAccessionType :: Accession t -> Maybe Text
Accession
with phantom types.
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.
Instances
Eq (Accession t) Source # | |
Ord (Accession t) Source # | |
Defined in Biobase.Types.Accession | |
Read (Accession t) Source # | |
Show (Accession t) Source # | |
IsString (Accession t) Source # | |
Defined in Biobase.Types.Accession fromString :: String -> Accession t # | |
Generic (Accession t) Source # | |
NFData (Accession t) Source # | |
Defined in Biobase.Types.Accession | |
Hashable (Accession t) Source # | |
Defined in Biobase.Types.Accession | |
ToJSON (Accession t) Source # | |
Defined in Biobase.Types.Accession | |
FromJSON (Accession t) Source # | |
Binary (Accession t) Source # | |
Serialize (Accession t) Source # | |
type Rep (Accession t) Source # | |
Defined in Biobase.Types.Accession |
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