| CARVIEW |
Select Language
HTTP/1.1 200 OK
Connection: keep-alive
Server: nginx/1.24.0 (Ubuntu)
Content-Type: text/html; charset=utf-8
Cache-Control: public, max-age=300
Content-Encoding: gzip
Via: 1.1 varnish, 1.1 varnish
Accept-Ranges: bytes
Age: 0
Date: Sat, 17 Jan 2026 07:24:25 GMT
X-Served-By: cache-dfw-kdal2120107-DFW, cache-bom-vanm7210051-BOM
X-Cache: MISS, MISS
X-Cache-Hits: 0, 0
X-Timer: S1768634665.023271,VS0,VE289
Vary: Accept, Accept-Encoding
transfer-encoding: chunked
uniprot-kb: UniProt-KB format parser
uniprot-kb: UniProt-KB format parser
Downloads
- uniprot-kb-0.1.2.0.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 0.1.0.0, 0.1.0.1, 0.1.1.0, 0.1.1.1, 0.1.1.2, 0.1.2.0 |
|---|---|
| Change log | ChangeLog.md |
| Dependencies | attoparsec (>=0.10 && <0.14), base (>=4.7 && <5), text (>=0.2 && <1.3) [details] |
| License | BSD-3-Clause |
| Copyright | Pavel Yakovlev |
| Author | Pavel Yakovlev |
| Maintainer | pavel@yakovlev.me |
| Uploaded | by zmactep at 2018-04-26T12:53:39Z |
| Revised | Revision 4 made by zmactep at 2019-04-16T10:28:19Z |
| Category | Bio |
| Home page | https://github.com/biocad/uniprot-kb#readme |
| Bug tracker | https://github.com/biocad/uniprot-kb/issues |
| Source repo | head: git clone https://github.com/biocad/uniprot-kb |
| Distributions | |
| Reverse Dependencies | 1 direct, 0 indirect [details] |
| Downloads | 3318 total (28 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating |
|
| Status | Docs available [build log] Last success reported on 2018-04-29 [all 1 reports] |
Readme for uniprot-kb-0.1.2.0
[back to package description]uniprot-kb
A well-typed UniProt file format parser.
Documentation
To build Haddock documentation run:
$ stack haddock
Usage example
You can use this simple code to parse any UniProt file:
import Bio.Uniprot
import Data.Attoparsec.Text (parseOnly)
import Data.Text (Text)
import qualified Data.Text.IO as TIO
import Text.Pretty.Simple (pPrint)
main :: IO ()
main = do
uniprot <- TIO.getContents
case parseOnly parseRecord uniprot of
Left err -> putStrLn "Error on parse"
Right obj -> pPrint obj
So you can parse any stdin Text of UniProt by using parseRecord function. The result will be presented by
a Record datatype:
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)
You can run this to test the implementation:
stack runhaskell uniprot.hs < example/LOLA2_DROME.dat