Lung Genome Browser Application Programming Interface (API)

The Lung Genome Browser API provides programmatic access to Lung Genome Browser portal and drives data query and submission functionality. The Lung Genome Browser API uses JSON and standard HTTP verbs for communication with the portal.

There are several third-party tools that can be used with Lung Genome Browser REST API, we have tested following tools that can be used for communicating with our portal:

 

Tools

 Description

 JSON Formatter

 Web browser plugin for Safari

 JSONVIEW

 Web browser plugin for Chrome and Firefox

 Restlet

 Web browser plugin for Chrome

 Curl

 Command line tool

 Postman REST Client

 Tool for API development

 

Lung Genome Browser Accession Ids

Every object (e.g., experiment, annotation, biosamples, antibodies, data file etc.) have unique accession LEBXXXXXXXX ids. API request – response can be made to retrieve specific individual, group or mashup of these objects. Search and Retrieval Examples Web browser JSON pretty-printer plugin JSON pretty-printer plugin for web browser can be used to view page as JSON. In order to view page as JSON add ?format=json to the URL

Example: To request metadata for annotation LEBSR746OCY:

https://www.lungepigenome.org/annotations/LEBSR746OCY/?format=json

 

Curl

Prerequisite:  json.tool provides command line interface to validate and pretty-print JSON

Installation for OS X and Linux:

$ pip install jsontool

The following is an example of a request to annotation endpoint using annotation id, that retrieves annotation metadata:

$ curl –L -H "Accept: application/json" https://www.lungepigenome.org/search/?searchTerm=single-nuclei+ATAC-seq | python -m json.tool > snATAC

 

Programmatic access to metadata

T2DREAM_metadata_access.py script abstracts the GET request for metadata retrieval. It takes metadata type and accession id and returns metadata in JSON format.

The following metadata endpoints are available from Diabetes Epienome Atlas API to access metadata programmatically

 

 Metadata End points (--type)

 Description

experiment

 Includes assay metadata, replicate information and data files

annotation

 Metadata for an annotation set

files

 Metadata for a data file (e.g., fastq, bigwig, bed, bam, bigBed,  tagAlign, sra)

biosamples

 Metadata for biosamples

antibodies Metadata for antibodies
target metadata for target gene

 

 

The REST-API codebase is available on  Diabetes Genome Atlas REST API GitHub Repository

Prerequisite: python modules - argparse , json, requests