Skip to main content

A Python client library and command line interface to the Varda database for genomic variation frequencies

Project description

A Python client library and command line interface to the Varda database for genomic variation frequencies.

Warning: This is a work in progress, probably not yet ready for use!

Description

Manwë is a Python client library for communicating with a Varda server. The intent of Manwë is to offer the complete Varda API, but on an abstraction level that is nice to work with from Python code.

>>> import manwe
>>> session = manwe.Session()
>>> user = session.add_user('testlogin', 'password')
>>> user.uri
'/users/1'
>>> user.dirty
False
>>> user.name = 'Test User'
>>> user.dirty
True
>>> user.save()
>>> user.dirty
False
>>> for sample in session.samples(user=user):
...     print sample.name
Sample 1
My Second Sample
Another Sample

Additionally, a simple command line client is built on top of the library that can be used to run tasks from the command line, such as creating users and importing samples. It is non-interactive and therefore suitable for use from existing scripts and pipelines.

manwe import-sample 'Test' --vcf snps.vcf indels.vcf --bed coverage.bed

Communication with Varda is done using the Requests library.

Running Manwë

Install the requirements listed in requirements.txt:

$ pip install -r requirements.txt

You can now run the client directly like this:

$ python -m manwe.commands -h

Or install Manwë to have it available globally:

$ python setup.py install
$ manwe -h

Documentation

Todo (surprise, surprise).

Some autogenerated API reference documentation however is hosted at Read The Docs, or can be built directly from the sources in the doc directory.

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

manwe-0.1.0.tar.gz (14.3 kB view hashes)

Uploaded Source

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