diff --git a/ChangeLog.md b/ChangeLog.md
new file mode 100644
--- /dev/null
+++ b/ChangeLog.md
@@ -0,0 +1,11 @@
+# Changelog for uniprot-kb
+
+All notable changes to this project will be documented in this file.
+
+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.0.0
+* Any UniProt-KB file can be parsed
diff --git a/LICENSE b/LICENSE
new file mode 100644
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,30 @@
+Copyright Pavel Yakovlev (c) 2018
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above
+      copyright notice, this list of conditions and the following
+      disclaimer in the documentation and/or other materials provided
+      with the distribution.
+
+    * Neither the name of Pavel Yakovlev nor the names of other
+      contributors may be used to endorse or promote products derived
+      from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/README.md b/README.md
new file mode 100644
--- /dev/null
+++ b/README.md
@@ -0,0 +1,45 @@
+# uniprot-kb
+
+[![Travis](https://img.shields.io/travis/biocad/uniprot-kb.svg)](https://travis-ci.org/biocad/uniprot-kb)
+[![hackage](https://img.shields.io/hackage/v/uniprot-kb.svg)](https://hackage.haskell.org/package/uniprot-kb)
+[![hackage-deps](https://img.shields.io/hackage-deps/v/uniprot-kb.svg)](https://hackage.haskell.org/package/uniprot-kb)
+
+A well-typed UniProt file format parser.
+
+## Documentation
+
+To build Haddock documentation run:
+```
+$ stack haddock
+```
+
+## Usage example
+
+To use the parser and types import:
+```
+λ> import Bio.Uniprot
+```
+
+Than you can parse any `Text` of UniProt by using `parseRecord` function. The result will be presented by
+a `Record` datatype:
+``` haskell
+data Record = Record
+  { id   :: ID
+  , ac   :: AC
+  , dt   :: DT
+  , de   :: DE
+  , gn   :: [GN]
+  , os   :: OS
+  , og   :: Maybe OG
+  , oc   :: OC
+  , ox   :: Maybe OX
+  , oh   :: [OH]
+  , refs :: [Reference]
+  , cc   :: [CC]
+  , dr   :: [DR]
+  , pe   :: PE
+  , kw   :: KW
+  , ft   :: [FT]
+  , sq   :: SQ
+  } deriving (Show, Eq, Ord)
+```
diff --git a/Setup.hs b/Setup.hs
new file mode 100644
--- /dev/null
+++ b/Setup.hs
@@ -0,0 +1,2 @@
+import Distribution.Simple
+main = defaultMain
diff --git a/src/Bio/Uniprot.hs b/src/Bio/Uniprot.hs
new file mode 100644
--- /dev/null
+++ b/src/Bio/Uniprot.hs
@@ -0,0 +1,7 @@
+module Bio.Uniprot
+  ( module T
+  , parseRecord
+  ) where
+
+import Bio.Uniprot.Type as T
+import Bio.Uniprot.Parser
diff --git a/src/Bio/Uniprot/Parser.hs b/src/Bio/Uniprot/Parser.hs
new file mode 100644
--- /dev/null
+++ b/src/Bio/Uniprot/Parser.hs
@@ -0,0 +1,434 @@
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE RecordWildCards   #-}
+{-# LANGUAGE TupleSections     #-}
+module Bio.Uniprot.Parser where
+
+import           Prelude              hiding (concat, init, null)
+import qualified Prelude              as P (concat, id, init)
+
+import           Bio.Uniprot.Type
+import           Control.Applicative  (liftA2, (<|>))
+import           Control.Monad        (unless, when)
+import           Data.Attoparsec.Text
+import           Data.Bifunctor       (second)
+import           Data.Functor         (($>))
+import           Data.Text            (Text, append, concat, init, null, pack,
+                                       splitOn, unpack, unwords)
+import           Data.Void
+
+import           Debug.Trace          (trace)
+
+-- |Describes possible name type of DE section.
+data NameType = RecName | AltName | SubName | Flags | None
+  deriving (Show)
+
+-- |Parses ID line of UniProt-KB text file.
+parseID :: Parser ID
+parseID = do
+    string "ID   "
+    entryName <- pack <$> many1 (satisfy $ inClass "A-Z0-9_")
+    many1 space
+    status <- (string "Reviewed" $> Reviewed) <|>
+              (string "Unreviewed" $> Unreviewed)
+    char ';'
+    many1 space
+    seqLength <- decimal
+    space >> string "AA."
+    pure ID{..}
+
+-- |Parses AC lines of UniProt-KB text file.
+parseAC :: Parser AC
+parseAC = do
+    parseStartAC
+    initAC <- P.concat <$> many' (parseOneAC <* endOfLine <* parseStartAC)
+    lastAC <- parseOneAC
+    let accessionNumbers = initAC ++ lastAC
+    pure AC{..}
+  where
+    parseStartAC :: Parser ()
+    parseStartAC = string "AC" >> count 3 space >> pure ()
+
+    parseOneAC :: Parser [Text]
+    parseOneAC = many1 $ do
+        res <- pack <$> many1 (satisfy $ inClass "A-Z0-9_")
+        char ';'
+        option ' ' (satisfy isHorizontalSpace)
+        pure res
+
+-- |Parses 3 DT lines of UniProt-KB text file.
+parseDT :: Parser DT
+parseDT = do
+    (dbIntegrationDate, dbName) <- parseOneDT "integrated into UniProtKB/" <* endOfLine
+    (seqVersionDate, seqVersion) <- second (read . unpack) <$> parseOneDT "sequence version " <* endOfLine
+    (entryVersionDate, entryVersion) <- second (read . unpack) <$> parseOneDT "entry version "
+    pure DT{..}
+  where
+    parseOneDT :: Text -> Parser (Text, Text)
+    parseOneDT txt = do
+        string "DT   "
+        day <- pack <$> many1 (satisfy $ inClass "A-Z0-9-")
+        char ','
+        many1 space
+        string txt
+        x <- pack <$> many1 (satisfy $ inClass "A-Za-z0-9_-")
+        char '.'
+        pure (day, x)
+
+-- |Parses DE lines of UniProt-KB text file.
+parseDE :: Parser DE
+parseDE = do
+    recName  <- optional $ parseNameDE RecName
+    altNames <- many' (endOfLine *> parseAltDE)
+    subNames <- many' (endOfLine *> parseNameDE SubName)
+    includes <- pure []
+    contains <- pure []
+    flags    <- optional (endOfLine *> parseFlagsDE)
+    pure DE{..}
+  where
+    -- |Parses name section like RecName, AltName or SubName.
+    parseNameDE :: NameType -> Parser Name
+    parseNameDE nameType = do
+        fullName <- parseDELine nameType "Full"
+        shortName <- many' $ endOfLine *> parseDELine None "Short"
+        ecNumber <- many' $ endOfLine *> parseDELine None "EC"
+        pure Name{..}
+
+    -- |Parses flag line of DE section
+    parseFlagsDE :: Parser Flag
+    parseFlagsDE = read . unpack <$> parseDELine Flags ""
+
+    -- |Parses AltName lines of DE section
+    parseAltDE :: Parser AltName
+    parseAltDE =
+      (Simple <$> parseNameDE AltName) <|>
+      (Allergen <$> parseDELine AltName "Allergen") <|>
+      (Biotech <$> parseDELine AltName "Biotech") <|>
+      (CDAntigen <$> parseDELine AltName "CD_antigen") <|>
+      (INN <$> parseDELine AltName "INN")
+
+    -- |Parses any DE line
+    parseDELine :: NameType -> Text -> Parser Text
+    parseDELine nameType tpe = do
+        string "DE   "
+        case nameType of
+          None -> string "         "
+          a    -> string $ append (pack $ show a) ": "
+        unless (null tpe) $ do
+            string tpe
+            string "="
+            pure ()
+        res <- pack <$> many1 (notChar ';')
+        char ';'
+        pure res
+
+-- |Parses DE lines of UniProt-KB text file.
+parseGN :: Parser [GN]
+parseGN = do
+    string "GN   "
+    geneName <- optional parseGNName
+    optional $ parseBreak "GN"
+    synonyms <- option [] $ parseGNList "Synonyms"
+    optional $ parseBreak "GN"
+    orderedLocusNames <- option [] $ parseGNList "OrderedLocusNames"
+    optional $ parseBreak "GN"
+    orfNames <- option [] $ parseGNList "ORFNames"
+    let gn = GN{..}
+    rest <- option [] $ string "and" *> endOfLine *> parseGN
+    pure $ gn:rest
+  where
+    -- |Parses `Name` item of GN line
+    parseGNName :: Parser Text
+    parseGNName = parseDefItem "Name" (P.id <$>)
+
+    -- |Parses any list item of GN line (like `Synonyms` or `ORFNames`)
+    parseGNList :: Text -> Parser [Text]
+    parseGNList name = parseDefItem name (splitOn ", " <$>)
+
+-- |Parses OS lines for one record of UniProt-KB text file.
+parseOS :: Parser OS
+parseOS = OS . pack <$> parseOSStr
+  where
+    parseOSStr :: Parser String
+    parseOSStr = do
+        string "OS   "
+        namePart <- many1 (satisfy $ not . isEndOfLine)
+        if last namePart == '.'
+          then pure $ P.init namePart
+          else do
+              rest <- endOfLine *> parseOSStr
+              pure $ namePart ++ rest
+
+-- |Parser OG line of UniProt-KB text file.
+parseOG :: Parser OG
+parseOG = parseOGNonPlasmid <|> (Plasmid <$> parseOGPlasmid)
+  where
+    parseOGNonPlasmid :: Parser OG
+    parseOGNonPlasmid = string "OG   " *>
+      (string "Hydrogenosome." $> Hydrogenosome) <|>
+      (string "Mitochondrion." $> Mitochondrion) <|>
+      (string "Nucleomorph." $> Nucleomorph) <|>
+      (string "Plastid." $> Plastid PlastidSimple) <|>
+      (string "Plastid; Apicoplast." $> Plastid PlastidApicoplast) <|>
+      (string "Plastid; Chloroplast." $> Plastid PlastidChloroplast) <|>
+      (string "Plastid; Organellar chromatophore." $> Plastid PlastidOrganellarChromatophore) <|>
+      (string "Plastid; Cyanelle." $> Plastid PlastidCyanelle) <|>
+      (string "Plastid; Non-photosynthetic plastid." $> Plastid PlastidNonPhotosynthetic)
+
+    parseOGPlasmid :: Parser [Text]
+    parseOGPlasmid = do
+        string "OG   "
+        name <- parseOnePlasmid
+        let separator = string "," >> optional " and"
+        rest <- many' $ separator *> space *> parseOnePlasmid
+        rest2 <- (char '.' $> []) <|> (separator *> endOfLine *> parseOGPlasmid)
+        pure $ name : rest ++ rest2
+
+    parseOnePlasmid :: Parser Text
+    parseOnePlasmid = do
+        string "Plasmid "
+        pack <$> many1 (satisfy $ liftA2 (&&) (notInClass ",.") (not . isEndOfLine))
+
+-- |Parser OC line of UniProt-KB text file.
+parseOC :: Parser OC
+parseOC = parseNodes ';' '.' "OC" OC
+
+-- |Parses OX lines of UniProt-KB text file.
+parseOX :: Parser OX
+parseOX = do
+    string "OX   "
+    databaseQualifier <- pack <$> many1 (notChar '=')
+    char '='
+    taxonomicCode <- pack <$> many1 (notChar ';')
+    char ';'
+    pure OX{..}
+
+-- |Parses OH line of UniProt-KB text file.
+parseOH :: Parser OH
+parseOH = do
+    string "OH   NCBI_TaxID="
+    taxId <- pack <$> many1 (notChar ';')
+    string "; "
+    hostName <- pack <$> many1 (notChar '.')
+    char '.'
+    pure OH{..}
+
+parseRef :: Parser Reference
+parseRef = do
+    rn <- parseRN
+    endOfLine
+    rp <- parseRP
+    endOfLine
+    rc <- option [] (parseRCX STRAIN "RC" <* endOfLine)
+    rx <- option [] (parseRCX MEDLINE "RX" <* endOfLine)
+    rg <- optional  (parseRG <* endOfLine)
+    ra <- option [] (parseNodes ',' ';' "RA" P.id <* endOfLine)
+    rt <- optional  (parseRT <* endOfLine)
+    rl <- parseRL
+    pure Reference{..}
+  where    
+    parseRN :: Parser Int
+    parseRN = (string "RN   [" *> decimal) <* char ']'
+
+    parseRP :: Parser Text
+    parseRP = do
+        string "RP   "
+        pack . P.init <$> parseMultiLineComment "RP" 3
+
+    parseRCX :: (Enum a, Show a) => a -> Text -> Parser [(a, Text)]
+    parseRCX start name = do
+       string name >> string "   "
+       (:) <$> parseTokPair start
+           <*> many' (parseBreak name *> parseTokPair start)
+     where
+       parseTokPair :: (Enum a, Show a) => a -> Parser (a, Text)
+       parseTokPair x = foldl1 (<|>) $
+                          (\x -> (x,) <$> parseDefItem (pack . show $ x) (P.id <$>)) <$> [x..]
+
+    parseRG :: Parser Text
+    parseRG = pack <$> (string "RG   " *> many1 (satisfy $ not . isEndOfLine))
+
+    parseRT :: Parser Text
+    parseRT = do
+        string "RT   \""
+        let p = many1 $ satisfy $ liftA2 (&&) (not . isEndOfLine) (notInClass "\"")
+        referenceTitle <- (:) <$> p <*> many' (endOfLine *> string "RT  " *> p)
+        string "\";"
+        pure $ pack . hyphenConcat $ referenceTitle
+
+    parseRL :: Parser Text
+    parseRL = do
+        string "RL   "
+        pack . P.init <$> parseMultiLineComment "RL" 3
+
+parseCC :: Parser CC
+parseCC = do
+    string "CC   -!- "
+    topic <- pack <$> many1 (notChar ':')
+    char ':'
+    (char ' ' $> ()) <|> (endOfLine >> string "CC" >> count 7 space $> ())
+    comment <- pack <$> parseMultiLineComment "CC" 7
+    pure CC{..}
+
+parseDR :: Parser DR
+parseDR = do
+    string "DR   "
+    resourceAbbr <- parseToken
+    string "; "
+    resourceId <- parseToken
+    string "; "
+    optionalInfo' <- (:) <$> parseToken <*> many' (string "; " *> parseToken)
+    let optionalInfo = P.init optionalInfo' ++ [init . last $ optionalInfo']
+    pure DR{..}
+  where
+    parseToken :: Parser Text
+    parseToken = pack <$> many1 (satisfy $ liftA2 (&&) (notInClass ";") (not . isEndOfLine))
+
+-- |Parses PE line of UniProt-KB text file.
+parsePE :: Parser PE
+parsePE = (string "PE   1: Evidence at protein level;" $> EvidenceAtProteinLevel) <|>
+          (string "PE   2: Evidence at transcript level;" $> EvidenceAtTranscriptLevel) <|>
+          (string "PE   3: Inferred from homology;" $> InferredFromHomology) <|>
+          (string "PE   4: Predicted;" $> Predicted) <|>
+          (string "PE   5: Uncertain;" $> Uncertain)
+
+-- |Parses KW lines of UniProt-KB text file.
+parseKW :: Parser KW
+parseKW = parseNodes ';' '.' "KW" KW
+
+-- |Parses FT lines of UniProt-KB text file. One FT section is parsed.
+parseFT :: Parser FT
+parseFT = do
+    string "FT   "
+    keyName <- pack <$> many1 (satisfy $ inClass "A-Z_")
+    many1 space
+    fromEP <- parseFTEndpoint
+    many1 space
+    toEP <- parseFTEndpoint
+    many1 space
+    description <- splitByMagic <$> parseMultiLineComment "FT" 32
+    pure FT{..}
+  where
+    -- |Parse FT endpoint
+    parseFTEndpoint :: Parser Endpoint
+    parseFTEndpoint = (UncertainEP <$> (char '?' *> decimal)) <|>
+                      (NTerminalEP <$> (char '<' *> decimal)) <|>
+                      (CTerminalEP <$> (char '>' *> decimal)) <|>
+                      (ExactEP     <$> decimal) <|>
+                      (char '?' $> UnknownEP)
+
+    -- |Split string to tokens by periods outside brackets.
+    splitByMagic :: String -> [Text]
+    splitByMagic txt = pack <$> splitStr 0 [] txt
+      where
+        splitStr :: Int -> String -> String -> [String]
+        splitStr 0 acc ['.']        = [reverse acc]
+        splitStr 0 acc ('.':' ':xs) = reverse acc : splitStr 0 [] xs
+        splitStr 0 acc ('.':xs)     = reverse acc : splitStr 0 [] xs
+        splitStr n acc ('(':xs)     = splitStr (n+1) ('(':acc) xs
+        splitStr n acc (')':xs)     = splitStr (n-1) (')':acc) xs
+        splitStr n acc (x:xs)       = splitStr n (x:acc) xs
+    
+-- |Parses SQ lines of UniProt-KB text file.
+parseSQ :: Parser SQ
+parseSQ = do
+    string "SQ   SEQUENCE"
+    many1 space
+    seqLength <- decimal
+    space >> string "AA;"
+    many1 space
+    molWeight <- decimal
+    space >> string "MW;"
+    many1 space
+    crc64 <- pack <$> many1 (satisfy $ inClass "A-F0-9")
+    space >> string "CRC64;"
+    endOfLine
+    sequence <- pack . P.concat <$>
+                  many1 (skipSpace *> many1 (satisfy $ inClass "ACDEFGHIKLMNPQRSTVWY"))
+    pure SQ{..}
+
+-- |Parses end of one UniProt record.
+parseEnd :: Parser ()
+parseEnd = string "//" >> pure ()
+
+-- |Parses whole UniProt-KB record.
+parseRecord :: Parser Record
+parseRecord = Record <$>          (parseID  <* endOfLine)
+                     <*>          (parseAC  <* endOfLine)
+                     <*>          (parseDT  <* endOfLine)
+                     <*>          (parseDE  <* endOfLine)
+                     <*>          (parseGN  <* endOfLine)
+                     <*>          (parseOS  <* endOfLine)
+                     <*> optional (parseOG  <* endOfLine)
+                     <*>          (parseOC  <* endOfLine)
+                     <*> optional (parseOX  <* endOfLine)
+                     <*> many'    (parseOH  <* endOfLine)
+                     <*> many'    (parseRef <* endOfLine)
+                     <*> many'    (parseCC  <* endOfLine)
+                     <*> many'    (parseDR  <* endOfLine)
+                     <*>          (parsePE  <* endOfLine)
+                     <*>          (parseKW  <* endOfLine)
+                     <*> many'    (parseFT  <* endOfLine)
+                     <*>          (parseSQ  <* endOfLine)
+                     <*           parseEnd
+
+-- = Helper parsers
+
+-- |Transforms any parser to a parser of maybe value.
+-- >>> parseOnly (optional digit) "1"
+-- Right (Just 1)
+--
+-- >>> parseOnly (optional digit) ""
+-- Right Nothing
+optional :: Parser a -> Parser (Maybe a)
+optional par = option Nothing (Just <$> par)
+
+-- |Parses lines, that contain nodes splitted by ';' and ended by '.'.
+parseNodes :: Char          -- ^Delimeter char, that splits the nodes.
+           -> Char          -- ^Terminal char, that ends the node list.
+           -> Text          -- ^Start 2-letter mark.
+           -> ([Text] -> a) -- ^Text modifier
+           -> Parser a
+parseNodes del end start f = do
+    string start >> count 3 space
+    name <- parseNode
+    rest <- many' $ do
+        char del
+        string " " <|> (endOfLine >> string start >> count 3 space >> pure "")
+        parseNode
+    char end
+    pure $ f (name:rest)
+  where
+    parseNode :: Parser Text
+    parseNode = pack <$> many1 (satisfy $ liftA2 (&&) (notInClass [del,end]) (not . isEndOfLine))
+
+-- |Parses line till the end.
+parseTillEnd :: Parser String
+parseTillEnd = many1 $ satisfy (not . isEndOfLine)
+
+-- |Parses multiline comment as one string.
+parseMultiLineComment :: Text -> Int -> Parser String
+parseMultiLineComment start skip = do
+    comm <- (:) <$> parseTillEnd
+                <*> many' (do endOfLine
+                              string start
+                              count (skip - 1) space -- leave one space to separate words
+                              parseTillEnd)
+    pure $ hyphenConcat comm
+
+-- |Parses line break for multiline section.
+parseBreak :: Text -> Parser ()
+parseBreak txt = ((endOfLine >> string txt >> string "   ") <|> string " ") $> ()
+
+-- |Parses one item like "Something=Something else;"
+parseDefItem :: Text -> (Parser Text -> Parser a) -> Parser a
+parseDefItem name f = do
+    string name >> char '='
+    f (pack <$> many1 (notChar ';')) <* char ';'
+
+-- |Delete needless space after hyphen on concat.
+hyphenConcat :: [String] -> String
+hyphenConcat []       = []
+hyphenConcat [x]      = x
+hyphenConcat (x:y:ys) = if last x == '-'
+                          then x ++ tail y ++ hyphenConcat ys
+                          else x ++ y ++ hyphenConcat ys
diff --git a/src/Bio/Uniprot/Type.hs b/src/Bio/Uniprot/Type.hs
new file mode 100644
--- /dev/null
+++ b/src/Bio/Uniprot/Type.hs
@@ -0,0 +1,258 @@
+{-# LANGUAGE DuplicateRecordFields #-}
+module Bio.Uniprot.Type where
+
+import           Data.Text          (Text)
+
+-- |Which taxonomic 'kingdom' an
+-- organism belongs to.
+data Kingdom
+  = Archea    -- ^'A' for archaea (=archaebacteria)
+  | Bacteria  -- ^'B' for bacteria (=prokaryota or eubacteria)
+  | 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)
+
+-- |Controlled vocabulary of species
+data Organism = Organism
+  { code         :: Text       -- ^Code of organism (up to 5 symbols)
+  , kingdom      :: Kingdom    -- ^Kingdom of organism
+  , officialName :: Text       -- ^Official (scientific) name
+  , commonName   :: Maybe Text -- ^Common name
+  , synonym      :: Maybe Text -- ^Synonym name
+  } deriving (Show, Eq, Ord)
+
+-- |To distinguish the fully annotated entries in the Swiss-Prot
+-- section of the UniProt Knowledgebase from the computer-annotated
+-- entries in the TrEMBL section, the 'status' of each entry is
+-- indicated in the first (ID) line of each entry
+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)
+
+-- |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)
+
+-- |ACcession numbers.
+-- The purpose of accession numbers is to provide a stable way of
+-- identifying entries from release to release. It is sometimes
+-- necessary for reasons of consistency to change the names of the
+-- entries, for example, to ensure that related entries have similar
+-- names. However, an accession number is always conserved, and
+-- therefore allows unambiguous citation of entries.
+-- Researchers who wish to cite entries in their publications should
+-- always cite the first accession number. This is commonly referred
+-- to as the 'primary accession number'. 'Secondary accession numbers'
+-- are sorted alphanumerically.
+newtype AC = AC
+  { accessionNumbers :: [Text]
+  } deriving (Show, Eq, Ord)
+
+-- |DaTe: the date of creation and last modification of the database
+-- entry.
+data DT = DT
+  { dbIntegrationDate :: Text -- ^Indicates when the entry first appeared in the database.
+  , dbName            :: Text -- ^Indicates in which section of UniProtKB, Swiss-Prot or TrEMBL, the entry can be found.
+  , seqVersionDate    :: Text -- ^Indicates when the sequence data was last modified.
+  , 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)
+
+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)
+
+data AltName = Simple Name
+             | Allergen Text
+             | Biotech Text
+             | CDAntigen Text
+             | INN Text
+  deriving (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)
+
+-- |DEscription - general descriptive information about the sequence
+-- stored.
+data DE = DE
+  { recName  :: Maybe Name -- ^The name recommended by the UniProt consortium.
+  , altNames :: [AltName]  -- ^A synonym of the recommended name.
+  , subNames :: [Name]     -- ^A name provided by the submitter of the underlying nucleotide sequence.
+  , 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)
+
+-- |Gene Name - the name(s) of the gene(s) that code for the stored
+-- protein sequence.
+data GN = GN
+  { geneName          :: Maybe Text -- ^The name used to represent a gene.
+  , 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)
+
+-- |Organism Species - the organism which was the source of the
+-- stored sequence.
+newtype OS = OS
+  { specie :: Text
+  } deriving (Show, Eq, Ord)
+
+-- |A enum of possible plastid types, based on either taxonomic
+-- lineage or photosynthetic capacity.
+data Plastid = PlastidSimple                  -- ^The term Plastid is used when the capacities of the organism are unclear; for example in the parasitic plants of the Cuscuta lineage, where sometimes young tissue is photosynthetic.
+             | PlastidApicoplast              -- ^Apicoplasts are the plastids found in Apicocomplexa parasites such as Eimeria, Plasmodium and Toxoplasma; they are not photosynthetic.
+             | PlastidChloroplast             -- ^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).
+             | 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)
+
+-- |OrGanelle - indicates if the gene coding for a protein originates
+-- from mitochondria, a plastid, a nucleomorph or a plasmid.
+data OG = Hydrogenosome   -- ^Hydrogenosomes are membrane-enclosed redox organelles found in some anaerobic unicellular eukaryotes which contain hydrogenase and produce hydrogen and ATP by glycolysis. They are thought to have evolved from mitochondria; most hydrogenosomes lack a genome, but some like (e.g. the anaerobic ciliate Nyctotherus ovalis) have retained a rudimentary genome.
+        | Mitochondrion   -- ^Mitochondria are redox-active membrane-bound organelles found in the cytoplasm of most eukaryotic cells. They are the site of sthe reactions of oxidative phosphorylation, which results in the formation of ATP.
+        | 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)
+
+-- |Organism Classification - the taxonomic classification of the
+-- source organism.
+newtype OC = OC
+  { nodes :: [Text]
+  } deriving (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)
+
+-- |Organism Host - indicates the host organism(s) that are
+-- susceptible to be infected by a virus. Appears only in viral
+-- entries.
+data OH = OH
+  { taxId    :: Text -- ^
+  , hostName :: Text -- ^
+  } deriving (Show, Eq, Ord)
+
+-- |Reference comment token.
+data Token = STRAIN
+           | PLASMID
+           | TRANSPOSON
+           | TISSUE
+  deriving (Show, Eq, Ord, Bounded, Enum)
+
+-- |Bibliographic database names.
+data BibliographicDB = MEDLINE
+                     | PubMed
+                     | DOI
+                     | AGRICOLA
+  deriving (Show, Eq, Ord, Bounded, Enum)
+
+-- |Reference lines.
+data Reference = Reference
+  { rn :: Int                       -- ^Reference Number - a sequential number to each reference citation in an entry.
+  , rp :: Text                      -- ^Reference Position - the extent of the work relevant to the entry carried out by the authors.
+  , rc :: [(Token, Text)]           -- ^Reference Comment - comments relevant to the reference cited.
+  , rx :: [(BibliographicDB, Text)] -- ^Reference cross-reference - the identifier assigned to a specific reference in a bibliographic database.
+  , rg :: Maybe Text                -- ^Reference Group - the consortium name associated with a given citation.
+  , 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)
+
+-- |The comment blocks are arranged according to what we designate as
+-- 'topics'.
+type Topic = Text
+
+-- |Free text comments on the entry, and are used to convey any useful
+-- information.
+data CC = CC
+  { topic   :: Topic
+  , comment :: Text
+  } deriving (Show, Eq, Ord)
+
+-- |Database cross-Reference - pointers to information in external
+-- data resources that is related to UniProtKB entries.
+data DR = DR
+  { 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)
+
+-- |Protein existence - indication on the evidences that we currently
+-- have for the existence of a protein. Because most protein sequences
+-- are derived from translation of nucleotide sequences and are mere
+-- predictions, the PE line indicates what the evidences are of the
+-- existence of a protein.
+data PE = EvidenceAtProteinLevel
+        | EvidenceAtTranscriptLevel
+        | InferredFromHomology
+        | Predicted
+        | Uncertain
+  deriving (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)
+
+data Endpoint = ExactEP Int
+              | NTerminalEP Int
+              | CTerminalEP Int
+              | UncertainEP Int
+              | UnknownEP
+  deriving (Show, Eq, Ord)
+
+-- |Feature Table - means for the annotation of the sequence data.
+data FT = FT
+  { keyName     :: Text     -- ^Key name.
+  , fromEP      :: Endpoint -- ^'From' endpoint.
+  , toEP        :: Endpoint -- ^'To' endpoint.
+  , description :: [Text]   -- ^Description.
+  } deriving (Show, Eq, Ord)
+
+-- |SeQuence header - sequence data and a quick summary of its content.
+data SQ = SQ
+  { seqLength :: Int  -- ^Length of the sequence in amino acids.
+  , 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)
+
+-- |Full UniProt record in UniProt-KB format.
+data Record = Record
+  { id   :: ID
+  , ac   :: AC
+  , dt   :: DT
+  , de   :: DE
+  , gn   :: [GN]
+  , os   :: OS
+  , og   :: Maybe OG
+  , oc   :: OC
+  , ox   :: Maybe OX
+  , oh   :: [OH]
+  , refs :: [Reference]
+  , cc   :: [CC]
+  , dr   :: [DR]
+  , pe   :: PE
+  , kw   :: KW
+  , ft   :: [FT]
+  , sq   :: SQ
+  } deriving (Show, Eq, Ord)
diff --git a/test/Spec.hs b/test/Spec.hs
new file mode 100644
--- /dev/null
+++ b/test/Spec.hs
@@ -0,0 +1,946 @@
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE QuasiQuotes       #-}
+
+import Prelude hiding (lines, unlines)
+
+import           Data.Text         (Text, lines, unlines)
+import           NeatInterpolation (text)
+import           Test.Hspec
+import           Test.QuickCheck
+
+import Data.Attoparsec.Text (parseOnly, endOfLine, parseTest, many')
+
+import Bio.Uniprot.Type
+import Bio.Uniprot.Parser
+
+idStr :: Text
+idStr = "ID   PDCD1_HUMAN             Reviewed;         288 AA."
+
+acStr :: Text
+acStr = "AC   Q15116; O00517; Q8IX89;"
+
+dtStr :: Text
+dtStr = [text|
+DT   01-NOV-1997, integrated into UniProtKB/Swiss-Prot.
+DT   17-APR-2007, sequence version 3.
+DT   28-FEB-2018, entry version 163.|]
+
+deStr :: Text
+deStr = [text|
+DE   RecName: Full=Programmed cell death protein 1;
+DE            Short=Protein PD-1;
+DE            Short=hPD-1;
+DE   AltName: CD_antigen=CD279;
+DE   Flags: Precursor;|]
+
+gnStr :: Text
+gnStr = "GN   Name=PDCD1; Synonyms=PD1;"
+
+osStr :: Text
+osStr = "OS   Homo sapiens (Human)."
+
+ogStr :: Text
+ogStr = [text|
+OG   Plasmid R6-5, Plasmid IncFII R100 (NR1), and
+OG   Plasmid IncFII R1-19 (R1 drd-19).|]
+
+ocStr :: Text
+ocStr = [text|
+OC   Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi;
+OC   Mammalia; Eutheria; Euarchontoglires; Primates; Haplorrhini;
+OC   Catarrhini; Hominidae; Homo.|]
+
+oxStr :: Text
+oxStr = "OX   NCBI_TaxID=9606;"
+
+ohStr :: Text
+ohStr = "OH   NCBI_TaxID=9536; Cercopithecus hamlyni (Owl-faced monkey) (Hamlyn's monkey)."
+
+refStr :: Text
+refStr = [text|
+RN   [1]
+RP   NUCLEOTIDE SEQUENCE [GENOMIC DNA].
+RX   PubMed=7851902; DOI=10.1006/geno.1994.1562;
+RA   Shinohara T., Taniwaki M., Ishida Y., Kawaich M., Honjo T.;
+RT   "Structure and chromosomal localization of the human PD-1 gene
+RT   (PDCD1).";
+RL   Genomics 23:704-706(1994).
+RN   [2]
+RP   NUCLEOTIDE SEQUENCE [MRNA].
+RX   PubMed=9332365; DOI=10.1016/S0378-1119(97)00260-6;
+RA   Finger L.R., Pu J., Wasserman R., Vibhakar R., Louie E., Hardy R.R.,
+RA   Burrows P.D., Billips L.D.;
+RT   "The human PD-1 gene: complete cDNA, genomic organization, and
+RT   developmentally regulated expression in B cell progenitors.";
+RL   Gene 197:177-187(1997).
+RN   [3]
+RP   ERRATUM.
+RA   Finger L.R., Pu J., Wasserman R., Vibhakar R., Louie E., Hardy R.R.,
+RA   Burrows P.D., Billips L.D.;
+RL   Gene 203:253-253(1997).
+RN   [4]
+RP   NUCLEOTIDE SEQUENCE [GENOMIC DNA], AND INVOLVEMENT IN SLEB2.
+RX   PubMed=12402038; DOI=10.1038/ng1020;
+RA   Prokunina L., Castillejo-Lopez C., Oberg F., Gunnarsson I., Berg L.,
+RA   Magnusson V., Brookes A.J., Tentler D., Kristjansdottir H.,
+RA   Grondal G., Bolstad A.I., Svenungsson E., Lundberg I., Sturfelt G.,
+RA   Jonssen A., Truedsson L., Lima G., Alcocer-Varela J., Jonsson R.,
+RA   Gyllensten U.B., Harley J.B., Alarcon-Segovia D., Steinsson K.,
+RA   Alarcon-Riquelme M.E.;
+RT   "A regulatory polymorphism in PDCD1 is associated with susceptibility
+RT   to systemic lupus erythematosus in humans.";
+RL   Nat. Genet. 32:666-669(2002).
+RN   [5]
+RP   NUCLEOTIDE SEQUENCE [MRNA].
+RA   He X., Xu L., Liu Y., Zeng Y.;
+RT   "Cloning of PD-1 cDNA from activated peripheral leukocytes.";
+RL   Submitted (FEB-2003) to the EMBL/GenBank/DDBJ databases.
+RN   [6]
+RP   NUCLEOTIDE SEQUENCE [GENOMIC DNA].
+RA   Livingston R.J., Shaffer T., McFarland I., Nguyen C.P., Stanaway I.B.,
+RA   Rajkumar N., Johnson E.J., da Ponte S.H., Willa H., Ahearn M.O.,
+RA   Bertucci C., Acklestad J., Carroll A., Swanson J., Gildersleeve H.I.,
+RA   Nickerson D.A.;
+RL   Submitted (OCT-2006) to the EMBL/GenBank/DDBJ databases.
+RN   [7]
+RP   NUCLEOTIDE SEQUENCE [LARGE SCALE MRNA].
+RX   PubMed=14702039; DOI=10.1038/ng1285;
+RA   Ota T., Suzuki Y., Nishikawa T., Otsuki T., Sugiyama T., Irie R.,
+RA   Wakamatsu A., Hayashi K., Sato H., Nagai K., Kimura K., Makita H.,
+RA   Sekine M., Obayashi M., Nishi T., Shibahara T., Tanaka T., Ishii S.,
+RA   Yamamoto J., Saito K., Kawai Y., Isono Y., Nakamura Y., Nagahari K.,
+RA   Murakami K., Yasuda T., Iwayanagi T., Wagatsuma M., Shiratori A.,
+RA   Sudo H., Hosoiri T., Kaku Y., Kodaira H., Kondo H., Sugawara M.,
+RA   Takahashi M., Kanda K., Yokoi T., Furuya T., Kikkawa E., Omura Y.,
+RA   Abe K., Kamihara K., Katsuta N., Sato K., Tanikawa M., Yamazaki M.,
+RA   Ninomiya K., Ishibashi T., Yamashita H., Murakawa K., Fujimori K.,
+RA   Tanai H., Kimata M., Watanabe M., Hiraoka S., Chiba Y., Ishida S.,
+RA   Ono Y., Takiguchi S., Watanabe S., Yosida M., Hotuta T., Kusano J.,
+RA   Kanehori K., Takahashi-Fujii A., Hara H., Tanase T.-O., Nomura Y.,
+RA   Togiya S., Komai F., Hara R., Takeuchi K., Arita M., Imose N.,
+RA   Musashino K., Yuuki H., Oshima A., Sasaki N., Aotsuka S.,
+RA   Yoshikawa Y., Matsunawa H., Ichihara T., Shiohata N., Sano S.,
+RA   Moriya S., Momiyama H., Satoh N., Takami S., Terashima Y., Suzuki O.,
+RA   Nakagawa S., Senoh A., Mizoguchi H., Goto Y., Shimizu F., Wakebe H.,
+RA   Hishigaki H., Watanabe T., Sugiyama A., Takemoto M., Kawakami B.,
+RA   Yamazaki M., Watanabe K., Kumagai A., Itakura S., Fukuzumi Y.,
+RA   Fujimori Y., Komiyama M., Tashiro H., Tanigami A., Fujiwara T.,
+RA   Ono T., Yamada K., Fujii Y., Ozaki K., Hirao M., Ohmori Y.,
+RA   Kawabata A., Hikiji T., Kobatake N., Inagaki H., Ikema Y., Okamoto S.,
+RA   Okitani R., Kawakami T., Noguchi S., Itoh T., Shigeta K., Senba T.,
+RA   Matsumura K., Nakajima Y., Mizuno T., Morinaga M., Sasaki M.,
+RA   Togashi T., Oyama M., Hata H., Watanabe M., Komatsu T.,
+RA   Mizushima-Sugano J., Satoh T., Shirai Y., Takahashi Y., Nakagawa K.,
+RA   Okumura K., Nagase T., Nomura N., Kikuchi H., Masuho Y., Yamashita R.,
+RA   Nakai K., Yada T., Nakamura Y., Ohara O., Isogai T., Sugano S.;
+RT   "Complete sequencing and characterization of 21,243 full-length human
+RT   cDNAs.";
+RL   Nat. Genet. 36:40-45(2004).
+RN   [8]
+RP   NUCLEOTIDE SEQUENCE [LARGE SCALE MRNA].
+RX   PubMed=15489334; DOI=10.1101/gr.2596504;
+RG   The MGC Project Team;
+RT   "The status, quality, and expansion of the NIH full-length cDNA
+RT   project: the Mammalian Gene Collection (MGC).";
+RL   Genome Res. 14:2121-2127(2004).
+RN   [9]
+RP   NUCLEOTIDE SEQUENCE [LARGE SCALE GENOMIC DNA].
+RA   Mural R.J., Istrail S., Sutton G., Florea L., Halpern A.L.,
+RA   Mobarry C.M., Lippert R., Walenz B., Shatkay H., Dew I., Miller J.R.,
+RA   Flanigan M.J., Edwards N.J., Bolanos R., Fasulo D., Halldorsson B.V.,
+RA   Hannenhalli S., Turner R., Yooseph S., Lu F., Nusskern D.R.,
+RA   Shue B.C., Zheng X.H., Zhong F., Delcher A.L., Huson D.H.,
+RA   Kravitz S.A., Mouchard L., Reinert K., Remington K.A., Clark A.G.,
+RA   Waterman M.S., Eichler E.E., Adams M.D., Hunkapiller M.W., Myers E.W.,
+RA   Venter J.C.;
+RL   Submitted (JUL-2005) to the EMBL/GenBank/DDBJ databases.
+RN   [10]
+RP   FUNCTION.
+RX   PubMed=21276005; DOI=10.1111/j.1749-6632.2010.05919.x;
+RA   Fife B.T., Pauken K.E.;
+RT   "The role of the PD-1 pathway in autoimmunity and peripheral
+RT   tolerance.";
+RL   Ann. N. Y. Acad. Sci. 1217:45-59(2011).|]
+
+ccStr :: Text
+ccStr = [text|
+CC   -!- FUNCTION: Inhibitory cell surface receptor involved in the
+CC       regulation of T-cell function during immunity and tolerance. Upon
+CC       ligand binding, inhibits T-cell effector functions in an antigen-
+CC       specific manner. Possible cell death inducer, in association with
+CC       other factors. {ECO:0000269|PubMed:21276005}.
+CC   -!- SUBUNIT: Monomer. {ECO:0000250}.
+CC   -!- INTERACTION:
+CC       Q9NZQ7:CD274; NbExp=2; IntAct=EBI-4314328, EBI-4314282;
+CC       Q9NZQ7-1:CD274; NbExp=2; IntAct=EBI-4314328, EBI-15686469;
+CC       Q06124:PTPN11; NbExp=3; IntAct=EBI-4314328, EBI-297779;
+CC   -!- SUBCELLULAR LOCATION: Membrane; Single-pass type I membrane
+CC       protein.
+CC   -!- DEVELOPMENTAL STAGE: Induced at programmed cell death.
+CC   -!- DISEASE: Systemic lupus erythematosus 2 (SLEB2) [MIM:605218]: A
+CC       chronic, relapsing, inflammatory, and often febrile multisystemic
+CC       disorder of connective tissue, characterized principally by
+CC       involvement of the skin, joints, kidneys and serosal membranes. It
+CC       is of unknown etiology, but is thought to represent a failure of
+CC       the regulatory mechanisms of the autoimmune system. The disease is
+CC       marked by a wide range of system dysfunctions, an elevated
+CC       erythrocyte sedimentation rate, and the formation of LE cells in
+CC       the blood or bone marrow. {ECO:0000269|PubMed:12402038}.
+CC       Note=Disease susceptibility is associated with variations
+CC       affecting the gene represented in this entry.|]
+
+peStr :: Text
+peStr = "PE   1: Evidence at protein level;"
+
+kwStr :: Text
+kwStr = [text|
+KW   3D-structure; Apoptosis; Complete proteome; Disulfide bond;
+KW   Glycoprotein; Immunity; Immunoglobulin domain; Membrane; Polymorphism;
+KW   Reference proteome; Signal; Systemic lupus erythematosus;
+KW   Transmembrane; Transmembrane helix.|]
+
+drStr :: Text
+drStr = [text|
+DR   EMBL; L27440; AAC41700.1; -; Genomic_DNA.
+DR   EMBL; U64863; AAC51773.1; -; mRNA.
+DR   EMBL; AF363458; AAN64003.1; -; Genomic_DNA.
+DR   EMBL; AY238517; AAO63583.1; -; mRNA.
+DR   EMBL; EF064716; ABK41899.1; -; Genomic_DNA.
+DR   EMBL; AK313848; BAG36577.1; -; mRNA.
+DR   EMBL; CH471063; EAW71298.1; -; Genomic_DNA.
+DR   EMBL; BC074740; AAH74740.1; -; mRNA.
+DR   CCDS; CCDS33428.1; -.
+DR   PIR; A55737; A55737.
+DR   RefSeq; NP_005009.2; NM_005018.2.
+DR   UniGene; Hs.158297; -.
+DR   PDB; 2M2D; NMR; -; A=34-150.
+DR   PDB; 3RRQ; X-ray; 2.10 A; A=32-160.
+DR   PDB; 4ZQK; X-ray; 2.45 A; B=33-150.
+DR   PDB; 5B8C; X-ray; 2.15 A; C/F/I/L=32-160.
+DR   PDB; 5GGR; X-ray; 3.30 A; Y/Z=26-150.
+DR   PDB; 5GGS; X-ray; 2.00 A; Y/Z=26-148.
+DR   PDB; 5IUS; X-ray; 2.89 A; A/B=26-146.
+DR   PDB; 5JXE; X-ray; 2.90 A; A/B=33-146.
+DR   PDB; 5WT9; X-ray; 2.40 A; G=1-167.
+DR   PDBsum; 2M2D; -.
+DR   PDBsum; 3RRQ; -.
+DR   PDBsum; 4ZQK; -.
+DR   PDBsum; 5B8C; -.
+DR   PDBsum; 5GGR; -.
+DR   PDBsum; 5GGS; -.
+DR   PDBsum; 5IUS; -.
+DR   PDBsum; 5JXE; -.
+DR   PDBsum; 5WT9; -.
+DR   ProteinModelPortal; Q15116; -.
+DR   SMR; Q15116; -.
+DR   BioGrid; 111160; 61.
+DR   DIP; DIP-44126N; -.
+DR   IntAct; Q15116; 5.
+DR   MINT; Q15116; -.
+DR   STRING; 9606.ENSP00000335062; -.
+DR   ChEMBL; CHEMBL3307223; -.
+DR   DrugBank; DB05916; CT-011.
+DR   DrugBank; DB09035; Nivolumab.
+DR   DrugBank; DB09037; Pembrolizumab.
+DR   GuidetoPHARMACOLOGY; 2760; -.
+DR   iPTMnet; Q15116; -.
+DR   PhosphoSitePlus; Q15116; -.
+DR   BioMuta; PDCD1; -.
+DR   DMDM; 145559515; -.
+DR   PaxDb; Q15116; -.
+DR   PeptideAtlas; Q15116; -.
+DR   PRIDE; Q15116; -.
+DR   DNASU; 5133; -.
+DR   Ensembl; ENST00000334409; ENSP00000335062; ENSG00000188389.
+DR   Ensembl; ENST00000618185; ENSP00000480684; ENSG00000276977.
+DR   GeneID; 5133; -.
+DR   KEGG; hsa:5133; -.
+DR   UCSC; uc002wcq.5; human.
+DR   CTD; 5133; -.
+DR   DisGeNET; 5133; -.
+DR   EuPathDB; HostDB:ENSG00000188389.10; -.
+DR   GeneCards; PDCD1; -.
+DR   H-InvDB; HIX0030684; -.
+DR   HGNC; HGNC:8760; PDCD1.
+DR   HPA; CAB038418; -.
+DR   HPA; HPA035981; -.
+DR   MalaCards; PDCD1; -.
+DR   MIM; 109100; phenotype.
+DR   MIM; 600244; gene.
+DR   MIM; 605218; phenotype.
+DR   neXtProt; NX_Q15116; -.
+DR   OpenTargets; ENSG00000188389; -.
+DR   Orphanet; 802; Multiple sclerosis.
+DR   Orphanet; 536; Systemic lupus erythematosus.
+DR   PharmGKB; PA33110; -.
+DR   eggNOG; ENOG410J26W; Eukaryota.
+DR   eggNOG; ENOG41116U6; LUCA.
+DR   GeneTree; ENSGT00390000013662; -.
+DR   HOGENOM; HOG000253959; -.
+DR   HOVERGEN; HBG053534; -.
+DR   InParanoid; Q15116; -.
+DR   KO; K06744; -.
+DR   OMA; DFQWREK; -.
+DR   OrthoDB; EOG091G0EE8; -.
+DR   PhylomeDB; Q15116; -.
+DR   TreeFam; TF336181; -.
+DR   Reactome; R-HSA-389948; PD-1 signaling.
+DR   SIGNOR; Q15116; -.
+DR   ChiTaRS; PDCD1; human.
+DR   GeneWiki; Programmed_cell_death_1; -.
+DR   GenomeRNAi; 5133; -.
+DR   PRO; PR:Q15116; -.
+DR   Proteomes; UP000005640; Chromosome 2.
+DR   Bgee; ENSG00000188389; -.
+DR   CleanEx; HS_PDCD1; -.
+DR   ExpressionAtlas; Q15116; baseline and differential.
+DR   Genevisible; Q15116; HS.
+DR   GO; GO:0009897; C:external side of plasma membrane; IEA:Ensembl.
+DR   GO; GO:0016021; C:integral component of membrane; IEA:UniProtKB-KW.
+DR   GO; GO:0005886; C:plasma membrane; TAS:Reactome.
+DR   GO; GO:0004871; F:signal transducer activity; TAS:ProtInc.
+DR   GO; GO:0006915; P:apoptotic process; TAS:ProtInc.
+DR   GO; GO:0006959; P:humoral immune response; TAS:ProtInc.
+DR   GO; GO:0007275; P:multicellular organism development; TAS:ProtInc.
+DR   GO; GO:0043066; P:negative regulation of apoptotic process; IEA:Ensembl.
+DR   GO; GO:0002644; P:negative regulation of tolerance induction; IEA:Ensembl.
+DR   GO; GO:0070234; P:positive regulation of T cell apoptotic process; IDA:UniProtKB.
+DR   GO; GO:0031295; P:T cell costimulation; TAS:Reactome.
+DR   Gene3D; 2.60.40.10; -; 1.
+DR   InterPro; IPR007110; Ig-like_dom.
+DR   InterPro; IPR036179; Ig-like_dom_sf.
+DR   InterPro; IPR013783; Ig-like_fold.
+DR   InterPro; IPR003599; Ig_sub.
+DR   InterPro; IPR013106; Ig_V-set.
+DR   Pfam; PF07686; V-set; 1.
+DR   SMART; SM00409; IG; 1.
+DR   SMART; SM00406; IGv; 1.
+DR   SUPFAM; SSF48726; SSF48726; 1.
+DR   PROSITE; PS50835; IG_LIKE; 1.|]
+
+ftStr :: Text
+ftStr = [text|
+FT   SIGNAL        1     20       {ECO:0000255}.
+FT   CHAIN        21    288       Programmed cell death protein 1.
+FT                                /FTId=PRO_0000014892.
+FT   TOPO_DOM     21    170       Extracellular. {ECO:0000255}.
+FT   TRANSMEM    171    191       Helical. {ECO:0000255}.
+FT   TOPO_DOM    192    288       Cytoplasmic. {ECO:0000255}.
+FT   DOMAIN       35    145       Ig-like V-type.
+FT   CARBOHYD     49     49       N-linked (GlcNAc...) asparagine.
+FT                                {ECO:0000255}.
+FT   CARBOHYD     58     58       N-linked (GlcNAc...) asparagine.
+FT                                {ECO:0000255}.
+FT   CARBOHYD     74     74       N-linked (GlcNAc...) asparagine.
+FT                                {ECO:0000255}.
+FT   CARBOHYD    116    116       N-linked (GlcNAc...) asparagine.
+FT                                {ECO:0000255}.
+FT   DISULFID     54    123       {ECO:0000255|PROSITE-ProRule:PRU00114}.
+FT   VARIANT     215    215       A -> V (in dbSNP:rs2227982).
+FT                                /FTId=VAR_031685.
+FT   CONFLICT     38     38       S -> F (in Ref. 2; AAC51773).
+FT                                {ECO:0000305}.
+FT   CONFLICT    162    162       P -> S (in Ref. 1; AAC41700).
+FT                                {ECO:0000305}.
+FT   STRAND       27     29       {ECO:0000244|PDB:5WT9}.
+FT   STRAND       36     38       {ECO:0000244|PDB:5GGS}.
+FT   STRAND       40     45       {ECO:0000244|PDB:5GGS}.
+FT   STRAND       50     55       {ECO:0000244|PDB:5GGS}.
+FT   STRAND       60     70       {ECO:0000244|PDB:5GGS}.
+FT   STRAND       72     74       {ECO:0000244|PDB:4ZQK}.
+FT   STRAND       76     83       {ECO:0000244|PDB:5GGS}.
+FT   STRAND       95     99       {ECO:0000244|PDB:5GGS}.
+FT   STRAND      103    112       {ECO:0000244|PDB:5GGS}.
+FT   HELIX       115    117       {ECO:0000244|PDB:5GGS}.
+FT   STRAND      119    131       {ECO:0000244|PDB:5GGS}.
+FT   STRAND      134    136       {ECO:0000244|PDB:5GGS}.
+FT   STRAND      140    145       {ECO:0000244|PDB:5GGS}.|]
+  
+sqStr :: Text
+sqStr = [text|
+SQ   SEQUENCE   288 AA;  31647 MW;  A5210FD40C304FB7 CRC64;
+     MQIPQAPWPV VWAVLQLGWR PGWFLDSPDR PWNPPTFSPA LLVVTEGDNA TFTCSFSNTS
+     ESFVLNWYRM SPSNQTDKLA AFPEDRSQPG QDCRFRVTQL PNGRDFHMSV VRARRNDSGT
+     YLCGAISLAP KAQIKESLRA ELRVTERRAE VPTAHPSPSP RPAGQFQTLV VGVVGGLLGS
+     LVLLVWVLAV ICSRAARGTI GARRTGQPLK EDPSAVPVFS VDYGELDFQW REKTPEPPVP
+     CVPEQTEYAT IVFPSGMGTS SPARRGSADG PRSAQPLRPE DGHCSWPL|]
+
+endStr :: Text
+endStr = "//"
+
+pd1Str :: Text
+pd1Str = [text|
+ID   PDCD1_HUMAN             Reviewed;         288 AA.
+AC   Q15116; O00517; Q8IX89;
+DT   01-NOV-1997, integrated into UniProtKB/Swiss-Prot.
+DT   17-APR-2007, sequence version 3.
+DT   28-FEB-2018, entry version 163.
+DE   RecName: Full=Programmed cell death protein 1;
+DE            Short=Protein PD-1;
+DE            Short=hPD-1;
+DE   AltName: CD_antigen=CD279;
+DE   Flags: Precursor;
+GN   Name=PDCD1; Synonyms=PD1;
+OS   Homo sapiens (Human).
+OC   Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi;
+OC   Mammalia; Eutheria; Euarchontoglires; Primates; Haplorrhini;
+OC   Catarrhini; Hominidae; Homo.
+OX   NCBI_TaxID=9606;
+RN   [1]
+RP   NUCLEOTIDE SEQUENCE [GENOMIC DNA].
+RX   PubMed=7851902; DOI=10.1006/geno.1994.1562;
+RA   Shinohara T., Taniwaki M., Ishida Y., Kawaich M., Honjo T.;
+RT   "Structure and chromosomal localization of the human PD-1 gene
+RT   (PDCD1).";
+RL   Genomics 23:704-706(1994).
+RN   [2]
+RP   NUCLEOTIDE SEQUENCE [MRNA].
+RX   PubMed=9332365; DOI=10.1016/S0378-1119(97)00260-6;
+RA   Finger L.R., Pu J., Wasserman R., Vibhakar R., Louie E., Hardy R.R.,
+RA   Burrows P.D., Billips L.D.;
+RT   "The human PD-1 gene: complete cDNA, genomic organization, and
+RT   developmentally regulated expression in B cell progenitors.";
+RL   Gene 197:177-187(1997).
+RN   [3]
+RP   ERRATUM.
+RA   Finger L.R., Pu J., Wasserman R., Vibhakar R., Louie E., Hardy R.R.,
+RA   Burrows P.D., Billips L.D.;
+RL   Gene 203:253-253(1997).
+RN   [4]
+RP   NUCLEOTIDE SEQUENCE [GENOMIC DNA], AND INVOLVEMENT IN SLEB2.
+RX   PubMed=12402038; DOI=10.1038/ng1020;
+RA   Prokunina L., Castillejo-Lopez C., Oberg F., Gunnarsson I., Berg L.,
+RA   Magnusson V., Brookes A.J., Tentler D., Kristjansdottir H.,
+RA   Grondal G., Bolstad A.I., Svenungsson E., Lundberg I., Sturfelt G.,
+RA   Jonssen A., Truedsson L., Lima G., Alcocer-Varela J., Jonsson R.,
+RA   Gyllensten U.B., Harley J.B., Alarcon-Segovia D., Steinsson K.,
+RA   Alarcon-Riquelme M.E.;
+RT   "A regulatory polymorphism in PDCD1 is associated with susceptibility
+RT   to systemic lupus erythematosus in humans.";
+RL   Nat. Genet. 32:666-669(2002).
+RN   [5]
+RP   NUCLEOTIDE SEQUENCE [MRNA].
+RA   He X., Xu L., Liu Y., Zeng Y.;
+RT   "Cloning of PD-1 cDNA from activated peripheral leukocytes.";
+RL   Submitted (FEB-2003) to the EMBL/GenBank/DDBJ databases.
+RN   [6]
+RP   NUCLEOTIDE SEQUENCE [GENOMIC DNA].
+RA   Livingston R.J., Shaffer T., McFarland I., Nguyen C.P., Stanaway I.B.,
+RA   Rajkumar N., Johnson E.J., da Ponte S.H., Willa H., Ahearn M.O.,
+RA   Bertucci C., Acklestad J., Carroll A., Swanson J., Gildersleeve H.I.,
+RA   Nickerson D.A.;
+RL   Submitted (OCT-2006) to the EMBL/GenBank/DDBJ databases.
+RN   [7]
+RP   NUCLEOTIDE SEQUENCE [LARGE SCALE MRNA].
+RX   PubMed=14702039; DOI=10.1038/ng1285;
+RA   Ota T., Suzuki Y., Nishikawa T., Otsuki T., Sugiyama T., Irie R.,
+RA   Wakamatsu A., Hayashi K., Sato H., Nagai K., Kimura K., Makita H.,
+RA   Sekine M., Obayashi M., Nishi T., Shibahara T., Tanaka T., Ishii S.,
+RA   Yamamoto J., Saito K., Kawai Y., Isono Y., Nakamura Y., Nagahari K.,
+RA   Murakami K., Yasuda T., Iwayanagi T., Wagatsuma M., Shiratori A.,
+RA   Sudo H., Hosoiri T., Kaku Y., Kodaira H., Kondo H., Sugawara M.,
+RA   Takahashi M., Kanda K., Yokoi T., Furuya T., Kikkawa E., Omura Y.,
+RA   Abe K., Kamihara K., Katsuta N., Sato K., Tanikawa M., Yamazaki M.,
+RA   Ninomiya K., Ishibashi T., Yamashita H., Murakawa K., Fujimori K.,
+RA   Tanai H., Kimata M., Watanabe M., Hiraoka S., Chiba Y., Ishida S.,
+RA   Ono Y., Takiguchi S., Watanabe S., Yosida M., Hotuta T., Kusano J.,
+RA   Kanehori K., Takahashi-Fujii A., Hara H., Tanase T.-O., Nomura Y.,
+RA   Togiya S., Komai F., Hara R., Takeuchi K., Arita M., Imose N.,
+RA   Musashino K., Yuuki H., Oshima A., Sasaki N., Aotsuka S.,
+RA   Yoshikawa Y., Matsunawa H., Ichihara T., Shiohata N., Sano S.,
+RA   Moriya S., Momiyama H., Satoh N., Takami S., Terashima Y., Suzuki O.,
+RA   Nakagawa S., Senoh A., Mizoguchi H., Goto Y., Shimizu F., Wakebe H.,
+RA   Hishigaki H., Watanabe T., Sugiyama A., Takemoto M., Kawakami B.,
+RA   Yamazaki M., Watanabe K., Kumagai A., Itakura S., Fukuzumi Y.,
+RA   Fujimori Y., Komiyama M., Tashiro H., Tanigami A., Fujiwara T.,
+RA   Ono T., Yamada K., Fujii Y., Ozaki K., Hirao M., Ohmori Y.,
+RA   Kawabata A., Hikiji T., Kobatake N., Inagaki H., Ikema Y., Okamoto S.,
+RA   Okitani R., Kawakami T., Noguchi S., Itoh T., Shigeta K., Senba T.,
+RA   Matsumura K., Nakajima Y., Mizuno T., Morinaga M., Sasaki M.,
+RA   Togashi T., Oyama M., Hata H., Watanabe M., Komatsu T.,
+RA   Mizushima-Sugano J., Satoh T., Shirai Y., Takahashi Y., Nakagawa K.,
+RA   Okumura K., Nagase T., Nomura N., Kikuchi H., Masuho Y., Yamashita R.,
+RA   Nakai K., Yada T., Nakamura Y., Ohara O., Isogai T., Sugano S.;
+RT   "Complete sequencing and characterization of 21,243 full-length human
+RT   cDNAs.";
+RL   Nat. Genet. 36:40-45(2004).
+RN   [8]
+RP   NUCLEOTIDE SEQUENCE [LARGE SCALE MRNA].
+RX   PubMed=15489334; DOI=10.1101/gr.2596504;
+RG   The MGC Project Team;
+RT   "The status, quality, and expansion of the NIH full-length cDNA
+RT   project: the Mammalian Gene Collection (MGC).";
+RL   Genome Res. 14:2121-2127(2004).
+RN   [9]
+RP   NUCLEOTIDE SEQUENCE [LARGE SCALE GENOMIC DNA].
+RA   Mural R.J., Istrail S., Sutton G., Florea L., Halpern A.L.,
+RA   Mobarry C.M., Lippert R., Walenz B., Shatkay H., Dew I., Miller J.R.,
+RA   Flanigan M.J., Edwards N.J., Bolanos R., Fasulo D., Halldorsson B.V.,
+RA   Hannenhalli S., Turner R., Yooseph S., Lu F., Nusskern D.R.,
+RA   Shue B.C., Zheng X.H., Zhong F., Delcher A.L., Huson D.H.,
+RA   Kravitz S.A., Mouchard L., Reinert K., Remington K.A., Clark A.G.,
+RA   Waterman M.S., Eichler E.E., Adams M.D., Hunkapiller M.W., Myers E.W.,
+RA   Venter J.C.;
+RL   Submitted (JUL-2005) to the EMBL/GenBank/DDBJ databases.
+RN   [10]
+RP   FUNCTION.
+RX   PubMed=21276005; DOI=10.1111/j.1749-6632.2010.05919.x;
+RA   Fife B.T., Pauken K.E.;
+RT   "The role of the PD-1 pathway in autoimmunity and peripheral
+RT   tolerance.";
+RL   Ann. N. Y. Acad. Sci. 1217:45-59(2011).
+CC   -!- FUNCTION: Inhibitory cell surface receptor involved in the
+CC       regulation of T-cell function during immunity and tolerance. Upon
+CC       ligand binding, inhibits T-cell effector functions in an antigen-
+CC       specific manner. Possible cell death inducer, in association with
+CC       other factors. {ECO:0000269|PubMed:21276005}.
+CC   -!- SUBUNIT: Monomer. {ECO:0000250}.
+CC   -!- INTERACTION:
+CC       Q9NZQ7:CD274; NbExp=2; IntAct=EBI-4314328, EBI-4314282;
+CC       Q9NZQ7-1:CD274; NbExp=2; IntAct=EBI-4314328, EBI-15686469;
+CC       Q06124:PTPN11; NbExp=3; IntAct=EBI-4314328, EBI-297779;
+CC   -!- SUBCELLULAR LOCATION: Membrane; Single-pass type I membrane
+CC       protein.
+CC   -!- DEVELOPMENTAL STAGE: Induced at programmed cell death.
+CC   -!- DISEASE: Systemic lupus erythematosus 2 (SLEB2) [MIM:605218]: A
+CC       chronic, relapsing, inflammatory, and often febrile multisystemic
+CC       disorder of connective tissue, characterized principally by
+CC       involvement of the skin, joints, kidneys and serosal membranes. It
+CC       is of unknown etiology, but is thought to represent a failure of
+CC       the regulatory mechanisms of the autoimmune system. The disease is
+CC       marked by a wide range of system dysfunctions, an elevated
+CC       erythrocyte sedimentation rate, and the formation of LE cells in
+CC       the blood or bone marrow. {ECO:0000269|PubMed:12402038}.
+CC       Note=Disease susceptibility is associated with variations
+CC       affecting the gene represented in this entry.
+DR   EMBL; L27440; AAC41700.1; -; Genomic_DNA.
+DR   EMBL; U64863; AAC51773.1; -; mRNA.
+DR   EMBL; AF363458; AAN64003.1; -; Genomic_DNA.
+DR   EMBL; AY238517; AAO63583.1; -; mRNA.
+DR   EMBL; EF064716; ABK41899.1; -; Genomic_DNA.
+DR   EMBL; AK313848; BAG36577.1; -; mRNA.
+DR   EMBL; CH471063; EAW71298.1; -; Genomic_DNA.
+DR   EMBL; BC074740; AAH74740.1; -; mRNA.
+DR   CCDS; CCDS33428.1; -.
+DR   PIR; A55737; A55737.
+DR   RefSeq; NP_005009.2; NM_005018.2.
+DR   UniGene; Hs.158297; -.
+DR   PDB; 2M2D; NMR; -; A=34-150.
+DR   PDB; 3RRQ; X-ray; 2.10 A; A=32-160.
+DR   PDB; 4ZQK; X-ray; 2.45 A; B=33-150.
+DR   PDB; 5B8C; X-ray; 2.15 A; C/F/I/L=32-160.
+DR   PDB; 5GGR; X-ray; 3.30 A; Y/Z=26-150.
+DR   PDB; 5GGS; X-ray; 2.00 A; Y/Z=26-148.
+DR   PDB; 5IUS; X-ray; 2.89 A; A/B=26-146.
+DR   PDB; 5JXE; X-ray; 2.90 A; A/B=33-146.
+DR   PDB; 5WT9; X-ray; 2.40 A; G=1-167.
+DR   PDBsum; 2M2D; -.
+DR   PDBsum; 3RRQ; -.
+DR   PDBsum; 4ZQK; -.
+DR   PDBsum; 5B8C; -.
+DR   PDBsum; 5GGR; -.
+DR   PDBsum; 5GGS; -.
+DR   PDBsum; 5IUS; -.
+DR   PDBsum; 5JXE; -.
+DR   PDBsum; 5WT9; -.
+DR   ProteinModelPortal; Q15116; -.
+DR   SMR; Q15116; -.
+DR   BioGrid; 111160; 61.
+DR   DIP; DIP-44126N; -.
+DR   IntAct; Q15116; 5.
+DR   MINT; Q15116; -.
+DR   STRING; 9606.ENSP00000335062; -.
+DR   ChEMBL; CHEMBL3307223; -.
+DR   DrugBank; DB05916; CT-011.
+DR   DrugBank; DB09035; Nivolumab.
+DR   DrugBank; DB09037; Pembrolizumab.
+DR   GuidetoPHARMACOLOGY; 2760; -.
+DR   iPTMnet; Q15116; -.
+DR   PhosphoSitePlus; Q15116; -.
+DR   BioMuta; PDCD1; -.
+DR   DMDM; 145559515; -.
+DR   PaxDb; Q15116; -.
+DR   PeptideAtlas; Q15116; -.
+DR   PRIDE; Q15116; -.
+DR   DNASU; 5133; -.
+DR   Ensembl; ENST00000334409; ENSP00000335062; ENSG00000188389.
+DR   Ensembl; ENST00000618185; ENSP00000480684; ENSG00000276977.
+DR   GeneID; 5133; -.
+DR   KEGG; hsa:5133; -.
+DR   UCSC; uc002wcq.5; human.
+DR   CTD; 5133; -.
+DR   DisGeNET; 5133; -.
+DR   EuPathDB; HostDB:ENSG00000188389.10; -.
+DR   GeneCards; PDCD1; -.
+DR   H-InvDB; HIX0030684; -.
+DR   HGNC; HGNC:8760; PDCD1.
+DR   HPA; CAB038418; -.
+DR   HPA; HPA035981; -.
+DR   MalaCards; PDCD1; -.
+DR   MIM; 109100; phenotype.
+DR   MIM; 600244; gene.
+DR   MIM; 605218; phenotype.
+DR   neXtProt; NX_Q15116; -.
+DR   OpenTargets; ENSG00000188389; -.
+DR   Orphanet; 802; Multiple sclerosis.
+DR   Orphanet; 536; Systemic lupus erythematosus.
+DR   PharmGKB; PA33110; -.
+DR   eggNOG; ENOG410J26W; Eukaryota.
+DR   eggNOG; ENOG41116U6; LUCA.
+DR   GeneTree; ENSGT00390000013662; -.
+DR   HOGENOM; HOG000253959; -.
+DR   HOVERGEN; HBG053534; -.
+DR   InParanoid; Q15116; -.
+DR   KO; K06744; -.
+DR   OMA; DFQWREK; -.
+DR   OrthoDB; EOG091G0EE8; -.
+DR   PhylomeDB; Q15116; -.
+DR   TreeFam; TF336181; -.
+DR   Reactome; R-HSA-389948; PD-1 signaling.
+DR   SIGNOR; Q15116; -.
+DR   ChiTaRS; PDCD1; human.
+DR   GeneWiki; Programmed_cell_death_1; -.
+DR   GenomeRNAi; 5133; -.
+DR   PRO; PR:Q15116; -.
+DR   Proteomes; UP000005640; Chromosome 2.
+DR   Bgee; ENSG00000188389; -.
+DR   CleanEx; HS_PDCD1; -.
+DR   ExpressionAtlas; Q15116; baseline and differential.
+DR   Genevisible; Q15116; HS.
+DR   GO; GO:0009897; C:external side of plasma membrane; IEA:Ensembl.
+DR   GO; GO:0016021; C:integral component of membrane; IEA:UniProtKB-KW.
+DR   GO; GO:0005886; C:plasma membrane; TAS:Reactome.
+DR   GO; GO:0004871; F:signal transducer activity; TAS:ProtInc.
+DR   GO; GO:0006915; P:apoptotic process; TAS:ProtInc.
+DR   GO; GO:0006959; P:humoral immune response; TAS:ProtInc.
+DR   GO; GO:0007275; P:multicellular organism development; TAS:ProtInc.
+DR   GO; GO:0043066; P:negative regulation of apoptotic process; IEA:Ensembl.
+DR   GO; GO:0002644; P:negative regulation of tolerance induction; IEA:Ensembl.
+DR   GO; GO:0070234; P:positive regulation of T cell apoptotic process; IDA:UniProtKB.
+DR   GO; GO:0031295; P:T cell costimulation; TAS:Reactome.
+DR   Gene3D; 2.60.40.10; -; 1.
+DR   InterPro; IPR007110; Ig-like_dom.
+DR   InterPro; IPR036179; Ig-like_dom_sf.
+DR   InterPro; IPR013783; Ig-like_fold.
+DR   InterPro; IPR003599; Ig_sub.
+DR   InterPro; IPR013106; Ig_V-set.
+DR   Pfam; PF07686; V-set; 1.
+DR   SMART; SM00409; IG; 1.
+DR   SMART; SM00406; IGv; 1.
+DR   SUPFAM; SSF48726; SSF48726; 1.
+DR   PROSITE; PS50835; IG_LIKE; 1.
+PE   1: Evidence at protein level;
+KW   3D-structure; Apoptosis; Complete proteome; Disulfide bond;
+KW   Glycoprotein; Immunity; Immunoglobulin domain; Membrane; Polymorphism;
+KW   Reference proteome; Signal; Systemic lupus erythematosus;
+KW   Transmembrane; Transmembrane helix.
+FT   SIGNAL        1     20       {ECO:0000255}.
+FT   CHAIN        21    288       Programmed cell death protein 1.
+FT                                /FTId=PRO_0000014892.
+FT   TOPO_DOM     21    170       Extracellular. {ECO:0000255}.
+FT   TRANSMEM    171    191       Helical. {ECO:0000255}.
+FT   TOPO_DOM    192    288       Cytoplasmic. {ECO:0000255}.
+FT   DOMAIN       35    145       Ig-like V-type.
+FT   CARBOHYD     49     49       N-linked (GlcNAc...) asparagine.
+FT                                {ECO:0000255}.
+FT   CARBOHYD     58     58       N-linked (GlcNAc...) asparagine.
+FT                                {ECO:0000255}.
+FT   CARBOHYD     74     74       N-linked (GlcNAc...) asparagine.
+FT                                {ECO:0000255}.
+FT   CARBOHYD    116    116       N-linked (GlcNAc...) asparagine.
+FT                                {ECO:0000255}.
+FT   DISULFID     54    123       {ECO:0000255|PROSITE-ProRule:PRU00114}.
+FT   VARIANT     215    215       A -> V (in dbSNP:rs2227982).
+FT                                /FTId=VAR_031685.
+FT   CONFLICT     38     38       S -> F (in Ref. 2; AAC51773).
+FT                                {ECO:0000305}.
+FT   CONFLICT    162    162       P -> S (in Ref. 1; AAC41700).
+FT                                {ECO:0000305}.
+FT   STRAND       27     29       {ECO:0000244|PDB:5WT9}.
+FT   STRAND       36     38       {ECO:0000244|PDB:5GGS}.
+FT   STRAND       40     45       {ECO:0000244|PDB:5GGS}.
+FT   STRAND       50     55       {ECO:0000244|PDB:5GGS}.
+FT   STRAND       60     70       {ECO:0000244|PDB:5GGS}.
+FT   STRAND       72     74       {ECO:0000244|PDB:4ZQK}.
+FT   STRAND       76     83       {ECO:0000244|PDB:5GGS}.
+FT   STRAND       95     99       {ECO:0000244|PDB:5GGS}.
+FT   STRAND      103    112       {ECO:0000244|PDB:5GGS}.
+FT   HELIX       115    117       {ECO:0000244|PDB:5GGS}.
+FT   STRAND      119    131       {ECO:0000244|PDB:5GGS}.
+FT   STRAND      134    136       {ECO:0000244|PDB:5GGS}.
+FT   STRAND      140    145       {ECO:0000244|PDB:5GGS}.
+SQ   SEQUENCE   288 AA;  31647 MW;  A5210FD40C304FB7 CRC64;
+     MQIPQAPWPV VWAVLQLGWR PGWFLDSPDR PWNPPTFSPA LLVVTEGDNA TFTCSFSNTS
+     ESFVLNWYRM SPSNQTDKLA AFPEDRSQPG QDCRFRVTQL PNGRDFHMSV VRARRNDSGT
+     YLCGAISLAP KAQIKESLRA ELRVTERRAE VPTAHPSPSP RPAGQFQTLV VGVVGGLLGS
+     LVLLVWVLAV ICSRAARGTI GARRTGQPLK EDPSAVPVFS VDYGELDFQW REKTPEPPVP
+     CVPEQTEYAT IVFPSGMGTS SPARRGSADG PRSAQPLRPE DGHCSWPL
+//|]
+
+idAns :: ID
+idAns = ID "PDCD1_HUMAN" Reviewed 288
+
+acAns :: AC
+acAns = AC ["Q15116", "O00517", "Q8IX89"]
+
+dtAns :: DT
+dtAns = DT "01-NOV-1997" "Swiss-Prot" "17-APR-2007" 3 "28-FEB-2018" 163
+
+deAns :: DE
+deAns = DE (Just (Name "Programmed cell death protein 1" ["Protein PD-1", "hPD-1"] []))
+           [CDAntigen "CD279"] [] [] [] (Just Precursor)
+
+gnAns :: [GN]
+gnAns = [GN (Just "PDCD1") ["PD1"] [] []]
+
+osAns :: OS
+osAns = OS "Homo sapiens (Human)"
+
+ogAns :: OG
+ogAns = Plasmid ["R6-5", "IncFII R100 (NR1)", "IncFII R1-19 (R1 drd-19)"]
+
+ocAns :: OC
+ocAns = OC ["Eukaryota", "Metazoa", "Chordata", "Craniata",
+            "Vertebrata", "Euteleostomi", "Mammalia", "Eutheria",
+            "Euarchontoglires", "Primates", "Haplorrhini", "Catarrhini",
+            "Hominidae", "Homo"]
+
+ohAns :: OH
+ohAns = OH "9536" "Cercopithecus hamlyni (Owl-faced monkey) (Hamlyn's monkey)"
+
+oxAns :: OX
+oxAns = OX "NCBI_TaxID" "9606"
+
+refAns :: [Reference]
+refAns = [Reference 1 "NUCLEOTIDE SEQUENCE [GENOMIC DNA]" [] [(PubMed,"7851902"),(DOI,"10.1006/geno.1994.1562")] Nothing ["Shinohara T.","Taniwaki M.","Ishida Y.","Kawaich M.","Honjo T."] (Just "Structure and chromosomal localization of the human PD-1 gene (PDCD1).") "Genomics 23:704-706(1994)",
+          Reference 2 "NUCLEOTIDE SEQUENCE [MRNA]" [] [(PubMed,"9332365"),(DOI,"10.1016/S0378-1119(97)00260-6")] Nothing ["Finger L.R.","Pu J.","Wasserman R.","Vibhakar R.","Louie E.","Hardy R.R.","Burrows P.D.","Billips L.D."] (Just "The human PD-1 gene: complete cDNA, genomic organization, and developmentally regulated expression in B cell progenitors.") "Gene 197:177-187(1997)",
+          Reference 3 "ERRATUM" [] [] Nothing ["Finger L.R.","Pu J.","Wasserman R.","Vibhakar R.","Louie E.","Hardy R.R.","Burrows P.D.","Billips L.D."] Nothing "Gene 203:253-253(1997)",
+          Reference 4 "NUCLEOTIDE SEQUENCE [GENOMIC DNA], AND INVOLVEMENT IN SLEB2" [] [(PubMed,"12402038"),(DOI,"10.1038/ng1020")] Nothing ["Prokunina L.","Castillejo-Lopez C.","Oberg F.","Gunnarsson I.","Berg L.","Magnusson V.","Brookes A.J.","Tentler D.","Kristjansdottir H.","Grondal G.","Bolstad A.I.","Svenungsson E.","Lundberg I.","Sturfelt G.","Jonssen A.","Truedsson L.","Lima G.","Alcocer-Varela J.","Jonsson R.","Gyllensten U.B.","Harley J.B.","Alarcon-Segovia D.","Steinsson K.","Alarcon-Riquelme M.E."] (Just "A regulatory polymorphism in PDCD1 is associated with susceptibility to systemic lupus erythematosus in humans.") "Nat. Genet. 32:666-669(2002)",
+          Reference 5 "NUCLEOTIDE SEQUENCE [MRNA]" [] [] Nothing ["He X.","Xu L.","Liu Y.","Zeng Y."] (Just "Cloning of PD-1 cDNA from activated peripheral leukocytes.") "Submitted (FEB-2003) to the EMBL/GenBank/DDBJ databases",
+          Reference 6 "NUCLEOTIDE SEQUENCE [GENOMIC DNA]" [] [] Nothing ["Livingston R.J.","Shaffer T.","McFarland I.","Nguyen C.P.","Stanaway I.B.","Rajkumar N.","Johnson E.J.","da Ponte S.H.","Willa H.","Ahearn M.O.","Bertucci C.","Acklestad J.","Carroll A.","Swanson J.","Gildersleeve H.I.","Nickerson D.A."] Nothing "Submitted (OCT-2006) to the EMBL/GenBank/DDBJ databases",
+          Reference 7 "NUCLEOTIDE SEQUENCE [LARGE SCALE MRNA]" [] [(PubMed,"14702039"),(DOI,"10.1038/ng1285")] Nothing ["Ota T.","Suzuki Y.","Nishikawa T.","Otsuki T.","Sugiyama T.","Irie R.","Wakamatsu A.","Hayashi K.","Sato H.","Nagai K.","Kimura K.","Makita H.","Sekine M.","Obayashi M.","Nishi T.","Shibahara T.","Tanaka T.","Ishii S.","Yamamoto J.","Saito K.","Kawai Y.","Isono Y.","Nakamura Y.","Nagahari K.","Murakami K.","Yasuda T.","Iwayanagi T.","Wagatsuma M.","Shiratori A.","Sudo H.","Hosoiri T.","Kaku Y.","Kodaira H.","Kondo H.","Sugawara M.","Takahashi M.","Kanda K.","Yokoi T.","Furuya T.","Kikkawa E.","Omura Y.","Abe K.","Kamihara K.","Katsuta N.","Sato K.","Tanikawa M.","Yamazaki M.","Ninomiya K.","Ishibashi T.","Yamashita H.","Murakawa K.","Fujimori K.","Tanai H.","Kimata M.","Watanabe M.","Hiraoka S.","Chiba Y.","Ishida S.","Ono Y.","Takiguchi S.","Watanabe S.","Yosida M.","Hotuta T.","Kusano J.","Kanehori K.","Takahashi-Fujii A.","Hara H.","Tanase T.-O.","Nomura Y.","Togiya S.","Komai F.","Hara R.","Takeuchi K.","Arita M.","Imose N.","Musashino K.","Yuuki H.","Oshima A.","Sasaki N.","Aotsuka S.","Yoshikawa Y.","Matsunawa H.","Ichihara T.","Shiohata N.","Sano S.","Moriya S.","Momiyama H.","Satoh N.","Takami S.","Terashima Y.","Suzuki O.","Nakagawa S.","Senoh A.","Mizoguchi H.","Goto Y.","Shimizu F.","Wakebe H.","Hishigaki H.","Watanabe T.","Sugiyama A.","Takemoto M.","Kawakami B.","Yamazaki M.","Watanabe K.","Kumagai A.","Itakura S.","Fukuzumi Y.","Fujimori Y.","Komiyama M.","Tashiro H.","Tanigami A.","Fujiwara T.","Ono T.","Yamada K.","Fujii Y.","Ozaki K.","Hirao M.","Ohmori Y.","Kawabata A.","Hikiji T.","Kobatake N.","Inagaki H.","Ikema Y.","Okamoto S.","Okitani R.","Kawakami T.","Noguchi S.","Itoh T.","Shigeta K.","Senba T.","Matsumura K.","Nakajima Y.","Mizuno T.","Morinaga M.","Sasaki M.","Togashi T.","Oyama M.","Hata H.","Watanabe M.","Komatsu T.","Mizushima-Sugano J.","Satoh T.","Shirai Y.","Takahashi Y.","Nakagawa K.","Okumura K.","Nagase T.","Nomura N.","Kikuchi H.","Masuho Y.","Yamashita R.","Nakai K.","Yada T.","Nakamura Y.","Ohara O.","Isogai T.","Sugano S."] (Just "Complete sequencing and characterization of 21,243 full-length human cDNAs.") "Nat. Genet. 36:40-45(2004)",
+          Reference 8 "NUCLEOTIDE SEQUENCE [LARGE SCALE MRNA]" [] [(PubMed,"15489334"),(DOI,"10.1101/gr.2596504")] (Just "The MGC Project Team;") [] (Just "The status, quality, and expansion of the NIH full-length cDNA project: the Mammalian Gene Collection (MGC).") "Genome Res. 14:2121-2127(2004)",
+          Reference 9 "NUCLEOTIDE SEQUENCE [LARGE SCALE GENOMIC DNA]" [] [] Nothing ["Mural R.J.","Istrail S.","Sutton G.","Florea L.","Halpern A.L.","Mobarry C.M.","Lippert R.","Walenz B.","Shatkay H.","Dew I.","Miller J.R.","Flanigan M.J.","Edwards N.J.","Bolanos R.","Fasulo D.","Halldorsson B.V.","Hannenhalli S.","Turner R.","Yooseph S.","Lu F.","Nusskern D.R.","Shue B.C.","Zheng X.H.","Zhong F.","Delcher A.L.","Huson D.H.","Kravitz S.A.","Mouchard L.","Reinert K.","Remington K.A.","Clark A.G.","Waterman M.S.","Eichler E.E.","Adams M.D.","Hunkapiller M.W.","Myers E.W.","Venter J.C."] Nothing "Submitted (JUL-2005) to the EMBL/GenBank/DDBJ databases",
+          Reference 10 "FUNCTION" [] [(PubMed,"21276005"),(DOI,"10.1111/j.1749-6632.2010.05919.x")] Nothing ["Fife B.T.","Pauken K.E."] (Just "The role of the PD-1 pathway in autoimmunity and peripheral tolerance.") "Ann. N. Y. Acad. Sci. 1217:45-59(2011)"]
+
+ccAns :: [CC]
+ccAns = [CC "FUNCTION" "Inhibitory cell surface receptor involved in the regulation of T-cell function during immunity and tolerance. Upon ligand binding, inhibits T-cell effector functions in an antigen-specific manner. Possible cell death inducer, in association with other factors. {ECO:0000269|PubMed:21276005}.",
+         CC "SUBUNIT" "Monomer. {ECO:0000250}.",
+         CC "INTERACTION" "Q9NZQ7:CD274; NbExp=2; IntAct=EBI-4314328, EBI-4314282; Q9NZQ7-1:CD274; NbExp=2; IntAct=EBI-4314328, EBI-15686469; Q06124:PTPN11; NbExp=3; IntAct=EBI-4314328, EBI-297779;",
+         CC "SUBCELLULAR LOCATION" "Membrane; Single-pass type I membrane protein.",
+         CC "DEVELOPMENTAL STAGE" "Induced at programmed cell death.",
+         CC "DISEASE" "Systemic lupus erythematosus 2 (SLEB2) [MIM:605218]: A chronic, relapsing, inflammatory, and often febrile multisystemic disorder of connective tissue, characterized principally by involvement of the skin, joints, kidneys and serosal membranes. It is of unknown etiology, but is thought to represent a failure of the regulatory mechanisms of the autoimmune system. The disease is marked by a wide range of system dysfunctions, an elevated erythrocyte sedimentation rate, and the formation of LE cells in the blood or bone marrow. {ECO:0000269|PubMed:12402038}. Note=Disease susceptibility is associated with variations affecting the gene represented in this entry."]
+
+drAns :: [DR]
+drAns = [DR "EMBL" "L27440" ["AAC41700.1","-","Genomic_DNA"],
+         DR "EMBL" "U64863" ["AAC51773.1","-","mRNA"],
+         DR "EMBL" "AF363458" ["AAN64003.1","-","Genomic_DNA"],
+         DR "EMBL" "AY238517" ["AAO63583.1","-","mRNA"],
+         DR "EMBL" "EF064716" ["ABK41899.1","-","Genomic_DNA"],
+         DR "EMBL" "AK313848" ["BAG36577.1","-","mRNA"],
+         DR "EMBL" "CH471063" ["EAW71298.1","-","Genomic_DNA"],
+         DR "EMBL" "BC074740" ["AAH74740.1","-","mRNA"],
+         DR "CCDS" "CCDS33428.1" ["-"],
+         DR "PIR" "A55737" ["A55737"],
+         DR "RefSeq" "NP_005009.2" ["NM_005018.2"],
+         DR "UniGene" "Hs.158297" ["-"],
+         DR "PDB" "2M2D" ["NMR","-","A=34-150"],
+         DR "PDB" "3RRQ" ["X-ray","2.10 A","A=32-160"],
+         DR "PDB" "4ZQK" ["X-ray","2.45 A","B=33-150"],
+         DR "PDB" "5B8C" ["X-ray","2.15 A","C/F/I/L=32-160"],
+         DR "PDB" "5GGR" ["X-ray","3.30 A","Y/Z=26-150"],
+         DR "PDB" "5GGS" ["X-ray","2.00 A","Y/Z=26-148"],
+         DR "PDB" "5IUS" ["X-ray","2.89 A","A/B=26-146"],
+         DR "PDB" "5JXE" ["X-ray","2.90 A","A/B=33-146"],
+         DR "PDB" "5WT9" ["X-ray","2.40 A","G=1-167"],
+         DR "PDBsum" "2M2D" ["-"],
+         DR "PDBsum" "3RRQ" ["-"],
+         DR "PDBsum" "4ZQK" ["-"],
+         DR "PDBsum" "5B8C" ["-"],
+         DR "PDBsum" "5GGR" ["-"],
+         DR "PDBsum" "5GGS" ["-"],
+         DR "PDBsum" "5IUS" ["-"],
+         DR "PDBsum" "5JXE" ["-"],
+         DR "PDBsum" "5WT9" ["-"],
+         DR "ProteinModelPortal" "Q15116" ["-"],
+         DR "SMR" "Q15116" ["-"],
+         DR "BioGrid" "111160" ["61"],
+         DR "DIP" "DIP-44126N" ["-"],
+         DR "IntAct" "Q15116" ["5"],
+         DR "MINT" "Q15116" ["-"],
+         DR "STRING" "9606.ENSP00000335062" ["-"],
+         DR "ChEMBL" "CHEMBL3307223" ["-"],
+         DR "DrugBank" "DB05916" ["CT-011"],
+         DR "DrugBank" "DB09035" ["Nivolumab"],
+         DR "DrugBank" "DB09037" ["Pembrolizumab"],
+         DR "GuidetoPHARMACOLOGY" "2760" ["-"],
+         DR "iPTMnet" "Q15116" ["-"],
+         DR "PhosphoSitePlus" "Q15116" ["-"],
+         DR "BioMuta" "PDCD1" ["-"],
+         DR "DMDM" "145559515" ["-"],
+         DR "PaxDb" "Q15116" ["-"],
+         DR "PeptideAtlas" "Q15116" ["-"],
+         DR "PRIDE" "Q15116" ["-"],
+         DR "DNASU" "5133" ["-"],
+         DR "Ensembl" "ENST00000334409" ["ENSP00000335062","ENSG00000188389"],
+         DR "Ensembl" "ENST00000618185" ["ENSP00000480684","ENSG00000276977"],
+         DR "GeneID" "5133" ["-"],
+         DR "KEGG" "hsa:5133" ["-"],
+         DR "UCSC" "uc002wcq.5" ["human"],
+         DR "CTD" "5133" ["-"],
+         DR "DisGeNET" "5133" ["-"],
+         DR "EuPathDB" "HostDB:ENSG00000188389.10" ["-"],
+         DR "GeneCards" "PDCD1" ["-"],
+         DR "H-InvDB" "HIX0030684" ["-"],
+         DR "HGNC" "HGNC:8760" ["PDCD1"],
+         DR "HPA" "CAB038418" ["-"],
+         DR "HPA" "HPA035981" ["-"],
+         DR "MalaCards" "PDCD1" ["-"],
+         DR "MIM" "109100" ["phenotype"],
+         DR "MIM" "600244" ["gene"],
+         DR "MIM" "605218" ["phenotype"],
+         DR "neXtProt" "NX_Q15116" ["-"],
+         DR "OpenTargets" "ENSG00000188389" ["-"],
+         DR "Orphanet" "802" ["Multiple sclerosis"],
+         DR "Orphanet" "536" ["Systemic lupus erythematosus"],
+         DR "PharmGKB" "PA33110" ["-"],
+         DR "eggNOG" "ENOG410J26W" ["Eukaryota"],
+         DR "eggNOG" "ENOG41116U6" ["LUCA"],
+         DR "GeneTree" "ENSGT00390000013662" ["-"],
+         DR "HOGENOM" "HOG000253959" ["-"],
+         DR "HOVERGEN" "HBG053534" ["-"],
+         DR "InParanoid" "Q15116" ["-"],
+         DR "KO" "K06744" ["-"],
+         DR "OMA" "DFQWREK" ["-"],
+         DR "OrthoDB" "EOG091G0EE8" ["-"],
+         DR "PhylomeDB" "Q15116" ["-"],
+         DR "TreeFam" "TF336181" ["-"],
+         DR "Reactome" "R-HSA-389948" ["PD-1 signaling"],
+         DR "SIGNOR" "Q15116" ["-"],
+         DR "ChiTaRS" "PDCD1" ["human"],
+         DR "GeneWiki" "Programmed_cell_death_1" ["-"],
+         DR "GenomeRNAi" "5133" ["-"],
+         DR "PRO" "PR:Q15116" ["-"],
+         DR "Proteomes" "UP000005640" ["Chromosome 2"],
+         DR "Bgee" "ENSG00000188389" ["-"],
+         DR "CleanEx" "HS_PDCD1" ["-"],
+         DR "ExpressionAtlas" "Q15116" ["baseline and differential"],
+         DR "Genevisible" "Q15116" ["HS"],
+         DR "GO" "GO:0009897" ["C:external side of plasma membrane","IEA:Ensembl"],
+         DR "GO" "GO:0016021" ["C:integral component of membrane","IEA:UniProtKB-KW"],
+         DR "GO" "GO:0005886" ["C:plasma membrane","TAS:Reactome"],
+         DR "GO" "GO:0004871" ["F:signal transducer activity","TAS:ProtInc"],
+         DR "GO" "GO:0006915" ["P:apoptotic process","TAS:ProtInc"],
+         DR "GO" "GO:0006959" ["P:humoral immune response","TAS:ProtInc"],
+         DR "GO" "GO:0007275" ["P:multicellular organism development","TAS:ProtInc"],
+         DR "GO" "GO:0043066" ["P:negative regulation of apoptotic process","IEA:Ensembl"],
+         DR "GO" "GO:0002644" ["P:negative regulation of tolerance induction","IEA:Ensembl"],
+         DR "GO" "GO:0070234" ["P:positive regulation of T cell apoptotic process","IDA:UniProtKB"],
+         DR "GO" "GO:0031295" ["P:T cell costimulation","TAS:Reactome"],
+         DR "Gene3D" "2.60.40.10" ["-","1"],
+         DR "InterPro" "IPR007110" ["Ig-like_dom"],
+         DR "InterPro" "IPR036179" ["Ig-like_dom_sf"],
+         DR "InterPro" "IPR013783" ["Ig-like_fold"],
+         DR "InterPro" "IPR003599" ["Ig_sub"],
+         DR "InterPro" "IPR013106" ["Ig_V-set"],
+         DR "Pfam" "PF07686" ["V-set","1"],
+         DR "SMART" "SM00409" ["IG","1"],
+         DR "SMART" "SM00406" ["IGv","1"],
+         DR "SUPFAM" "SSF48726" ["SSF48726","1"],
+         DR "PROSITE" "PS50835" ["IG_LIKE","1"]]
+
+peAns :: PE
+peAns = EvidenceAtProteinLevel
+
+kwAns :: KW
+kwAns = KW ["3D-structure", "Apoptosis", "Complete proteome", "Disulfide bond",
+            "Glycoprotein", "Immunity", "Immunoglobulin domain", "Membrane", "Polymorphism",
+            "Reference proteome", "Signal", "Systemic lupus erythematosus",
+            "Transmembrane", "Transmembrane helix"]
+
+ftAns :: [FT]
+ftAns = [FT "SIGNAL"   (ExactEP 1)   (ExactEP 20)  ["{ECO:0000255}"],
+         FT "CHAIN"    (ExactEP 21)  (ExactEP 288) ["Programmed cell death protein 1","/FTId=PRO_0000014892"],
+         FT "TOPO_DOM" (ExactEP 21)  (ExactEP 170) ["Extracellular","{ECO:0000255}"],
+         FT "TRANSMEM" (ExactEP 171) (ExactEP 191) ["Helical","{ECO:0000255}"],
+         FT "TOPO_DOM" (ExactEP 192) (ExactEP 288) ["Cytoplasmic","{ECO:0000255}"],
+         FT "DOMAIN"   (ExactEP 35)  (ExactEP 145) ["Ig-like V-type"],
+         FT "CARBOHYD" (ExactEP 49)  (ExactEP 49)  ["N-linked (GlcNAc...) asparagine","{ECO:0000255}"],
+         FT "CARBOHYD" (ExactEP 58)  (ExactEP 58)  ["N-linked (GlcNAc...) asparagine","{ECO:0000255}"],
+         FT "CARBOHYD" (ExactEP 74)  (ExactEP 74)  ["N-linked (GlcNAc...) asparagine","{ECO:0000255}"],
+         FT "CARBOHYD" (ExactEP 116) (ExactEP 116) ["N-linked (GlcNAc...) asparagine","{ECO:0000255}"],
+         FT "DISULFID" (ExactEP 54)  (ExactEP 123) ["{ECO:0000255|PROSITE-ProRule:PRU00114}"],
+         FT "VARIANT"  (ExactEP 215) (ExactEP 215) ["A -> V (in dbSNP:rs2227982)","/FTId=VAR_031685"],
+         FT "CONFLICT" (ExactEP 38)  (ExactEP 38)  ["S -> F (in Ref. 2; AAC51773)","{ECO:0000305}"],
+         FT "CONFLICT" (ExactEP 162) (ExactEP 162) ["P -> S (in Ref. 1; AAC41700)","{ECO:0000305}"],
+         FT "STRAND"   (ExactEP 27)  (ExactEP 29)  ["{ECO:0000244|PDB:5WT9}"],
+         FT "STRAND"   (ExactEP 36)  (ExactEP 38)  ["{ECO:0000244|PDB:5GGS}"],
+         FT "STRAND"   (ExactEP 40)  (ExactEP 45)  ["{ECO:0000244|PDB:5GGS}"],
+         FT "STRAND"   (ExactEP 50)  (ExactEP 55)  ["{ECO:0000244|PDB:5GGS}"],
+         FT "STRAND"   (ExactEP 60)  (ExactEP 70)  ["{ECO:0000244|PDB:5GGS}"],
+         FT "STRAND"   (ExactEP 72)  (ExactEP 74)  ["{ECO:0000244|PDB:4ZQK}"],
+         FT "STRAND"   (ExactEP 76)  (ExactEP 83)  ["{ECO:0000244|PDB:5GGS}"],
+         FT "STRAND"   (ExactEP 95)  (ExactEP 99)  ["{ECO:0000244|PDB:5GGS}"],
+         FT "STRAND"   (ExactEP 103) (ExactEP 112) ["{ECO:0000244|PDB:5GGS}"],
+         FT "HELIX"    (ExactEP 115) (ExactEP 117) ["{ECO:0000244|PDB:5GGS}"],
+         FT "STRAND"   (ExactEP 119) (ExactEP 131) ["{ECO:0000244|PDB:5GGS}"],
+         FT "STRAND"   (ExactEP 134) (ExactEP 136) ["{ECO:0000244|PDB:5GGS}"],
+         FT "STRAND"   (ExactEP 140) (ExactEP 145) ["{ECO:0000244|PDB:5GGS}"]]
+
+sqAns :: SQ
+sqAns = SQ 288 31647 "A5210FD40C304FB7"
+           "MQIPQAPWPVVWAVLQLGWRPGWFLDSPDRPWNPPTFSPALLVVTEGDNATFTCSFSNTSESFVLNWYRMSPSNQTDKLAAFPEDRSQPGQDCRFRVTQLPNGRDFHMSVVRARRNDSGTYLCGAISLAPKAQIKESLRAELRVTERRAEVPTAHPSPSPRPAGQFQTLVVGVVGGLLGSLVLLVWVLAVICSRAARGTIGARRTGQPLKEDPSAVPVFSVDYGELDFQWREKTPEPPVPCVPEQTEYATIVFPSGMGTSSPARRGSADGPRSAQPLRPEDGHCSWPL"
+
+endAns :: ()
+endAns = ()
+
+main :: IO ()
+main = hspec $ do
+    describe "Parse individual sections" $ do
+      it "parses ID lines" $
+        parseOnly parseID idStr `shouldBe` Right idAns
+      it "parses AC lines" $ 
+        parseOnly parseAC acStr `shouldBe` Right acAns
+      it "parses DT lines" $
+        parseOnly parseDT dtStr `shouldBe` Right dtAns
+      it "parses DE lines" $
+        parseOnly parseDE deStr `shouldBe` Right deAns
+      it "parses GN lines" $
+        parseOnly parseGN gnStr `shouldBe` Right gnAns
+      it "parses OS lines" $
+        parseOnly parseOS osStr `shouldBe` Right osAns
+      it "parses OG lines (non-PD1)" $
+        parseOnly parseOG ogStr `shouldBe` Right ogAns
+      it "parses OC lines" $
+        parseOnly parseOC ocStr `shouldBe` Right ocAns
+      it "parses OX lines (non-PD1)" $
+        parseOnly parseOX oxStr `shouldBe` Right oxAns
+      it "parses OH lines (non-PD1)" $
+        parseOnly parseOH ohStr `shouldBe` Right ohAns
+      it "parses REF lines" $ do
+        let parseManyRef = (:) <$> parseRef <*> many' (endOfLine *> parseRef)
+        parseOnly parseManyRef refStr `shouldBe` Right refAns
+      it "parses CC lines" $ do
+        let parseManyCC = (:) <$> parseCC <*> many' (endOfLine *> parseCC)
+        parseOnly parseManyCC ccStr `shouldBe` Right ccAns
+      it "parses DR lines" $ do
+        let parseManyDR = (:) <$> parseDR <*> many' (endOfLine *> parseDR)
+        parseOnly parseManyDR drStr `shouldBe` Right drAns
+      it "parses PE lines" $
+        parseOnly parsePE peStr `shouldBe` Right peAns
+      it "parses KW lines" $
+        parseOnly parseKW kwStr `shouldBe` Right kwAns
+      it "parses FT lines" $ do
+        let parseManyFT = (:) <$> parseFT <*> many' (endOfLine *> parseFT)
+        parseOnly parseManyFT ftStr `shouldBe` Right ftAns
+      it "parses SQ lines" $ do
+        parseOnly parseSQ sqStr `shouldBe` Right sqAns
+      it "parses End lines" $
+        parseOnly parseEnd endStr `shouldBe` Right endAns
+    describe "Parse Record" $ do
+      it "parses PD1 example" $ do
+        let record = Record idAns acAns dtAns deAns
+                            gnAns osAns Nothing ocAns
+                            (Just oxAns) [] refAns ccAns
+                            drAns peAns kwAns ftAns sqAns
+        parseOnly parseRecord pd1Str `shouldBe` Right record
diff --git a/uniprot-kb.cabal b/uniprot-kb.cabal
new file mode 100644
--- /dev/null
+++ b/uniprot-kb.cabal
@@ -0,0 +1,61 @@
+-- This file has been generated from package.yaml by hpack version 0.20.0.
+--
+-- see: https://github.com/sol/hpack
+--
+-- hash: 35141853a683c97f0604c324c743203061f6bba440e50259a2f29dcc8d8825cc
+
+name:           uniprot-kb
+version:        0.1.0.0
+synopsis:       UniProt-KB format parser
+description:    Specification implementation of https://web.expasy.org/docs/userman.html
+category:       Bio
+homepage:       https://github.com/biocad/uniprot-kb#readme
+bug-reports:    https://github.com/biocad/uniprot-kb/issues
+author:         Pavel Yakovlev
+maintainer:     pavel@yakovlev.me
+copyright:      Pavel Yakovlev
+license:        BSD3
+license-file:   LICENSE
+build-type:     Simple
+cabal-version:  >= 1.10
+
+extra-source-files:
+    ChangeLog.md
+    README.md
+
+source-repository head
+  type: git
+  location: https://github.com/biocad/uniprot-kb
+
+library
+  hs-source-dirs:
+      src
+  build-depends:
+      attoparsec >=0.10 && <0.14
+    , base >=4.7 && <5
+    , text >=0.2 && <1.3
+  exposed-modules:
+      Bio.Uniprot
+      Bio.Uniprot.Parser
+      Bio.Uniprot.Type
+  other-modules:
+      Paths_uniprot_kb
+  default-language: Haskell2010
+
+test-suite uniprot-kb-test
+  type: exitcode-stdio-1.0
+  main-is: Spec.hs
+  hs-source-dirs:
+      test
+  ghc-options: -threaded -rtsopts -with-rtsopts=-N
+  build-depends:
+      QuickCheck >=2.9 && <2.12
+    , attoparsec
+    , base >=4.7 && <5
+    , hspec >=2.4.1 && <2.6
+    , neat-interpolation >=0.3
+    , text >=0.2 && <1.3
+    , uniprot-kb
+  other-modules:
+      Paths_uniprot_kb
+  default-language: Haskell2010
