app/views/static/api.html.haml
#notice= notice
=content_for :title do
=tx "title"
=content_for :header do
%h2
=tx 'title_main'
%small=tx 'title_small'
-cache do
.row
.span3#navbar{style: "float: left; display: block; font-size: 14px; box-sizing: border-box;"}
#api-sidebar.well.affix{style: "min-height: 20px; padding: 19px; margin-bottom: 20px; display: block;"}
%ul.nav.nav-list{style: "padding-left: 15px; padding-right: 15px; margin-bottom: 0px; margin-left: 0px; display: block; line-height: 20px;"}
%li.nav-header Introduction
%li.nav-header Endpoints
%li
%a{href: '#interactions'} Interactions
%ul
%li
%a{href: '#search-interactions'} Search Interactions
%li
%a{href: '#all-interactions'} All Interactions
%li
%a{href: '#one-interaction'} Interaction Details
%li
%a{href: '#drugs'} Drugs
%ul
%li
%a{href: '#all-drugs'} All Drugs
%li
%a{href: '#one-drug'} Drug Details
%li
%a{href: '#genes'} Genes
%ul
%li
%a{href: '#all-genes'} All Genes
%li
%a{href: '#one-gene'} Gene Details
%li
%a{href: '#interaction-types'} Interaction Types
%li
%a{href: '#interaction-sources'} Interaction Sources
%li
%a{href: '#gene-categories'} Gene Categories
%li
%a{href: '#source-trust-levels'} Source Trust Levels
/
%li
%a{href: '#related-genes'} Related Genes
%li
%a{href: '#genes-in-category'} Genes in Category
%li.divider
%li.nav-header Responses
%li
%a{href: '#formats'}Formats
%li
%a{href: '#status-codes'}Status Codes
%li.divider
%li.nav-header Sample Code
%li
%a{href: '#perl-sample'}Perl
%li
%a{href: '#python-sample'}Python
%li
%a{href: '#ruby-sample'}Ruby
%li
%a{href: '#shell-sample'}Shell
%li.divider
.span9{style: "float: left; width: 70%; margin-left: 20px; display: block;"}
%h2 Introduction
%p
The DGIdb API can be used to query for drug-gene interactions in your own applications
through a simple JSON based interface.
%p
All endpoints can be reached at:
%code https://dgidb.org
%p
Documentation for v1 of the API (deprecated) can be found
=link_to 'here.', 'api_v1'
.page-header
%section
%h2
Endpoints
%small available API method calls
%section#interactions.anchor
%h3 Interactions
%section#search-interactions.anchor
%h4 Search Interactions
%p.lead
The interactions endpoint can be used to return
interactions for a given set of gene or drug names/symbols.
It also allows you to filter returned interactions.
%span.label GET
%pre
\/api/v2/interactions.json?<parameters>
%p
%small
%span.label.label-info Note:
While the preferred method for accessing this endpoint is a
%code GET
request, it will also accept
%code POST
requests to accommodate large gene lists if needed.
%h5 Accepted Parameters:
%table.table.table-bordered.table-striped
%thead
%tr
%td Parameter
%td Description
%td Example
%tbody
%tr
%td
genes / drugs
%small (required)
%td A comma delimited list of gene or drug names/symbols.
%td
%code genes=FLT1,STK1,FAKE1
%em or
%code drugs=FICLATUZUMAB,ETOPOSIDE,NOTREAL
%tr
%td
interaction_sources
%small (optional)
%td
A comma delimited list of source names to include in the result set.
If this field is omitted, all sources will be included.
%td
%code interaction_sources=TTD,DrugBank
%tr
%td
interaction_types
%small (optional)
%td
A comma delimited list of interaction types to include in the result set.
If this field is omitted, all interaction types will be included.
%td
%code interaction_types=inhibitor,activator
%tr
%td
fda_approved_drug
%small (optional)
%td
A flag denoting whether or not to limit interactions to only the ones involving fda-approved drugs.
If this field is omitted, interactions for all types of drugs will be included.
%td
%code fda_approved_drug=true
%tr
%td
immunotherapy
%small (optional)
%td
A flag denoting whether or not to limit interactions to only the ones involving immunotherapeutic drugs.
If this field is omitted, interactions for all types of drugs will be included.
%td
%code immunotherapy=true
%tr
%td
anti_neoplastic
%small (optional)
%td
A flag denoting whether or not to limit interactions to only the ones involving antineoplastic drugs.
If this field is omitted, interactions for all types of drugs will be included.
%td
%code anti_neoplastic=true
%tr
%td
clinically_actionable
%small (optional)
%td
A flag denoting whether or not to limit interactions to only the ones involving clinically actionable genes.
If this field is omitted, interactions for all types of genes will be included.
%td
%code clinically_actionable=true
%tr
%td
druggable_genome
%small (optional)
%td
A flag denoting whether or not to limit interactions to only the ones involving the durggable genome.
If this field is omitted, interactions for all types of genes will be included.
%td
%code druggable_genome=true
%tr
%td
drug_resistance
%small (optional)
%td
A flag denoting whether or not to limit interactions to only the ones involving drug-resistant genes.
If this field is omitted, interactions for all types of genes will be included.
%td
%code drug_resistance=true
%tr
%td
gene_categories
%small (optional)
%td
A comma delimited list of gene categories to include in the result set.
If this field is omitted, all gene categories will be included.
%td
%code gene_categories=kinase,tumor%20suppressor
%tr
%td
source_trust_levels
%small (optional)
%td
A comma delimited list of source trust levels to include in the result set.
If this field is omitted, all trust levels will be included.
%td
%code source_trust_levels=Expert%20curated
%h5
Example Call:
%p
%span.label.label-info Note:
%small
The following example would query DGIdb for interactions involving the genes
FLT1, STK1, and FAKE. It will only show interactions reported
by the source.
=link_to('TALC', source_path('TALC')) + '.'
%pre
\https://dgidb.org/api/v2/interactions.json?genes=FLT1,MM1,FAKE&interaction_sources=TALC
%h5 Example Response:
%p
The response will come back with three top level items:
%p
%code matchedTerms
will be a list containing a hash for each search term that you provided that we were able
to map unambiguously to an Entrez gene.
Each hash will contain your original search term, the Entrez long and full names
that DGIdb matched them to as well as a list of categories that the given gene is in.
Additionally, the hash will contain a list of drug interactions for the gene. This list
includes interaction type information as well as the drug name and source that reported
the interaction.
%p
%code ambiguousTerms
will be a list containing a hash of search terms that you provided that mapped to multiple Entrez
genes.
Each hash will contain your original search term, the Entrez long and full names
of the potential math as well as a list of categories that the given gene is in.
Additionally, the hash will contain a list of drug interactions for the gene. This list
includes interaction type information as well as the drug name and source that reported
the interaction.
%p
%code unmatchedTerms
will be a list of search terms you provided that we were unable to map any Entrez gene.
%button.btn.btn-mini.btn-link{data: { toggle: 'collapse', target: '#example-interaction-response'}}
Show/Hide Response
%pre#example-interaction-response.collapse
:preserve
"matchedTerms": [
{
"searchTerm": "FLT1",
"geneName": "FLT1",
"geneLongName": "fms related tyrosine kinase 1",
"entrezId": 2321,
"geneCategories": [
{
"id": "4c14ec3171544bd2b18b2f1a45e6c8f2",
"name": "KINASE"
},
{
"id": "6c528ef943614261afc5e4f52a3c60ee",
"name": "TYROSINE KINASE"
},
{
"id": "d3ec2631e0b2434b9dcc008e793d3fa5",
"name": "DRUGGABLE GENOME"
},
{
"id": "0d157beb-fd17-404d-8755-3a81aa5ed704",
"name": "CLINICALLY ACTIONABLE"
}
],
"interactions": [
{
"interactionId": "841ed1ba-816f-4d62-9c7b-b6c81d79ad14",
"interactionTypes": [
"inhibitor",
"n/a"
],
"drugName": "CEDIRANIB",
"drugChemblId": "CHEMBL491473",
"sources": [
"ChEMBL",
"TdgClinicalTrial",
"TALC"
],
"pmids": []
},
{
"interactionId": "4a5005da-4a38-414c-93a8-f6a8d471f801",
"interactionTypes": [
"inhibitor",
"n/a"
],
"drugName": "TIVOZANIB",
"drugChemblId": "CHEMBL1289494",
"sources": [
"ChEMBL",
"CancerCommons",
"TALC",
"MyCancerGenome",
"TdgClinicalTrial",
"ClearityFoundationClinicalTrial"
],
"pmids": []
},
{
"interactionId": "fcce486a-92d6-4740-bf56-d5c3ca43f85e",
"interactionTypes": [
"inhibitor",
"n/a"
],
"drugName": "VATALANIB",
"drugChemblId": "CHEMBL101253",
"sources": [
"ChEMBL",
"DrugBank",
"TALC",
"MyCancerGenome",
"TdgClinicalTrial"
],
"pmids": []
},
{
"interactionId": "6919fc44-75fa-41d0-bd11-fa2a2fba0f85",
"interactionTypes": [
"inhibitor",
"n/a"
],
"drugName": "MOTESANIB",
"drugChemblId": "CHEMBL572881",
"sources": [
"ChEMBL",
"MyCancerGenome",
"TdgClinicalTrial",
"TALC"
],
"pmids": []
},
{
"interactionId": "127a6d88-9bf9-4175-9552-e025e1deba48",
"interactionTypes": [
"inhibitor",
"n/a"
],
"drugName": "SUNITINIB",
"drugChemblId": "CHEMBL535",
"sources": [
"DrugBank",
"TEND",
"MyCancerGenomeClinicalTrial",
"TdgClinicalTrial",
"TALC"
],
"pmids": []
},
{
"interactionId": "8c36e43e-a411-45e0-af46-89195e5dd856",
"interactionTypes": [
"inhibitor",
"n/a"
],
"drugName": "AXITINIB",
"drugChemblId": "CHEMBL1289926",
"sources": [
"ChEMBL",
"TALC",
"MyCancerGenome",
"MyCancerGenomeClinicalTrial",
"TdgClinicalTrial",
"PharmGKB",
"DrugBank",
"CancerCommons"
],
"pmids": []
},
{
"interactionId": "2ab8d600-b787-407e-a4f8-88db0d22a9bf",
"interactionTypes": [
"inhibitor"
],
"drugName": "REGORAFENIB",
"drugChemblId": "CHEMBL1946170",
"sources": [
"ChEMBL",
"DrugBank",
"MyCancerGenome",
"MyCancerGenomeClinicalTrial",
"TALC"
],
"pmids": []
},
{
"interactionId": "731d0ad8-7909-474a-a67f-e7f0e94ba42d",
"interactionTypes": [
"inhibitor",
"n/a"
],
"drugName": "LENVATINIB",
"drugChemblId": "CHEMBL1289601",
"sources": [
"DrugBank",
"TdgClinicalTrial",
"TALC"
],
"pmids": []
},
{
"interactionId": "9cd02ac8-61ee-4266-8c54-f115288e709a",
"interactionTypes": [
"inhibitor",
"n/a"
],
"drugName": "NINTEDANIB",
"drugChemblId": "CHEMBL502835",
"sources": [
"DrugBank",
"TALC",
"MyCancerGenome",
"TdgClinicalTrial",
"ClearityFoundationClinicalTrial"
],
"pmids": []
},
{
"interactionId": "5f704ee0-153d-4b8d-b203-b41b04cbe256",
"interactionTypes": [
"inhibitor",
"n/a"
],
"drugName": "PAZOPANIB",
"drugChemblId": "CHEMBL477772",
"sources": [
"MyCancerGenome",
"MyCancerGenomeClinicalTrial",
"TdgClinicalTrial",
"DrugBank",
"ClearityFoundationClinicalTrial",
"TALC"
],
"pmids": []
}
]
}
],
"ambiguousTerms": [
{
"searchTerm": "MM1",
"geneName": "PFDN5",
"geneLongName": "prefoldin subunit 5",
"entrezId": 5204,
"geneCategories": [],
"interactions": []
},
{
"searchTerm": "MM1",
"geneName": "PLXNB2",
"geneLongName": "plexin B2",
"entrezId": 23654,
"geneCategories": [
{
"id": "26f6a4ea7779433ea2cbf524683accf7",
"name": "CELL SURFACE"
}
],
"interactions": []
}
],
"unmatchedTerms": [
"FAKE"
]
%hr
%section#all-interactions.anchor
%h4 All Interactions
%p.lead
When used without a
%code genes
or
%code drugs
parameter, the interactions endpoint returns a list of all interactions in the DGIdb database.
This is an index style endpoint and is paginated by default. You can use the
%code count
and
%code page
parameters to iterate through all the variants.
%span.label GET
%pre
\https://dgidb.org/api/v2/interactions
%h5 Query Parameters:
%table.table.table-bordered.table-striped
%thead
%tr
%td Parameter
%td Default
%td Description
%tbody
%tr
%td
page
%td
1
%td
Which page of results to return
%tr
%td
count
%td
25
%td
How many interactions to return on a single page
%button.btn.btn-mini.btn-link{data: { toggle: 'collapse', target: '#example-all-interactions-response'}}
Show/Hide Response
%pre#example-all-interactions-response.collapse
:preserve
{
"_meta": {
"current_page": 1,
"per_page": 25,
"total_pages": 1878,
"total_count": 46929,
"links": {
"next": "https://dgidb.org/api/v2/interactions?count=25&page=2",
"previous": null
}
},
"records": [
{
"id": "001098f2-1b60-4c87-b3dd-245eb04ede43",
"gene_name": "SLC12A1",
"entrez_id": 6557,
"drug_name": "METHYCLOTHIAZIDE",
"concept_id": "chembl:CHEMBL1577",
"publications": [
11752352,
17139284,
17016423
],
"interaction_types": [
"inhibitor"
],
"interaction_direction": [
"inhibitory"
],
"sources": [
"TdgClinicalTrial",
"TEND",
"TTD"
],
"score": 9.09
},
...
]
}
%hr
%section#one-interaction.anchor
%h4 Interaction Details
%p.lead
The interaction details endpoint can be used to retrieve detailed information about one particular interaction.
%span.label GET
%pre
\https://dgidb.org/api/v2/interactions/<interaction_id>
%h5
Example Call:
%p
%span.label.label-info Note:
%small
The following example would query DGIdb for the interaction with
ID
%code 001098f2-1b60-4c87-b3dd-245eb04ede43
%pre
\https://dgidb.org/api/v2/interactions/001098f2-1b60-4c87-b3dd-245eb04ede43
%h5
Example Response:
%button.btn.btn-mini.btn-link{data: { toggle: 'collapse', target: '#example-one-interaction-response'}}
Show/Hide Response
%pre#example-one-interaction-response.collapse
:preserve
{
"id": "001098f2-1b60-4c87-b3dd-245eb04ede43",
"gene_name": "SLC12A1",
"entrez_id": 6557,
"drug_name": "METHYCLOTHIAZIDE",
"concept_id": "chembl:CHEMBL1577",
"publications": [
17016423,
17139284,
11752352
],
"interaction_types": [
"inhibitor"
],
"interaction_direction": [
"inhibitory"
],
"sources": [
"TdgClinicalTrial",
"TEND",
"TTD"
],
"score": 9.09,
"attributes": [
{
"name": "Trial Name",
"value": "-",
"sources": [
"TdgClinicalTrial"
]
},
{
"name": "Novel drug target",
"value": "Established target",
"sources": [
"TdgClinicalTrial"
]
}
],
"interaction_claims": [
{
"source": "TEND",
"drug": "METHYCLOTHIAZIDE",
"gene": "Q13621",
"interaction_types": [],
"attributes": [],
"publications": [],
"source_links": [
{
"url": "https://www.nature.com/articles/nrd3478/tables/1",
"text": "Trends in the exploitation of novel drug targets, Table 1"
}
]
},
{
"source": "TdgClinicalTrial",
"drug": "METHYCLOTHIAZIDE",
"gene": "Q13621",
"interaction_types": [],
"attributes": [
{
"name": "Trial Name",
"value": "-"
},
{
"name": "Novel drug target",
"value": "Established target"
}
],
"publications": [],
"source_links": [
{
"url": "https://www.annualreviews.org/doi/10.1146/annurev-pharmtox-011613-135943",
"text": "The druggable genome: Evaluation of drug targets in clinical trials suggests major shifts in molecular class and indication. Rask-Andersen M, Masuram S, Schioth HB. Annu Rev Pharmacol Toxicol. 2014;54:9-26. doi: 10.1146/annurev-pharmtox-011613-135943. PMID: 24016212"
}
]
},
{
"source": "TTD",
"drug": "Methyclothiazide",
"gene": "Solute carrier family 12 member 1",
"interaction_types": [],
"attributes": [],
"publications": [],
"source_links": [
{
"url": "http://idrblab.net/ttd/data/target/details/T93878",
"text": "TTD Target Information"
}
]
}
]
}
%hr
%section#drugs.anchor
%h3 Drugs
%section#all-drugs.anchor
%h4 All Drugs
%p.lead
The drugs endpoint can be used to retrieve a list of all drugs in the DGIdb database.
This is an index style endpoint and is paginated by default. You can use the
%code count
and
%code page
parameters to iterate through all the variants.
%span.label GET
%pre
\https://dgidb.org/api/v2/drugs
%h5 Query Parameters:
%table.table.table-bordered.table-striped
%thead
%tr
%td Parameter
%td Default
%td Description
%tbody
%tr
%td
page
%td
1
%td
Which page of results to return
%tr
%td
count
%td
25
%td
How many drugs to return on a single page
%button.btn.btn-mini.btn-link{data: { toggle: 'collapse', target: '#example-all-drugs-response'}}
Show/Hide Response
%pre#example-all-drugs-response.collapse
:preserve
{
"_meta": {
"current_page": 1,
"per_page": 25,
"total_pages": 578,
"total_count": 14449,
"links": {
"next": "https://dgidb.org/api/v2/drugs?count=25&page=2",
"previous": null
}
},
"records": [
{
"name": "ELLAGIC ACID",
"concept_id": "chembl:CHEMBL6246",
"approved": false,
"immunotherapy": false,
"anti_neoplastic": false,
"alias": [
"NSC-407286",
"BENZOARIC ACID",
"NSC-656272",
"ELLAGIC ACID"
]
},
...
]
}
%hr
%section#one-drug.anchor
%h4 Drug Details
%p.lead
The drug details endpoint can be used to retrieve detailed information about one particular drug using the drug's
%code concept_id
%span.label GET
%pre
\https://dgidb.org/api/v2/drugs/<concept_id>
%h5
Example Call:
%p
%span.label.label-info Note:
%small
The following example would query DGIdb for the drug with
concept_id
%code chembl:CHEMBL1237026
%pre
\https://dgidb.org/api/v2/drugs/chembl:CHEMBL1237026
%h5
Example Response:
%button.btn.btn-mini.btn-link{data: { toggle: 'collapse', target: '#example-one-drug-response'}}
Show/Hide Response
%pre#example-one-drug-response.collapse
:preserve
{
"name": "TESAMORELIN",
"concept_id": "chembl:CHEMBL1237026",
"approved": true,
"immunotherapy": false,
"anti_neoplastic": false,
"alias": [
"TH9507",
"TH-9507",
"TESAMORELIN",
"TESAMORELIN ACETATE",
"N-(TRANS-3-HEXENOYL)-HUMAN GROWTH HORMONE RELEASING FACTOR (1-44) ACETATE",
"EGRIFTA",
"drugbank:08869",
"pubchem.compound:16137828",
"chemidplus:218949-48-5",
"chembl:CHEMBL1237026",
"rxcui:1044584"
],
"pmids": [
22298602
],
"attributes": [
{
"name": "Drug Class",
"value": "antilipodystrophy agents",
"sources": [
"TEND"
]
},
{
"name": "Year of Approval",
"value": "2010",
"sources": [
"TEND"
]
},
{
"name": "FDA Approval",
"value": "approved",
"sources": [
"TdgClinicalTrial"
]
},
{
"name": "Drug Class",
"value": "peptide",
"sources": [
"TdgClinicalTrial"
]
},
{
"name": "Drug Indications",
"value": "for treatment of HIV-associated lipodystrophy",
"sources": [
"TdgClinicalTrial"
]
}
],
"drug_claims": [
{
"source": "ChemblDrugs",
"name": "chembl:CHEMBL1237026",
"primary_name": "TESAMORELIN",
"aliases": [],
"attributes": [],
"publications": []
},
{
"source": "TEND",
"name": "TESAMORELIN",
"primary_name": "TESAMORELIN",
"aliases": [
"TESAMORELIN"
],
"attributes": [
{
"name": "Drug Class",
"value": "antilipodystrophy agents"
},
{
"name": "Year of Approval",
"value": "2010"
}
],
"publications": []
},
{
"source": "TdgClinicalTrial",
"name": "TESAMORELIN",
"primary_name": "TESAMORELIN",
"aliases": [],
"attributes": [
{
"name": "Drug Class",
"value": "peptide"
},
{
"name": "Drug Indications",
"value": "for treatment of HIV-associated lipodystrophy"
},
{
"name": "FDA Approval",
"value": "approved"
}
],
"publications": []
},
{
"source": "GuideToPharmacology",
"name": "178103540",
"primary_name": "TESAMORELIN",
"aliases": [
"TESAMORELIN"
],
"attributes": [],
"publications": []
},
{
"source": "TTD",
"name": "Tesamorelin",
"primary_name": "Tesamorelin",
"aliases": [
"D0UL9R"
],
"attributes": [],
"publications": []
}
]
}
%hr
%section#genes.anchor
%h3 Genes
%section#all-genes.anchor
%h4 All Genes
%p.lead
The genes endpoint can be used to retrieve a list of all genes in the DGIdb database.
This is an index style endpoint and is paginated by default. You can use the
%code count
and
%code page
parameters to iterate through all the variants.
%span.label GET
%pre
\https://dgidb.org/api/v2/genes
%h5 Query Parameters:
%table.table.table-bordered.table-striped
%thead
%tr
%td Parameter
%td Default
%td Description
%tbody
%tr
%td
page
%td
1
%td
Which page of results to return
%tr
%td
count
%td
25
%td
How many genes to return on a single page
%button.btn.btn-mini.btn-link{data: { toggle: 'collapse', target: '#example-all-genes-response'}}
Show/Hide Response
%pre#example-all-genes-response.collapse
:preserve
{
"_meta": {
"current_page": 1,
"per_page": 25,
"total_pages": 1644,
"total_count": 41100,
"links": {
"next": "http://dgidb.org/api/v2/genes?count=25&page=2",
"previous": null
}
},
"records": [
{
"name":"A1BG",
"long_name":"alpha-1-B glycoprotein",
"entrez_id":1,
"aliases":[
"A1B",
"ABG",
"GAB",
"HYST2477",
"ENSG00000121410"
]
},
...
]
}
%hr
%section#one-gene.anchor
%h4 Gene Details
%p.lead
The gene details endpoint can be used to retrieve detailed information about one particular gene.
%span.label GET
%pre
\https://dgidb.org/api/v2/genes/<entrez_id>
%h5
Example Call:
%p
%span.label.label-info Note:
%small
The following example would query DGIdb for the gene with
Entrez ID
%code 346
%pre
\https://dgidb.org/api/v2/genes/346
%h5
Example Response:
%button.btn.btn-mini.btn-link{data: { toggle: 'collapse', target: '#example-one-gene-response'}}
Show/Hide Response
%pre#example-one-gene-response.collapse
:preserve
{
"name":"APOC4",
"long_name":"apolipoprotein C4",
"entrez_id":346,
"aliases":[
"APO-CIV",
"APOC-IV",
"ENSG00000224916",
"P55056",
"apolipoprotein C-IV","346",
"ENSG00000267467",
"P21731",
"TBXA2R",
"TP receptor"
],
"pmids":[
1386885,
10634944,
2530338,
2968449,
1387312,
1833018,
1825698,
16604093,
2975605,
1830308,
1434130,
8437108,
3008368,
11454901,
2527074,
8242228,
9871769,
2743082
],
"attributes":[
{
"name":"Gene Biotype",
"value":"PROTEIN_CODING",
"sources":[
"Ensembl"
]
}
],
"categories":[
"TRANSPORTER"
],
"gene_claims":[
{
"source":"GuideToPharmacologyInteractions",
"name":"346",
"aliases":[
"P21731",
"TBXA2R",
"TP receptor"
],
"attributes":[],
"publications":[
10634944,
8242228,
2748606,
8859002,
1434130,
10537280,
8882612,
3594077,
1386885,
2530338,
2968449,
1387312,
1833018,
16604093,
2975605,
1830308,
8437108,
3008368,
11454901,
2527074,
9871769,
2743082,
1825698
]
},
{
"source":"Ensembl",
"name":"ENSG00000224916",
"aliases":[
"ENSG00000224916",
"APOC4"
],
"attributes":[
{
"name":"Gene Biotype",
"value":"PROTEIN_CODING"
}
],
"publications":[]
},
{
"source":"GO",
"name":"APOC4",
"aliases":[
"P55056"
],
"attributes":[],
"publications":[]
}
]
}
%hr
%section#interaction-types.anchor
%h3 Interaction Types
%p.lead
The interaction types endpoint can be used to retrieve a current list of supported
interaction types for use in the interactions endpoint.
%span.label GET
%pre
\https://dgidb.org/api/v2/interaction_types.json
%h5 Example Response:
%button.btn.btn-mini.btn-link{data: { toggle: 'collapse', target: '#example-interaction-types-response'}}
Show/Hide Response
%pre#example-interaction-types-response.collapse
:preserve
["activator", "inhibitor", "unknown"]
%hr
%section#interaction-sources.anchor
%h3 Interaction Sources
%p.lead
The interaction sources endpoint can be used to retrieve a current list of supported
interaction sources for use in calls to the interactions endpoint.
%span.label GET
%pre
\https://dgidb.org/api/v2/interaction_sources.json
%h5 Example Response:
%button.btn.btn-mini.btn-link{data: { toggle: 'collapse', target: '#example-interaction-sources-response'}}
Show/Hide Response
%pre#example-interaction-sources-response.collapse
:preserve
["DrugBank","PharmGKB","TALC","TEND","TTD"]
%hr
%section#gene-categories.anchor
%h3 Gene Categories
%p.lead
The gene categories endpoint can be used to retrieve a current list of supported
gene categories for use in calls to the interactions endpoint.
%span.label GET
%pre
\https://dgidb.org/api/v2/gene_categories.json
%h5 Example Response:
%button.btn.btn-mini.btn-link{data: { toggle: 'collapse', target: '#example-gene-categories-response'}}
Show/Hide Response
%pre#example-gene-categories-response.collapse
:preserve
["KINASE", "DNA REPAIR", "TUMOR SUPPRESSOR"]
%hr
%section#source-trust-levels.anchor
%h3 Source Trust Levels
%p.lead
The source trust levels endpoint can be used to retrieve a current list of supported
source trust levels for use in calls to the interactions endpoint.
%span.label GET
%pre
\https://dgidb.org/api/v2/source_trust_levels.json
%h5 Example Response:
%button.btn.btn-mini.btn-link{data: { toggle: 'collapse', target: '#example-source-trust-levels-response'}}
Show/Hide Response
%pre#example-source-trust-levels-response.collapse
:preserve
["Expert curated", "Non-curated"]
%hr
/
%section#related-genes.anchor
%h3 Related Genes
%p.lead
The related genes endpoint can be used to return Entrez gene symbols for other
genes that are known to interact in pathways with your gene list
%span.label GET
%pre
\/api/v2/related_genes.json
%h5 Accepted Parameters:
%table.table.table-bordered.table-striped
%thead
%tr
%td Parameter
%td Description
%td Example
%tbody
%tr
%td
genes
%small (required)
%td A comma delimited list of Entrez gene symbols
%td
%code genes=FLT1,STK1,FAKE1
%h5
Example Call:
%p
%span.label.label-info Note:
%small
The following example would query DGIdb for a list of genes known to interact with
FLT1 or FLT3
%pre
\https://dgidb.org/api/v2/related_genes.json?genes=FLT1,FLT3
%h5 Example Response:
%p
The response will come back containing a list of hashes each with two keys:
%p
%code geneSymbol
will be the gene symbol you passed in to DGIdb
%p
%code relatedGenes
will be a list of gene symbols for genes known to interact with the entered gene
%button.btn.btn-mini.btn-link{data: { toggle: 'collapse', target: '#example-related-genes-response'}}
Show/Hide Response
%pre#example-related-genes-response.collapse
:preserve
{
"genes":[
{
"gene_name":"FLT1",
"related_genes":[
"ATR",
"CRK",
"CTNNB1",
"PTK2B",
"PLCG1",
"PGF",
"VEGFB",
"SHC2",
"SHC1",
"KDR",
"UBC",
"NEDD4",
"PTPN11",
"VEGFA",
"NCK1",
"PIK3R1",
"NRP1",
"NRP2",
"FYN",
"YES1",
"PLCG2",
"GRB2",
"PTK2"
]
},
{
"gene_name":"FLT3",
"related_genes":[
"CBLB",
"SOCS1",
"GRB2",
"UBC",
"PIK3R1",
"HSP90AA1",
"IKBKG",
"SIAH1",
"UBE2L6",
"SIRT2",
"SLA",
"SOCS2",
"INPP5D",
"NCK1",
"PTPN6",
"FLT3LG",
"SH3BP2",
"PTPN12",
"FIZ1"
]
}
]
}
%hr
%section#genes-in-category.anchor
%h3 Genes in Category
%p.lead
The Genes in Category endpoint can be used to get a list of all genes in DGIdb
that are known to be in a specific category.
%span.label GET
%pre
\/api/v2/genes_in_category.json?<parameters>
%h5 Accepted Parameters:
%table.table.table-bordered.table-striped
%thead
%tr
%td Parameter
%td Description
%td Example
%tbody
%tr
%td
category
%small (required)
%td The name of the category to retrieve genes from
%td
%code category=kinase
%h5
Example Call:
%p
%span.label.label-info Note:
%small
The following example would query DGIdb for a list of genes known to be Kinases
%pre
\https://dgidb.org/api/v2/genes_in_category.json?category=kinase
%h5 Example Response:
%button.btn.btn-mini.btn-link{data: { toggle: 'collapse', target: '#example-genes-in-category-response'}}
Show/Hide Response
%pre#example-genes-in-category-response.collapse
:preserve
["SNRK","BCR","FKBP1A","TAB2","DGKE","PHKA1","PRKCH"]
%hr
.page-header
%section
%h2
Responses
%small response information
%section#formats.anchor
%h3 Formats
%p
Currently, all API responses are provided only in JSON. If you are experimenting with the API in your browser and you want to improve the display for JSON output you use a JSON formatter such as
=link_to 'this one.', 'http://jsonformatter.curiousconcept.com/'
%hr
%section#status-codes.anchor
%h3 Status Codes
%p
The DGIdb API can respond to requests with a number of status codes.
They are explained in the table below.
%table.table.table-bordered.table-striped
%thead
%tr
%td Code
%td Meaning
%tbody
%tr
%td
%span.label.label-success
200
%td
Success. Your query was processed and the response contains the
information that was requested.
%tr
%td
%span.label.label-warning
400
%td
Bad Request. Something about your request was malformed or incorrect.
The response will contain an error message indicating what was wrong.
%tr
%td
%span.label.label-warning
404
%td
Resource Not Found. This indicates that you attempted to get a resource
that doesn't exist.
%tr
%td
%span.label.label-important
50X
%td
Server Error. This means there was a server side error processing your request.
An email will be automatically dispatched to the developer notifying them of the
problem.
%hr
.page-header
%section
%h2
Sample Code
%small get started using DGIdb in the language of your choice
%section#perl-sample.anchor
%h3= link_to 'Perl', 'https://github.com/genome/dgi-db/blob/master/files/perl_example.pl'
%p
A sample Perl application that interacts with DGIdb can be found
=link_to 'on github.', 'https://raw.github.com/genome/dgi-db/master/files/perl_example.pl'
<br><br>Use the command line script to search for interactions FLT3 or EGFR, and limit to drugs that act as inhibitors:<br>
%span.label EXECUTE EXAMPLE SCRIPT
%pre
wget https://raw.github.com/genome/dgi-db/master/files/perl_example.pl<br>chmod +x perl_example.pl<br>./perl_example.pl --genes='FLT3,EGFR' --interaction_types='inhibitor'
%span.label INSTALL INSTRUCTIONS<br>
%p
<br>You may need to install the 'json' package from
=link_to 'cpan', '(http://www.cpan.org/modules/INSTALL.html)'
before this script will work.
<br>On a mac you can do the following:
<br><br>First configure the 'cpan' tool:
%pre
sudo cpan<br>
Then at the 'cpan' prompt:
%pre
get JSON<br>make JSON<br>install JSON<br>q
%hr
%section#python-sample.anchor
%h3= link_to 'Python', 'https://github.com/genome/dgi-db/blob/master/files/python_example.py'
%p
A sample Python application that interacts with DGIdb can be found
=link_to 'on github.', 'https://raw.github.com/genome/dgi-db/master/files/python_example.py'
<br><br>Use the command line script to search for interactions FLT3 or EGFR, and limit to drugs that act as inhibitors:<br>
%span.label EXECUTE EXAMPLE SCRIPT
%pre
wget https://raw.github.com/genome/dgi-db/master/files/python_example.py<br>chmod +x python_example.py<br>./python_example.py --genes='FLT3,EGFR' --interaction_types='inhibitor'
%span.label INSTALL INSTRUCTIONS<br>
%p
This example uses the 'requests' python library. Installing 'requests' is easiest with 'pip' which is one of the easiest and recommended ways to install Python packages.:
%pre
sudo pip install requests
If you don't have pip, see
=link_to 'the pip home-page.', 'http://www.pip-installer.org/en/latest/installing.html'
<br>or you can do this,
%pre
wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py<br>sudo python get-pip.py
%section#ruby-sample.anchor
%h3= link_to 'Ruby', 'https://github.com/genome/dgi-db/blob/master/files/ruby_example.rb'
%p
A small Ruby client library, along with a short usage demo can be found
=link_to 'on github.','https://github.com/genome/dgi-db/blob/master/files/ruby_example.rb'
<br><br>Use the client library to search for interactions involving FLT3 or EGFR, only from trusted sources:<br>
%span.label SAMPLE CODE
%pre
client = DgidbApiClient.new<br>query_params = { source_trust_levels: 'Expert curated', genes: 'FLT3,EGFR' }<br>interaction_results = client.query(:interactions, query_params)
%span.label EXECUTE EXAMPLE SCRIPT
%pre
wget https://raw.github.com/genome/dgi-db/master/files/ruby_example.rb<br>ruby ruby_example.rb
%hr
%section#shell-sample.anchor
%h3= link_to 'Shell', 'https://github.com/genome/dgi-db/blob/master/files/shell_example.sh'
%p
A small tutorial showing command-line usage of the DGIdb API using shell commands
=link_to 'on github.','https://github.com/genome/dgi-db/blob/master/files/shell_example.sh'
<br><br>Try the following examples from the command line to view and format output from the API:<br>
%span.label SAMPLE CODE
%pre
curl https://dgidb.org/api/v2/interactions.json<br><br>curl https://dgidb.org/api/v2/interactions.json?genes=FLT3<br><br>curl https://dgidb.org/api/v2/interactions.json?genes=FLT3 | python -mjson.tool<br><br>curl https://dgidb.org/api/v2/interactions.json?genes=FLT3,STK1,FAKE1 | python -mjson.tool<br><br>curl https://dgidb.org/api/v2/interactions.json?genes=STK1,FAKE1 | python -mjson.tool<br><br>curl https://dgidb.org/api/v2/interactions.json?genes=STK1,FAKE1 | python -mjson.tool<br><br>curl https://dgidb.org/api/v2/interactions.json?genes=FLT3,STK1,FAKE1&interaction_sources=TTD,DrugBank | python -mjson.tool<br><br>curl https://dgidb.org/api/v2/interactions.json?genes=FLT3,STK1,FAKE1&interaction_sources=TTD,DrugBank&interaction_type=inhibitor | python -mjson.tool<br>
%hr
:css
.nav > li {
position: relative;
display: block;
}
.nav-list>li>a {
padding: 3px 15px;
margin-left: 0px;
margin-right: 0px;
}
.nav>li>a {
display: block;
}
h2 {
font-size: 31.5px;
line-height: 40px;
margin: 10px 0;
font-family: inherit;
font-weight: bold;
color-inherit;
}
.label, .badge {
background-color: #999999;
display: inline-block;
margin-bottom: 5px;
}
.label-info {
background-color: #5bc0de;
display: inline;
}
list .nav-header {
margin-left: -15px;
margin-right: -15px;
text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}
.nav-header {
display: block;
padding: 3px 15px;
font-size: 11px;
font-weight: bold;
line-height: 20px;
color: #999999;
text-transform: uppercase;
}
.nav-list .divider {
height: 1px;
margin: 9px 1px;
overflow: hidden;
background-color: #e5e5e5;
border-botom: 1px solid #ffffff;
}
li {
line-height: 20px;
}
li {
display: list-item;
text-align: -webkit-match-parent;
}
.anchor::before {
content:"";
display:block;
height:5px; /* fixed header height*/
margin:-5px 0 0; /* negative fixed header height */
}
:javascript
$(document).ready(function() {
$('body').attr('data-spy', 'scroll');
$('body').attr('data-target', '#navbar');
});