Skip to main content

Python API that consumes the biomart webservice

Project description

Python API that consumes the biomart webservice.

What it will do:

  • Show all databases of a biomart server

  • Show all datasets of a biomart database

  • Show attributes and filters of a biomart dataset

  • Run your query formatted as a Python dict.

What it won’t do:

  • Process and return the results as JSON,XML,etc. It will only return the Biomart response as TSV format.

Usage

Select a dataset

from biomart import BiomartDataset

interpro = BiomartDataset( "http://www.biomart.org/biomart", {'name': 'entry'} )

Use proxy

import os
interpro.http_proxy = os.environ.get('http_proxy', 'http://my_http_proxy.org')

Run query: Give me the name and abstract of interpro entry IPR027603

response = interpro.search({
  'filters': {
      'entry_id': 'IPR027603',
  },
  'attributes': [
      'entry_name', 'abstract'
  ]
})

# Returned format is TSV
for line in response.iter_lines():
  print line.split("\t")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

biomart-0.2.0.tar.gz (4.7 kB view details)

Uploaded Source

File details

Details for the file biomart-0.2.0.tar.gz.

File metadata

  • Download URL: biomart-0.2.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for biomart-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d6688f09b3f3bcb4aab4679fca3d0cccd86a6df35df32726312f5a79dc76b9cf
MD5 f15c95f298127f705834fcf1d42af86a
BLAKE2b-256 b89cbe129bb42ff7cf5ef89fb2df6b8f7847060e6c73f0b0a6835a184441e4aa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page