Safe Haskell | None |
---|---|
Language | Haskell2010 |
Accession numbers. These numbers are not really numbers because they they are made up of alphanumeric characters.
- 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.
Eq (Accession t) Source # | |
Ord (Accession t) Source # | |
Read (Accession t) Source # | |
Show (Accession t) Source # | |
IsString (Accession t) Source # | |
Generic (Accession t) Source # | |
Hashable (Accession t) Source # | |
ToJSON (Accession t) Source # | |
FromJSON (Accession t) Source # | |
Binary (Accession t) Source # | |
Serialize (Accession t) Source # | |
NFData (Accession t) Source # | |
type Rep (Accession t) Source # | |
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