annoPipeline - an API-enabled gene annotation pipeline
annoPipeline uses APIs from mygene.info and Entrez esummary to annotate a user-provided list of gene symbols.
Generates a pandas DataFrame with gene symbol, gene name, EntrezID, and bibliographic info for up to 5 pubmed publications where a functional reference was provided (more about functional references at GeneRIF).
Designed to be useful for tasks such as:
- identifying relevant publications for a given function
- analyzing publications trends for genes belonging to a common pathway
- identifying influential PIs for a given gene network.
Reqirements:
-
Written for use with Python 3.7, not tested on other versions.
-
annoPipeline requires:
- numpy >= 1.16.2
- pandas >= 0.24.2
- Biopython >= 1.73
- openpyxl >= 2.6.1
- requests >= 2.21.0
To Install:
pip install annoPipeline
Or clone the repo from github. Then, in the annoPipeline directory, run:
python setup.py install
Required dependencies will be installed if missing, may take a few seconds.
Example usage:
Execute the full annotation pipeline on a list of gene symbols like this:
import annoPipeline as ap
# define a list of genes you would like annotated
geneList = ['CDK2', 'FGFR1', 'SLC6A4']
# annoPipeline will execute full annotation pipeline (see individual functions below).
df = ap.annoPipeline(geneList) # returns pandas df with annotations for gene and bibliographic info.
- ap.annoPipeline will default save annotation output to Excel file named by geneList symbols separated by '_'.
Warning!
If querying a single gene, still pass as a list. For example:
import annoPipeline as ap
df = ap.annoPipeline(['CDK2']) # for single gene queries still include [] - will be fixed in later version
v0.0.1 Functionality
Task 1:
- From the MyGeneInfo API, use the “Gene query service" GET method to return details on a given list of human gene symbols.
- From the returned json, parse out the “name", “symbol" and “entrezgene" values and print to screen
Use queryGenes():
import annoPipeline as ap
geneList = ['CDK2', 'FGFR1', 'SLC6A4']
l1 = ap.queryGenes(geneList) # returns list of dicts where keys are default mygene fields (symbol,name,taxid,entrezgene,ensemblgene)
Task 2:
- Using the appropriate identifier from the above result, send a query to the MyGeneInfo “Gene annotation services" method for each gene
- From the resulting json, collate up to 5 generif descriptions per gene
- Write the results to an Excel spreadsheet with columns: gene_symbol, gene_name, entrez_id, generifs
Use getAnno():
import annoPipeline as ap
geneList = ['CDK2', 'FGFR1', 'SLC6A4']
l1 = ap.queryGenes(geneList)
l2 = ap.getAnno(l1, saveExcel=True) # saveExcel defaults False
- returns pandas df with genes and up to 5 generifs from mygene.info.
- default saveExcel=False, to save output to Excel must state True
- if True, Excel file will be named by geneList symbols separated by '_'.
Task 3:
- Use the Pubmed IDs associated with the above generif content to extract additional bibliographic information.
Use addBibs():
import annoPipeline as ap
geneList = ['CDK2', 'FGFR1', 'SLC6A4']
l1 = ap.queryGenes(geneList)
l2 = ap.getAnno(l1)
l3 = ap.addBibs(l2) # will return df with genes and up to 5 generifs from mygene.info
- Currently returns the following bibliographic information when available:
- PubDate
- Source
- Title
- LastAuthor
- DOI
- PmcRefCount
Metadata
Release files for annoPipeline 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| annoPipeline-0.0.1.tar.gz | 5.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| annoPipeline-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.9 kB
Release files / annoPipeline-0.0.1.tar.gz
| Download URL | annoPipeline-0.0.1.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ed4d17e48eadb908f76c06839ab27670250e11686d1602b4820882cacc58ea00
|
|
BLAKE2b-256 checksum How to use checksums |
fdab578fb6f6863f06729d45184ea985778d9848a503518f9c2356773aa91002
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|
Release files / annoPipeline-0.0.1-py3-none-any.whl
| Download URL | annoPipeline-0.0.1-py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a60b89c80a1c1144c0587e1f3f1766ce8afaf432229f2fe30a276610c18516b1
|
|
BLAKE2b-256 checksum How to use checksums |
135a6045cf8ff00ba2299465ce3f171cddf70552025a2afef020c768b8ac6784
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|
Security for annoPipeline 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.