Structured Python interface to NCBI E-Utilities.
Project description
eutils is a Python package dedicated to searching for, fetching, and parsing records from NCBI using their E-utilities interface.
STATUS: This code is alpha. There are no known bugs, but the code supports only a limited subset of E-Utilities replies
Features
optional sqlite-based caching of compressed replies
automatic throttling
simple Pythonic interface for searching and fetching
“façades” over XML from replies provide access to essential attributes
A Quick Example
In [1]: import eutils.client In [2]: esr = ec.esearch(db='gene',term='tumor necrosis factor') In [3]: gb = ec.efetch(db='gene',id=esr.ids[0]) In [4]: gb.locus, gb.maploc, gb.description, gb.type Out[4]: ('TP53', '17p13.1', 'tumor protein p53', 'protein-coding') In [5]: [ str(r) for r in gb.references ] Out[5]: ['GeneCommentary(acv=NC_000017.10,type=genomic,heading=Reference GRCh37.p13 Primary Assembly,label=chromosome 17 reference GRCh37.p13 Primary Assembly)', 'GeneCommentary(acv=NG_017013.2,type=genomic,heading=Reference assembly,label=RefSeqGene)', 'GeneCommentary(acv=NC_018928.2,type=genomic,heading=Alternate CHM1_1.1,label=chromosome 17 alternate CHM1_1.1)', 'GeneCommentary(acv=AC_000149.1,type=genomic,heading=Alternate HuRef,label=chromosome 17 alternate HuRef)'] In [6]: gb.references[0].acv Out[6]: 'NC_000017.10' In [7]: gb.references[0].products[0].acv Out[7]: 'NM_001126112.2' In [8]: gb.references[0].products[0].genomic_coords.strand Out[8]: -1 In [9]: gb.references[0].products[0].genomic_coords.intervals Out[9]: [(7590694, 7590868), (7579838, 7579937), (7579699, 7579721), (7579311, 7579590), (7578370, 7578554), (7578176, 7578289), (7577498, 7577608), (7577018, 7577155), (7576852, 7576926), (7573926, 7574033), (7571719, 7573008)]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
eutils-0.0.3.tar.gz
(199.8 kB
view details)
Built Distribution
eutils-0.0.3-py2.7.egg
(35.5 kB
view details)
File details
Details for the file eutils-0.0.3.tar.gz
.
File metadata
- Download URL: eutils-0.0.3.tar.gz
- Upload date:
- Size: 199.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31efe5764fae0ab6b2ef4cd4faa431caed4ced01ccf5c41c3dc87a8fe2c3ac67 |
|
MD5 | b14a5cd9dae8eebafce00f41a82faa24 |
|
BLAKE2b-256 | 074dae4a7c5438c81b387bab871e40c143f0c6fef307db6d5711428d888ebe4c |
File details
Details for the file eutils-0.0.3-py2.7.egg
.
File metadata
- Download URL: eutils-0.0.3-py2.7.egg
- Upload date:
- Size: 35.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99f0ae17a54c1185519a79679ced263131bcea174da9f2a32dbddbe7286a0759 |
|
MD5 | 4922696f96e348e7e5786bd166eee2aa |
|
BLAKE2b-256 | 2033d6d1c3e89915b8379671afa506db04509adf958295379a83d33aae863801 |