Skip to main content

A simple pythonic interface to biomart.

Project description

https://travis-ci.org/jrderuiter/pybiomart.svg?branch=develop https://coveralls.io/repos/github/jrderuiter/pybiomart/badge.svg?branch=develop

A simple and pythonic biomart interface for Python.

The intent of pybiomart is to provide a simple interface to biomart, which can be used to easily query biomart databases from Python. In this sense, pybiomart aims to provide functionality similar to packages such as biomaRt (which provides access to biomart from R).

Documentation

Documentation is available at: https://jrderuiter.github.io/pybiomart.

Examples

Retrieving and querying a dataset using the server interface:

from pybiomart import Server

server = Server(host='http://www.ensembl.org')

dataset = (server.marts['ENSEMBL_MART_ENSEMBL']
                 .datasets['hsapiens_gene_ensembl'])

dataset.query(attributes=['ensembl_gene_id', 'external_gene_name'],
              filters={'chromosome_name': ['1','2']})

Retrieving a dataset directly with known dataset name:

from pybiomart import Dataset

dataset = Dataset(name='hsapiens_gene_ensembl',
                  host='http://www.ensembl.org')

dataset.query(attributes=['ensembl_gene_id', 'external_gene_name'],
              filters={'chromosome_name': ['1','2']})

License

Released under the MIT license.

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

pybiomart-0.2.0.tar.gz (195.8 kB view hashes)

Uploaded source

Built Distributions

pybiomart-0.2.0-py3-none-any.whl (10.6 kB view hashes)

Uploaded py3

pybiomart-0.2.0-py2-none-any.whl (10.6 kB view hashes)

Uploaded py2

Supported by

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