API — immunedb.api


This documentation is still in-the-works and is incomplete.

REST Interface — immunedb.api.rest_service

The REST interface is a miniature HTTP server which serves JSON stanzas based on the requested URL. For example, requesting /api/studies will provide a list of all studies in the database.

The primary use of this is to provide an API for AJAX requests from a web-interface to the sequence database without the need for writing SQL.

The immunedb.api.rest_service directly handles incoming connections using gevent, parses the URL and then calls the required functions in immunedb.api.queries.

class immunedb.api.rest_service.EnableCors

A class to enable Cross-Origin Resource Sharing to facilitate AJAX requests.

Queries — immunedb.api.queries

immunedb.api.queries.get_clone_overlap(session, sample_ids, filter_type, paging=None, all_clones_cache=[], query_cache=OrderedDict(), max_cache_size=5)

Gets a list of clones and the samples in samples which they appear

immunedb.api.queries.get_clones(session, filters, order_field, order_dir, subject_limit=None, paging=None)

Gets a list of all clones

immunedb.api.queries.get_sequences(session, filters, order_field, order_dir, subject_id=None, paging=None)

Gets a list of all clones

immunedb.api.queries.get_v_usage(session, samples, filter_type, include_outliers, include_partials, grouping, by_family)

Gets the V-Gene usage percentages for samples