Skip to main content

Seamlessly integrate R packages in Python by allowing intuitive importing and providing opinionated data type conversion functions.

Project description

r_wrapper

pypi version license

Warning: still highly experimental and likely to break.

Seamlessly integrate R packages in Python by allowing intuitive importing and providing opinionated data type conversion functions.

Installation

pip install r_wrapper

Usage

For example, accessing biomaRt can be as simple as follows:

from r_wrapper import biomaRt

snp_list = ['rs7329174', 'rs4948523', 'rs479445']
ensembl = biomaRt.useMart('ENSEMBL_MART_SNP', dataset='hsapiens_snp')

df = biomaRt.getBM(
    attributes=['refsnp_id', 'chr_name', 'chrom_start', 'consequence_type_tv'],
    filters='snp_filter', values=snp_list, mart=ensembl)

Check the r_wrapper/tests/ directory for more examples showing how to rewrite R scripts in Python.

Tests

A comprehensive test suite aims at providing stability and avoiding regressions. The examples in r_wrapper/tests/ are validated using pytest.

Run tests as follows:

$ pytest r_wrapper/

Project details


Download files

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

Files for r-wrapper, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size r_wrapper-0.0.2-py3-none-any.whl (9.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size r_wrapper-0.0.2.tar.gz (6.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page