This is a toolkit to handle variant and clinical data (see variant classes). Web accessions are included through the webapi class for
- ClinicalTrials.gov
- NCBI Entrez services
- Ensembl ReST API
- ExAC (Harvard) ReST API
The webapi parent class can be used to more easily create classes for other URL-based web services as well.
The variant classes can be used independently of the webapi's, and they include many useful functions to conform to HGVS variant representations. The BioMine toolkit is used in other software, such as CharGer.
This package works with Python 2.7. To install:
pip install .
All dependencies should automatically install.
Please be aware of site's crawler limitations (robots.txt) & rate limitations when creating new classes for web services. Failure to do so can result in IP banning or denial of service.
Parent class of the included ReST APIs, web services, and HTML
site = webAPI.webAPI( "https://github.com/" , "AdamDS/" )
site.action = "WebAPIs"
site.submit()
page = site.parseHTMLResponse()
readme = page.getElementById( 'readme' )
print readme.innerHTML
Based on ClinicalTrials.gov
Based on NCBI's Entrez Programming Utilities (E-utilities)
returns requests response object
returns requests response object
Based on NCBI's Power User Gateway for PubChem
returns tab delimited string (searched compound '\t' synonym)
returns tab delimited array (searched compound '\t' synonym)
no return
Based on Ensembl's VEP annotator
Switch to GRCh37 or GRCh38
tab delimited annotation as: HGVS notation, chr, start, stop, ref, var, strand, classification
returns request response as JSONP
returns dictionary with tsv annotation and error message
returns dictionary with tsv annotation and error message
returns dictionary of HGVS notated mutations (key)/ response as JSONP (values)
returns dictionary with tsv annotations and error messages
returns dictionary with tsv annotations and error messages
no return
Based on [ExAC Browser Beta](exac.broadinstitute.org/)
returns a number of the given variant