uniprot-kb 0.1.1.0 → 0.1.1.1
raw patch · 4 files changed
+35/−33 lines, 4 filesPVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
API changes (from Hackage documentation)
+ Bio.Uniprot.Type: instance GHC.Generics.Generic Bio.Uniprot.Type.AC
+ Bio.Uniprot.Type: instance GHC.Generics.Generic Bio.Uniprot.Type.AltName
+ Bio.Uniprot.Type: instance GHC.Generics.Generic Bio.Uniprot.Type.BibliographicDB
+ Bio.Uniprot.Type: instance GHC.Generics.Generic Bio.Uniprot.Type.CC
+ Bio.Uniprot.Type: instance GHC.Generics.Generic Bio.Uniprot.Type.DE
+ Bio.Uniprot.Type: instance GHC.Generics.Generic Bio.Uniprot.Type.DR
+ Bio.Uniprot.Type: instance GHC.Generics.Generic Bio.Uniprot.Type.DT
+ Bio.Uniprot.Type: instance GHC.Generics.Generic Bio.Uniprot.Type.Endpoint
+ Bio.Uniprot.Type: instance GHC.Generics.Generic Bio.Uniprot.Type.FT
+ Bio.Uniprot.Type: instance GHC.Generics.Generic Bio.Uniprot.Type.Flag
+ Bio.Uniprot.Type: instance GHC.Generics.Generic Bio.Uniprot.Type.GN
+ Bio.Uniprot.Type: instance GHC.Generics.Generic Bio.Uniprot.Type.ID
+ Bio.Uniprot.Type: instance GHC.Generics.Generic Bio.Uniprot.Type.KW
+ Bio.Uniprot.Type: instance GHC.Generics.Generic Bio.Uniprot.Type.Kingdom
+ Bio.Uniprot.Type: instance GHC.Generics.Generic Bio.Uniprot.Type.Name
+ Bio.Uniprot.Type: instance GHC.Generics.Generic Bio.Uniprot.Type.OC
+ Bio.Uniprot.Type: instance GHC.Generics.Generic Bio.Uniprot.Type.OG
+ Bio.Uniprot.Type: instance GHC.Generics.Generic Bio.Uniprot.Type.OH
+ Bio.Uniprot.Type: instance GHC.Generics.Generic Bio.Uniprot.Type.OS
+ Bio.Uniprot.Type: instance GHC.Generics.Generic Bio.Uniprot.Type.OX
+ Bio.Uniprot.Type: instance GHC.Generics.Generic Bio.Uniprot.Type.Organism
+ Bio.Uniprot.Type: instance GHC.Generics.Generic Bio.Uniprot.Type.PE
+ Bio.Uniprot.Type: instance GHC.Generics.Generic Bio.Uniprot.Type.Plastid
+ Bio.Uniprot.Type: instance GHC.Generics.Generic Bio.Uniprot.Type.Record
+ Bio.Uniprot.Type: instance GHC.Generics.Generic Bio.Uniprot.Type.Reference
+ Bio.Uniprot.Type: instance GHC.Generics.Generic Bio.Uniprot.Type.SQ
+ Bio.Uniprot.Type: instance GHC.Generics.Generic Bio.Uniprot.Type.Status
+ Bio.Uniprot.Type: instance GHC.Generics.Generic Bio.Uniprot.Type.Token
Files
- ChangeLog.md +2/−1
- src/Bio/Uniprot/Parser.hs +0/−1
- src/Bio/Uniprot/Type.hs +31/−29
- uniprot-kb.cabal +2/−2
ChangeLog.md view
@@ -5,7 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [Unreleased]+## 0.1.1.1+* `Generic` deriving for all types ## 0.1.1.0 * Back compability lost for SQ section
src/Bio/Uniprot/Parser.hs view
@@ -14,7 +14,6 @@ import Data.Functor (($>)) import Data.Text (Text, append, concat, init, null, pack, splitOn, unpack, unwords)-import Data.Void -- |Describes possible name type of DE section. data NameType = RecName | AltName | SubName | Flags | None
src/Bio/Uniprot/Type.hs view
@@ -1,6 +1,8 @@+{-# LANGUAGE DeriveGeneric #-} module Bio.Uniprot.Type where -import Data.Text (Text)+import Data.Text (Text)+import GHC.Generics (Generic) -- |Which taxonomic 'kingdom' an -- organism belongs to.@@ -10,7 +12,7 @@ | Eukaryota -- ^'E' for eukaryota (=eukarya) | Virus -- ^'V' for viruses and phages (=viridae) | Other -- ^'O' for others (such as artificial sequences)- deriving (Show, Eq, Ord, Bounded, Enum)+ deriving (Generic, Show, Eq, Ord, Bounded, Enum) -- |Controlled vocabulary of species data Organism = Organism@@ -19,7 +21,7 @@ , officialName :: Text -- ^Official (scientific) name , commonName :: Maybe Text -- ^Common name , synonym :: Maybe Text -- ^Synonym name- } deriving (Show, Eq, Ord)+ } deriving (Generic, Show, Eq, Ord) -- |To distinguish the fully annotated entries in the Swiss-Prot -- section of the UniProt Knowledgebase from the computer-annotated@@ -28,14 +30,14 @@ data Status = Reviewed -- ^Entries that have been manually reviewed and annotated by UniProtKB curators | Unreviewed -- ^Computer-annotated entries that have not been reviewed by UniProtKB curators- deriving (Show, Eq, Ord, Bounded, Enum)+ deriving (Generic, Show, Eq, Ord, Bounded, Enum) -- |IDentification data ID = ID { entryName :: Text -- ^This name is a useful means of identifying a sequence, but it is not a stable identifier as is the accession number. , status :: Status -- ^The status of the entry , seqLength :: Int -- ^The length of the molecule, which is the total number of amino acids in the sequence. This number includes the positions reported to be present but which have not been determined (coded as 'X').- } deriving (Show, Eq, Ord)+ } deriving (Generic, Show, Eq, Ord) -- |ACcession numbers. -- The purpose of accession numbers is to provide a stable way of@@ -50,7 +52,7 @@ -- are sorted alphanumerically. newtype AC = AC { accessionNumbers :: [Text]- } deriving (Show, Eq, Ord)+ } deriving (Generic, Show, Eq, Ord) -- |DaTe: the date of creation and last modification of the database -- entry.@@ -61,26 +63,26 @@ , seqVersion :: Int -- ^The sequence version number of an entry is incremented by one when the amino acid sequence shown in the sequence record is modified. , entryVersionDate :: Text -- ^Indicates when data other than the sequence was last modified. , entryVersion :: Int -- ^The entry version number is incremented by one whenever any data in the flat file representation of the entry is modified.- } deriving (Show, Eq, Ord)+ } deriving (Generic, Show, Eq, Ord) data Name = Name { fullName :: Text -- ^The full name. , shortName :: [Text] -- ^A set of abbreviations of the full name or acronyms. , ecNumber :: [Text] -- ^A set of Enzyme Commission numbers.- } deriving (Show, Eq, Ord)+ } deriving (Generic, Show, Eq, Ord) data AltName = Simple Name | Allergen Text | Biotech Text | CDAntigen Text | INN Text- deriving (Show, Eq, Ord)+ deriving (Generic, Show, Eq, Ord) data Flag = Fragment -- ^The complete sequence is not determined. | Fragments -- ^The complete sequence is not determined. | Precursor -- ^The sequence displayed does not correspond to the mature form of the protein.- deriving (Show, Read, Eq, Ord, Bounded, Enum)+ deriving (Generic, Show, Read, Eq, Ord, Bounded, Enum) -- |DEscription - general descriptive information about the sequence -- stored.@@ -91,7 +93,7 @@ , includes :: [DE] -- ^A protein is known to include multiple functional domains each of which is described by a different name. , contains :: [DE] -- ^The functional domains of an enzyme are cleaved, but the catalytic activity can only be observed, when the individual chains reorganize in a complex. , flags :: Maybe Flag -- ^Flags whether the entire is a precursor or/and a fragment.- } deriving (Show, Eq, Ord)+ } deriving (Generic, Show, Eq, Ord) -- |Gene Name - the name(s) of the gene(s) that code for the stored -- protein sequence.@@ -100,13 +102,13 @@ , synonyms :: [Text] -- ^Other (unofficial) names of a gene. , orderedLocusNames :: [Text] -- ^A name used to represent an ORF in a completely sequenced genome or chromosome. , orfNames :: [Text] -- ^A name temporarily attributed by a sequencing project to an open reading frame.- } deriving (Show, Eq, Ord)+ } deriving (Generic, Show, Eq, Ord) -- |Organism Species - the organism which was the source of the -- stored sequence. newtype OS = OS { specie :: Text- } deriving (Show, Eq, Ord)+ } deriving (Generic, Show, Eq, Ord) -- |A enum of possible plastid types, based on either taxonomic -- lineage or photosynthetic capacity.@@ -116,7 +118,7 @@ | PlastidOrganellarChromatophore -- ^Chloroplasts are the plastids found in all land plants and algae with the exception of the glaucocystophyte algae (see below). Chloroplasts in green tissue are photosynthetic; in other tissues they may not be photosynthetic and then may also have secondary information relating to subcellular location (e.g. amyloplasts, chromoplasts). | PlastidCyanelle -- ^Cyanelles are the plastids found in the glaucocystophyte algae. They are also photosynthetic but their plastid has a vestigial cell wall between the 2 envelope membranes. | PlastidNonPhotosynthetic -- ^Non-photosynthetic plastid is used when the plastid in question derives from a photosynthetic lineage but the plastid in question is missing essential genes. Some examples are Aneura mirabilis, Epifagus virginiana, Helicosporidium (a liverwort, higher plant and green alga respectively).- deriving (Show, Eq, Ord, Bounded, Enum)+ deriving (Generic, Show, Eq, Ord, Bounded, Enum) -- |OrGanelle - indicates if the gene coding for a protein originates -- from mitochondria, a plastid, a nucleomorph or a plasmid.@@ -125,20 +127,20 @@ | Nucleomorph -- ^Nucleomorphs are reduced vestigal nuclei found in the plastids of cryptomonad and chlorachniophyte algae. The plastids originate from engulfed eukaryotic phototrophs. | Plasmid [Text] -- ^Plasmid with a specific name. If an entry reports the sequence of a protein identical in a number of plasmids, the names of these plasmids will all be listed. | Plastid Plastid -- ^Plastids are classified based on either their taxonomic lineage or in some cases on their photosynthetic capacity.- deriving (Show, Eq, Ord)+ deriving (Generic, Show, Eq, Ord) -- |Organism Classification - the taxonomic classification of the -- source organism. newtype OC = OC { nodes :: [Text]- } deriving (Show, Eq, Ord)+ } deriving (Generic, Show, Eq, Ord) -- |Organism taxonomy cross-reference indicates the identifier of a -- specific organism in a taxonomic database. data OX = OX { databaseQualifier :: Text -- ^Taxonomy database Qualifier , taxonomicCode :: Text -- ^Taxonomic code- } deriving (Show, Eq, Ord)+ } deriving (Generic, Show, Eq, Ord) -- |Organism Host - indicates the host organism(s) that are -- susceptible to be infected by a virus. Appears only in viral@@ -146,21 +148,21 @@ data OH = OH { taxId :: Text -- ^ , hostName :: Text -- ^- } deriving (Show, Eq, Ord)+ } deriving (Generic, Show, Eq, Ord) -- |Reference comment token. data Token = STRAIN | PLASMID | TRANSPOSON | TISSUE- deriving (Show, Eq, Ord, Bounded, Enum)+ deriving (Generic, Show, Eq, Ord, Bounded, Enum) -- |Bibliographic database names. data BibliographicDB = MEDLINE | PubMed | DOI | AGRICOLA- deriving (Show, Eq, Ord, Bounded, Enum)+ deriving (Generic, Show, Eq, Ord, Bounded, Enum) -- |Reference lines. data Reference = Reference@@ -172,7 +174,7 @@ , ra :: [Text] -- ^Reference Author - authors of the paper (or other work) cited. , rt :: Maybe Text -- ^Reference Title - the title of the paper (or other work) cited as exactly as possible given the limitations of the computer character set. , rl :: Text -- ^Reference Location - he conventional citation information for the reference.- } deriving (Show, Eq, Ord)+ } deriving (Generic, Show, Eq, Ord) -- |The comment blocks are arranged according to what we designate as -- 'topics'.@@ -183,7 +185,7 @@ data CC = CC { topic :: Topic , comment :: Text- } deriving (Show, Eq, Ord)+ } deriving (Generic, Show, Eq, Ord) -- |Database cross-Reference - pointers to information in external -- data resources that is related to UniProtKB entries.@@ -191,7 +193,7 @@ { resourceAbbr :: Text -- ^The abbreviated name of the referenced resource (e.g. PDB). , resourceId :: Text -- ^An unambiguous pointer to a record in the referenced resource. , optionalInfo :: [Text] -- ^Used to provide optional information.- } deriving (Show, Eq, Ord)+ } deriving (Generic, Show, Eq, Ord) -- |Protein existence - indication on the evidences that we currently -- have for the existence of a protein. Because most protein sequences@@ -203,21 +205,21 @@ | InferredFromHomology | Predicted | Uncertain- deriving (Show, Eq, Ord)+ deriving (Generic, Show, Eq, Ord) -- |KeyWord - information that can be used to generate indexes of the -- sequence entries based on functional, structural, or other -- categories. newtype KW = KW { keywords :: [Text]- } deriving (Show, Eq, Ord)+ } deriving (Generic, Show, Eq, Ord) data Endpoint = ExactEP Int | NTerminalEP Int | CTerminalEP Int | UncertainEP Int | UnknownEP- deriving (Show, Eq, Ord)+ deriving (Generic, Show, Eq, Ord) -- |Feature Table - means for the annotation of the sequence data. data FT = FT@@ -225,7 +227,7 @@ , fromEP :: Endpoint -- ^'From' endpoint. , toEP :: Endpoint -- ^'To' endpoint. , description :: [Text] -- ^Description.- } deriving (Show, Eq, Ord)+ } deriving (Generic, Show, Eq, Ord) -- |SeQuence header - sequence data and a quick summary of its content. data SQ = SQ@@ -233,7 +235,7 @@ , molWeight :: Int -- ^Molecular weight rounded to the nearest mass unit (Dalton). , crc64 :: Text -- ^Sequence 64-bit CRC (Cyclic Redundancy Check) value. , sequence :: Text -- ^Sequence of the protein- } deriving (Show, Eq, Ord)+ } deriving (Generic, Show, Eq, Ord) -- |Full UniProt record in UniProt-KB format. data Record = Record@@ -254,4 +256,4 @@ , kw :: Maybe KW , ft :: [FT] , sq :: SQ- } deriving (Show, Eq, Ord)+ } deriving (Generic, Show, Eq, Ord)
uniprot-kb.cabal view
@@ -2,10 +2,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 3517fcac83f428dec7f91394fc57d66a124e38ba92fb52f33441827f60aa1c9e+-- hash: 06baf09e16aa4f6d0c85f1f11df2590dc51caa3604bc3c25d4d20bd37d8af80f name: uniprot-kb-version: 0.1.1.0+version: 0.1.1.1 synopsis: UniProt-KB format parser description: Specification implementation of https://web.expasy.org/docs/userman.html category: Bio