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 https://readthedocs.org/projects/pip/badge/?version=stable

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

Detailed documentation is available at: https://pybiomart.readthedocs.org.

Examples

Retrieving and querying a dataset using the server interace:

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']})

Installation

The source code is currently hosted on GitHub at: https://github.com/jrderuiter/pybiomart.

The package can be installed from pypi via pip:

pip install pybiomart

The development version can be installed from GitHub:

pip install git+https://github.com/jrderuiter/pybiomart.git#egg=pybiomart

Dependencies

  • Python 3.3+, Python 2.7

  • future, pandas, requests, requests-cache

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.1.tar.gz (24.9 kB view details)

Uploaded Source

File details

Details for the file pybiomart-0.1.tar.gz.

File metadata

  • Download URL: pybiomart-0.1.tar.gz
  • Upload date:
  • Size: 24.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pybiomart-0.1.tar.gz
Algorithm Hash digest
SHA256 498a0f82588432cce6f34503c86aa6b4829f43e77ffa103341ae9c5909be744a
MD5 66beacaec55731ac76bb66b14a8a88e7
BLAKE2b-256 5b1da990243ca4e3dc1109886b9f57c4347e67015abe5e661c865ef265f8faaa

See more details on using hashes here.

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