{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Datasets2Tools API Manual\n", "**Denis Torre**\n", "\n", "*September 20, 2017*\n", "\n", "## 1. Overview\n", "This notebook explains how to extract data from the Datasets2Tools API using Python. The notebook can be downloaded at the following GitHub page: https://github.com/denis-torre/datasets2tools/tree/master/api.\n", " \n", "##### Basics\n", "- The Datasets2Tools search API can be accessed at the following URL: http://amp.pharm.mssm.edu/datasets2tools/api/search.\n", "- Searches are refined by adding several parameters, which are explained in more detail below.\n", "- The API returns a list of JSON objects containing information about the search results.\n", "\n", "##### Object Types\n", "The Datasets2Tools API can be used to search three types of objects:\n", "- **Canned Analyses** (http://amp.pharm.mssm.edu/datasets2tools/api/search?object_type=canned_analysis)\n", "- **Datasets** (http://amp.pharm.mssm.edu/datasets2tools/api/search?object_type=dataset)\n", "- **Tools** (http://amp.pharm.mssm.edu/datasets2tools/api/search?object_type=tool)\n", "\n", "More detailed explanation on searching these objects is available below.\n", "\n", "##### Demo\n", "Here is an example of search results for the analyses endpoint." ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "scrolled": false }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
canned_analysis_accessioncanned_analysis_descriptioncanned_analysis_titlecanned_analysis_urldatasetsdatemetadatatools
0DCA00000024Highly interactive web-based heatmap visualiza...Interactive heatmap visualization of RNA-seq d...http://amp.pharm.mssm.edu/datasets2tools/analy...[GSE16256]September 20, 2017{}[ARCHS4]
1DCA00000025Highly interactive web-based heatmap visualiza...Interactive heatmap visualization of RNA-seq d...http://amp.pharm.mssm.edu/datasets2tools/analy...[GSE17312]September 20, 2017{}[ARCHS4]
2DCA00000026Highly interactive web-based heatmap visualiza...Interactive heatmap visualization of RNA-seq d...http://amp.pharm.mssm.edu/datasets2tools/analy...[GSE18927]September 20, 2017{}[ARCHS4]
3DCA00000027Highly interactive web-based heatmap visualiza...Interactive heatmap visualization of RNA-seq d...http://amp.pharm.mssm.edu/datasets2tools/analy...[GSE22959]September 20, 2017{}[ARCHS4]
4DCA00000028Highly interactive web-based heatmap visualiza...Interactive heatmap visualization of RNA-seq d...http://amp.pharm.mssm.edu/datasets2tools/analy...[GSE24565]September 20, 2017{}[ARCHS4]
\n", "
" ], "text/plain": [ " canned_analysis_accession \\\n", "0 DCA00000024 \n", "1 DCA00000025 \n", "2 DCA00000026 \n", "3 DCA00000027 \n", "4 DCA00000028 \n", "\n", " canned_analysis_description \\\n", "0 Highly interactive web-based heatmap visualiza... \n", "1 Highly interactive web-based heatmap visualiza... \n", "2 Highly interactive web-based heatmap visualiza... \n", "3 Highly interactive web-based heatmap visualiza... \n", "4 Highly interactive web-based heatmap visualiza... \n", "\n", " canned_analysis_title \\\n", "0 Interactive heatmap visualization of RNA-seq d... \n", "1 Interactive heatmap visualization of RNA-seq d... \n", "2 Interactive heatmap visualization of RNA-seq d... \n", "3 Interactive heatmap visualization of RNA-seq d... \n", "4 Interactive heatmap visualization of RNA-seq d... \n", "\n", " canned_analysis_url datasets \\\n", "0 http://amp.pharm.mssm.edu/datasets2tools/analy... [GSE16256] \n", "1 http://amp.pharm.mssm.edu/datasets2tools/analy... [GSE17312] \n", "2 http://amp.pharm.mssm.edu/datasets2tools/analy... [GSE18927] \n", "3 http://amp.pharm.mssm.edu/datasets2tools/analy... [GSE22959] \n", "4 http://amp.pharm.mssm.edu/datasets2tools/analy... [GSE24565] \n", "\n", " date metadata tools \n", "0 September 20, 2017 {} [ARCHS4] \n", "1 September 20, 2017 {} [ARCHS4] \n", "2 September 20, 2017 {} [ARCHS4] \n", "3 September 20, 2017 {} [ARCHS4] \n", "4 September 20, 2017 {} [ARCHS4] " ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Import modules\n", "import json\n", "import requests\n", "import pandas as pd\n", "\n", "# Get API URL\n", "url = 'http://amp.pharm.mssm.edu/datasets2tools/api/search'\n", "\n", "# Search 5 analyses\n", "data = {\n", " 'object_type': 'canned_analysis',\n", " 'page_size': 5\n", "}\n", "\n", "# Get response\n", "response = requests.post(url, params=data)\n", "\n", "# Read response\n", "results = json.loads(response.text)\n", "\n", "# Convert to dataframe\n", "results_dataframe = pd.DataFrame(results)\n", "results_dataframe" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 2. Search Examples\n", "For convenience, we define a function to search the API and return a pandas DataFrame." ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": true }, "outputs": [], "source": [ "# Import modules\n", "import json\n", "import requests\n", "import pandas as pd\n", "\n", "def search_datasets2tools(search_options):\n", " \n", " # Get API URL\n", " url = 'http://amp.pharm.mssm.edu/datasets2tools/api/search'\n", "\n", " # Get response\n", " response = requests.post(url, params=search_options)\n", "\n", " try:\n", " # Read response\n", " results_dict = json.loads(response.text)\n", "\n", " # Convert to dataframe\n", " results_dataframe = pd.DataFrame(results_dict)\n", " \n", " # Set index\n", " results_dataframe.set_index(search_options['object_type']+'_accession', inplace=True)\n", " \n", " return results_dataframe\n", " \n", " except:\n", " \n", " return 'Sorry, there has been an error.'" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 2.1 Canned Analyses\n", "We can search canned analyses by text, dataset, tool, or metadata tags.\n", "\n", "##### 2.1.1 By Text\n", "Search all canned analyses that contain the keyword *prostate cancer*." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
canned_analysis_descriptioncanned_analysis_titlecanned_analysis_urldatasetsdatemetadatatools
canned_analysis_accession
DCA00000060Highly interactive web-based heatmap visualiza...Interactive heatmap visualization of RNA-seq d...http://amp.pharm.mssm.edu/datasets2tools/analy...[GSE35126]September 20, 2017{}[ARCHS4]
DCA00000123Highly interactive web-based heatmap visualiza...Interactive heatmap visualization of RNA-seq d...http://amp.pharm.mssm.edu/datasets2tools/analy...[GSE39509]September 20, 2017{}[ARCHS4]
DCA00000139Highly interactive web-based heatmap visualiza...Interactive heatmap visualization of RNA-seq d...http://amp.pharm.mssm.edu/datasets2tools/analy...[GSE40050]September 20, 2017{}[ARCHS4]
DCA00000262Highly interactive web-based heatmap visualiza...Interactive heatmap visualization of RNA-seq d...http://amp.pharm.mssm.edu/datasets2tools/analy...[GSE43986]September 20, 2017{}[ARCHS4]
DCA00000448Highly interactive web-based heatmap visualiza...Interactive heatmap visualization of RNA-seq d...http://amp.pharm.mssm.edu/datasets2tools/analy...[GSE48403]September 20, 2017{}[ARCHS4]
\n", "
" ], "text/plain": [ " canned_analysis_description \\\n", "canned_analysis_accession \n", "DCA00000060 Highly interactive web-based heatmap visualiza... \n", "DCA00000123 Highly interactive web-based heatmap visualiza... \n", "DCA00000139 Highly interactive web-based heatmap visualiza... \n", "DCA00000262 Highly interactive web-based heatmap visualiza... \n", "DCA00000448 Highly interactive web-based heatmap visualiza... \n", "\n", " canned_analysis_title \\\n", "canned_analysis_accession \n", "DCA00000060 Interactive heatmap visualization of RNA-seq d... \n", "DCA00000123 Interactive heatmap visualization of RNA-seq d... \n", "DCA00000139 Interactive heatmap visualization of RNA-seq d... \n", "DCA00000262 Interactive heatmap visualization of RNA-seq d... \n", "DCA00000448 Interactive heatmap visualization of RNA-seq d... \n", "\n", " canned_analysis_url \\\n", "canned_analysis_accession \n", "DCA00000060 http://amp.pharm.mssm.edu/datasets2tools/analy... \n", "DCA00000123 http://amp.pharm.mssm.edu/datasets2tools/analy... \n", "DCA00000139 http://amp.pharm.mssm.edu/datasets2tools/analy... \n", "DCA00000262 http://amp.pharm.mssm.edu/datasets2tools/analy... \n", "DCA00000448 http://amp.pharm.mssm.edu/datasets2tools/analy... \n", "\n", " datasets date metadata tools \n", "canned_analysis_accession \n", "DCA00000060 [GSE35126] September 20, 2017 {} [ARCHS4] \n", "DCA00000123 [GSE39509] September 20, 2017 {} [ARCHS4] \n", "DCA00000139 [GSE40050] September 20, 2017 {} [ARCHS4] \n", "DCA00000262 [GSE43986] September 20, 2017 {} [ARCHS4] \n", "DCA00000448 [GSE48403] September 20, 2017 {} [ARCHS4] " ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "results = search_datasets2tools({'object_type': 'canned_analysis',\n", " 'q': 'prostate cancer'})\n", "results.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##### 2.1.2 By Dataset\n", "Search all canned analyses associated to GEO dataset GSE775." ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
canned_analysis_descriptioncanned_analysis_titlecanned_analysis_urldatasetsdatemetadatatools
canned_analysis_accession
DCA00000002An enrichment analysis was performed on the to...Enrichment analysis of genes downregulated in ...http://amp.pharm.mssm.edu/Enrichr/enrich?datas...[GSE775]September 19, 2017{u'do_id': u'DOID:9408', u'cell_type': u'Heart...[Enrichr]
DCA00000003An enrichment analysis was performed on the to...Enrichment analysis of genes upregulated in ac...http://amp.pharm.mssm.edu/Enrichr/enrich?datas...[GSE775]September 19, 2017{u'do_id': u'DOID:9408', u'cell_type': u'Heart...[Enrichr]
DCA00000004An enrichment analysis was performed on the to...Enrichment analysis of genes downregulated in ...http://amp.pharm.mssm.edu/Enrichr/enrich?datas...[GSE775]September 19, 2017{u'do_id': u'DOID:9408', u'cell_type': u'Heart...[Enrichr]
DCA00000005An enrichment analysis was performed on the to...Enrichment analysis of genes upregulated in ac...http://amp.pharm.mssm.edu/Enrichr/enrich?datas...[GSE775]September 19, 2017{u'do_id': u'DOID:9408', u'cell_type': u'Heart...[Enrichr]
DCA00000006The L1000 database was queried in order to ide...Small molecules which mimic acute myocardial i...http://amp.pharm.mssm.edu/L1000CDS2/#/result/5...[GSE775]September 19, 2017{u'do_id': u'DOID:9408', u'direction': u'mimic...[L1000CDS2]
\n", "
" ], "text/plain": [ " canned_analysis_description \\\n", "canned_analysis_accession \n", "DCA00000002 An enrichment analysis was performed on the to... \n", "DCA00000003 An enrichment analysis was performed on the to... \n", "DCA00000004 An enrichment analysis was performed on the to... \n", "DCA00000005 An enrichment analysis was performed on the to... \n", "DCA00000006 The L1000 database was queried in order to ide... \n", "\n", " canned_analysis_title \\\n", "canned_analysis_accession \n", "DCA00000002 Enrichment analysis of genes downregulated in ... \n", "DCA00000003 Enrichment analysis of genes upregulated in ac... \n", "DCA00000004 Enrichment analysis of genes downregulated in ... \n", "DCA00000005 Enrichment analysis of genes upregulated in ac... \n", "DCA00000006 Small molecules which mimic acute myocardial i... \n", "\n", " canned_analysis_url \\\n", "canned_analysis_accession \n", "DCA00000002 http://amp.pharm.mssm.edu/Enrichr/enrich?datas... \n", "DCA00000003 http://amp.pharm.mssm.edu/Enrichr/enrich?datas... \n", "DCA00000004 http://amp.pharm.mssm.edu/Enrichr/enrich?datas... \n", "DCA00000005 http://amp.pharm.mssm.edu/Enrichr/enrich?datas... \n", "DCA00000006 http://amp.pharm.mssm.edu/L1000CDS2/#/result/5... \n", "\n", " datasets date \\\n", "canned_analysis_accession \n", "DCA00000002 [GSE775] September 19, 2017 \n", "DCA00000003 [GSE775] September 19, 2017 \n", "DCA00000004 [GSE775] September 19, 2017 \n", "DCA00000005 [GSE775] September 19, 2017 \n", "DCA00000006 [GSE775] September 19, 2017 \n", "\n", " metadata \\\n", "canned_analysis_accession \n", "DCA00000002 {u'do_id': u'DOID:9408', u'cell_type': u'Heart... \n", "DCA00000003 {u'do_id': u'DOID:9408', u'cell_type': u'Heart... \n", "DCA00000004 {u'do_id': u'DOID:9408', u'cell_type': u'Heart... \n", "DCA00000005 {u'do_id': u'DOID:9408', u'cell_type': u'Heart... \n", "DCA00000006 {u'do_id': u'DOID:9408', u'direction': u'mimic... \n", "\n", " tools \n", "canned_analysis_accession \n", "DCA00000002 [Enrichr] \n", "DCA00000003 [Enrichr] \n", "DCA00000004 [Enrichr] \n", "DCA00000005 [Enrichr] \n", "DCA00000006 [L1000CDS2] " ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "results = search_datasets2tools({'object_type': 'canned_analysis',\n", " 'dataset_accession': 'GSE775'})\n", "results.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##### 2.1.3 By Tool\n", "Search all canned analyses generated by Enrichr." ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
canned_analysis_descriptioncanned_analysis_titlecanned_analysis_urldatasetsdatemetadatatools
canned_analysis_accession
DCA00000002An enrichment analysis was performed on the to...Enrichment analysis of genes downregulated in ...http://amp.pharm.mssm.edu/Enrichr/enrich?datas...[GSE775]September 19, 2017{u'do_id': u'DOID:9408', u'cell_type': u'Heart...[Enrichr]
DCA00000003An enrichment analysis was performed on the to...Enrichment analysis of genes upregulated in ac...http://amp.pharm.mssm.edu/Enrichr/enrich?datas...[GSE775]September 19, 2017{u'do_id': u'DOID:9408', u'cell_type': u'Heart...[Enrichr]
DCA00000004An enrichment analysis was performed on the to...Enrichment analysis of genes downregulated in ...http://amp.pharm.mssm.edu/Enrichr/enrich?datas...[GSE775]September 19, 2017{u'do_id': u'DOID:9408', u'cell_type': u'Heart...[Enrichr]
DCA00000005An enrichment analysis was performed on the to...Enrichment analysis of genes upregulated in ac...http://amp.pharm.mssm.edu/Enrichr/enrich?datas...[GSE775]September 19, 2017{u'do_id': u'DOID:9408', u'cell_type': u'Heart...[Enrichr]
DCA00059407An enrichment analysis was performed on the to...Enrichment analysis of genes downregulated in ...http://amp.pharm.mssm.edu/Enrichr/enrich?datas...[GSE775]September 20, 2017{u'do_id': u'DOID:9408', u'cell_type': u'Heart...[Enrichr]
\n", "
" ], "text/plain": [ " canned_analysis_description \\\n", "canned_analysis_accession \n", "DCA00000002 An enrichment analysis was performed on the to... \n", "DCA00000003 An enrichment analysis was performed on the to... \n", "DCA00000004 An enrichment analysis was performed on the to... \n", "DCA00000005 An enrichment analysis was performed on the to... \n", "DCA00059407 An enrichment analysis was performed on the to... \n", "\n", " canned_analysis_title \\\n", "canned_analysis_accession \n", "DCA00000002 Enrichment analysis of genes downregulated in ... \n", "DCA00000003 Enrichment analysis of genes upregulated in ac... \n", "DCA00000004 Enrichment analysis of genes downregulated in ... \n", "DCA00000005 Enrichment analysis of genes upregulated in ac... \n", "DCA00059407 Enrichment analysis of genes downregulated in ... \n", "\n", " canned_analysis_url \\\n", "canned_analysis_accession \n", "DCA00000002 http://amp.pharm.mssm.edu/Enrichr/enrich?datas... \n", "DCA00000003 http://amp.pharm.mssm.edu/Enrichr/enrich?datas... \n", "DCA00000004 http://amp.pharm.mssm.edu/Enrichr/enrich?datas... \n", "DCA00000005 http://amp.pharm.mssm.edu/Enrichr/enrich?datas... \n", "DCA00059407 http://amp.pharm.mssm.edu/Enrichr/enrich?datas... \n", "\n", " datasets date \\\n", "canned_analysis_accession \n", "DCA00000002 [GSE775] September 19, 2017 \n", "DCA00000003 [GSE775] September 19, 2017 \n", "DCA00000004 [GSE775] September 19, 2017 \n", "DCA00000005 [GSE775] September 19, 2017 \n", "DCA00059407 [GSE775] September 20, 2017 \n", "\n", " metadata \\\n", "canned_analysis_accession \n", "DCA00000002 {u'do_id': u'DOID:9408', u'cell_type': u'Heart... \n", "DCA00000003 {u'do_id': u'DOID:9408', u'cell_type': u'Heart... \n", "DCA00000004 {u'do_id': u'DOID:9408', u'cell_type': u'Heart... \n", "DCA00000005 {u'do_id': u'DOID:9408', u'cell_type': u'Heart... \n", "DCA00059407 {u'do_id': u'DOID:9408', u'cell_type': u'Heart... \n", "\n", " tools \n", "canned_analysis_accession \n", "DCA00000002 [Enrichr] \n", "DCA00000003 [Enrichr] \n", "DCA00000004 [Enrichr] \n", "DCA00000005 [Enrichr] \n", "DCA00059407 [Enrichr] " ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "results = search_datasets2tools({'object_type': 'canned_analysis',\n", " 'tool_name': 'Enrichr'})\n", "results.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##### 2.1.4 By Metadata\n", "Search all canned analyses with the *colon cancer* disease name." ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
canned_analysis_descriptioncanned_analysis_titlecanned_analysis_urldatasetsdatemetadatatools
canned_analysis_accession
DCA00032919The analysis explores the gene interaction net...Interaction network and enrichment analysis of...http://genemania.org/#/search/mouse/Lgals6|Guc...[GSE2178]September 20, 2017{u'do_id': u'DOID:219', u'cell_type': u'Intest...[GeneMANIA]
DCA00032920The analysis explores the gene interaction net...Interaction network and enrichment analysis of...http://genemania.org/#/search/mouse/Slpi|Gcnt2...[GSE2178]September 20, 2017{u'do_id': u'DOID:219', u'cell_type': u'Intest...[GeneMANIA]
DCA00033223The analysis explores the gene interaction net...Interaction network and enrichment analysis of...http://genemania.org/#/search/human/RPS4Y1|NDR...[GSE4107]September 20, 2017{u'do_id': u'DOID:219', u'cell_type': u'Intest...[GeneMANIA]
DCA00033224The analysis explores the gene interaction net...Interaction network and enrichment analysis of...http://genemania.org/#/search/human/FOS|SH3KBP...[GSE4107]September 20, 2017{u'do_id': u'DOID:219', u'cell_type': u'Intest...[GeneMANIA]
DCA00033763The analysis explores the gene interaction net...Interaction network and enrichment analysis of...http://genemania.org/#/search/human/RPS26|RPL1...[GSE34299]September 20, 2017{u'do_id': u'DOID:219', u'cell_type': u'HT29 C...[GeneMANIA]
\n", "
" ], "text/plain": [ " canned_analysis_description \\\n", "canned_analysis_accession \n", "DCA00032919 The analysis explores the gene interaction net... \n", "DCA00032920 The analysis explores the gene interaction net... \n", "DCA00033223 The analysis explores the gene interaction net... \n", "DCA00033224 The analysis explores the gene interaction net... \n", "DCA00033763 The analysis explores the gene interaction net... \n", "\n", " canned_analysis_title \\\n", "canned_analysis_accession \n", "DCA00032919 Interaction network and enrichment analysis of... \n", "DCA00032920 Interaction network and enrichment analysis of... \n", "DCA00033223 Interaction network and enrichment analysis of... \n", "DCA00033224 Interaction network and enrichment analysis of... \n", "DCA00033763 Interaction network and enrichment analysis of... \n", "\n", " canned_analysis_url \\\n", "canned_analysis_accession \n", "DCA00032919 http://genemania.org/#/search/mouse/Lgals6|Guc... \n", "DCA00032920 http://genemania.org/#/search/mouse/Slpi|Gcnt2... \n", "DCA00033223 http://genemania.org/#/search/human/RPS4Y1|NDR... \n", "DCA00033224 http://genemania.org/#/search/human/FOS|SH3KBP... \n", "DCA00033763 http://genemania.org/#/search/human/RPS26|RPL1... \n", "\n", " datasets date \\\n", "canned_analysis_accession \n", "DCA00032919 [GSE2178] September 20, 2017 \n", "DCA00032920 [GSE2178] September 20, 2017 \n", "DCA00033223 [GSE4107] September 20, 2017 \n", "DCA00033224 [GSE4107] September 20, 2017 \n", "DCA00033763 [GSE34299] September 20, 2017 \n", "\n", " metadata \\\n", "canned_analysis_accession \n", "DCA00032919 {u'do_id': u'DOID:219', u'cell_type': u'Intest... \n", "DCA00032920 {u'do_id': u'DOID:219', u'cell_type': u'Intest... \n", "DCA00033223 {u'do_id': u'DOID:219', u'cell_type': u'Intest... \n", "DCA00033224 {u'do_id': u'DOID:219', u'cell_type': u'Intest... \n", "DCA00033763 {u'do_id': u'DOID:219', u'cell_type': u'HT29 C... \n", "\n", " tools \n", "canned_analysis_accession \n", "DCA00032919 [GeneMANIA] \n", "DCA00032920 [GeneMANIA] \n", "DCA00033223 [GeneMANIA] \n", "DCA00033224 [GeneMANIA] \n", "DCA00033763 [GeneMANIA] " ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "results = search_datasets2tools({'object_type': 'canned_analysis',\n", " 'disease_name': 'colon cancer'})\n", "results.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##### 2.1.5 Combined Search\n", "Search all analyses generated by Enrichr on dataset GSE31106, where the geneset is upregulated." ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
canned_analysis_descriptioncanned_analysis_titlecanned_analysis_urldatasetsdatemetadatatools
canned_analysis_accession
DCA00059528An enrichment analysis was performed on the to...Enrichment analysis of genes upregulated in co...http://amp.pharm.mssm.edu/Enrichr/enrich?datas...[GSE31106]September 20, 2017{u'do_id': u'DOID:0050861', u'cell_type': u'Co...[Enrichr]
\n", "
" ], "text/plain": [ " canned_analysis_description \\\n", "canned_analysis_accession \n", "DCA00059528 An enrichment analysis was performed on the to... \n", "\n", " canned_analysis_title \\\n", "canned_analysis_accession \n", "DCA00059528 Enrichment analysis of genes upregulated in co... \n", "\n", " canned_analysis_url \\\n", "canned_analysis_accession \n", "DCA00059528 http://amp.pharm.mssm.edu/Enrichr/enrich?datas... \n", "\n", " datasets date \\\n", "canned_analysis_accession \n", "DCA00059528 [GSE31106] September 20, 2017 \n", "\n", " metadata \\\n", "canned_analysis_accession \n", "DCA00059528 {u'do_id': u'DOID:0050861', u'cell_type': u'Co... \n", "\n", " tools \n", "canned_analysis_accession \n", "DCA00059528 [Enrichr] " ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "results = search_datasets2tools({'object_type': 'canned_analysis',\n", " 'tool_name': 'Enrichr',\n", " 'dataset_accession': 'GSE31106',\n", " 'geneset': 'upregulated'})\n", "results.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 2.2 Datasets\n", "We can search datasets by accession, text-based search, names of tools which have analyzed them, accessions of canned analyses generated using them.\n", "\n", "##### 2.2.1 By Accession\n", "Search dataset GSE775." ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
analysesdataset_descriptiondataset_landing_urldataset_titlerepository_name
dataset_accession
GSE77542Temporal analysis of acute myocardial infarcti...https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi...Myocardial infarction time courseGene Expression Omnibus
\n", "
" ], "text/plain": [ " analyses \\\n", "dataset_accession \n", "GSE775 42 \n", "\n", " dataset_description \\\n", "dataset_accession \n", "GSE775 Temporal analysis of acute myocardial infarcti... \n", "\n", " dataset_landing_url \\\n", "dataset_accession \n", "GSE775 https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi... \n", "\n", " dataset_title repository_name \n", "dataset_accession \n", "GSE775 Myocardial infarction time course Gene Expression Omnibus " ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "results = search_datasets2tools({'object_type': 'dataset',\n", " 'dataset_accession': 'GSE775'})\n", "results.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##### 2.2.2 By Text\n", "Search all datasets which contain the keyword *asthma*." ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
analysesdataset_descriptiondataset_landing_urldataset_titlerepository_name
dataset_accession
GSE4369649Analysis of bronchial epithelial cells from pa...https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi...Severe asthma: bronchial epithelial cellGene Expression Omnibus
GSE3177333Analysis of circulating CD4+ and CD8+ T-cells ...https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi...Severe asthma: circulating CD4+ and CD8+ T-cellsGene Expression Omnibus
GSE2701128Analysis of white blood cells from children wi...https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi...Asthma: white blood cellsGene Expression Omnibus
GSE68587Comparison of whole lungs of wild-type and rec...https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi...Asthma model: lungsGene Expression Omnibus
GSE189657Analysis of airway epithelial cells (AEC) from...https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi...Asthmatic atopic epitheliumGene Expression Omnibus
\n", "
" ], "text/plain": [ " analyses \\\n", "dataset_accession \n", "GSE43696 49 \n", "GSE31773 33 \n", "GSE27011 28 \n", "GSE6858 7 \n", "GSE18965 7 \n", "\n", " dataset_description \\\n", "dataset_accession \n", "GSE43696 Analysis of bronchial epithelial cells from pa... \n", "GSE31773 Analysis of circulating CD4+ and CD8+ T-cells ... \n", "GSE27011 Analysis of white blood cells from children wi... \n", "GSE6858 Comparison of whole lungs of wild-type and rec... \n", "GSE18965 Analysis of airway epithelial cells (AEC) from... \n", "\n", " dataset_landing_url \\\n", "dataset_accession \n", "GSE43696 https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi... \n", "GSE31773 https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi... \n", "GSE27011 https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi... \n", "GSE6858 https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi... \n", "GSE18965 https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi... \n", "\n", " dataset_title \\\n", "dataset_accession \n", "GSE43696 Severe asthma: bronchial epithelial cell \n", "GSE31773 Severe asthma: circulating CD4+ and CD8+ T-cells \n", "GSE27011 Asthma: white blood cells \n", "GSE6858 Asthma model: lungs \n", "GSE18965 Asthmatic atopic epithelium \n", "\n", " repository_name \n", "dataset_accession \n", "GSE43696 Gene Expression Omnibus \n", "GSE31773 Gene Expression Omnibus \n", "GSE27011 Gene Expression Omnibus \n", "GSE6858 Gene Expression Omnibus \n", "GSE18965 Gene Expression Omnibus " ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "results = search_datasets2tools({'object_type': 'dataset',\n", " 'q': 'asthma'})\n", "results.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##### 2.2.3 By Tool\n", "Search all datasets which have been analyzed by Enrichr." ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
analysesdataset_descriptiondataset_landing_urldataset_titlerepository_name
dataset_accession
GSE50588294One goal of human genetics is to understand ho...https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi...The Functional Consequences of Variation in Tr...Gene Expression Omnibus
GSE47856119Chemo-resistance to platinum such as cisplatin...https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi...Expression data from cultured human ovarian ca...Gene Expression Omnibus
GSE6930119Analysis of Ewings sarcoma A673 cells for up t...https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi...Cytosine arabinoside effect on Ewing's sarcoma...Gene Expression Omnibus
GSE7002119Analysis of nasal epithelia exposed to various...https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi...Formaldehyde effect on nasal epithelium: dose ...Gene Expression Omnibus
GSE35366112Analysis of brains from 4 models of human neur...https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi...Models of Neuronal Migration Defects: time courseGene Expression Omnibus
\n", "
" ], "text/plain": [ " analyses \\\n", "dataset_accession \n", "GSE50588 294 \n", "GSE47856 119 \n", "GSE6930 119 \n", "GSE7002 119 \n", "GSE35366 112 \n", "\n", " dataset_description \\\n", "dataset_accession \n", "GSE50588 One goal of human genetics is to understand ho... \n", "GSE47856 Chemo-resistance to platinum such as cisplatin... \n", "GSE6930 Analysis of Ewings sarcoma A673 cells for up t... \n", "GSE7002 Analysis of nasal epithelia exposed to various... \n", "GSE35366 Analysis of brains from 4 models of human neur... \n", "\n", " dataset_landing_url \\\n", "dataset_accession \n", "GSE50588 https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi... \n", "GSE47856 https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi... \n", "GSE6930 https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi... \n", "GSE7002 https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi... \n", "GSE35366 https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi... \n", "\n", " dataset_title \\\n", "dataset_accession \n", "GSE50588 The Functional Consequences of Variation in Tr... \n", "GSE47856 Expression data from cultured human ovarian ca... \n", "GSE6930 Cytosine arabinoside effect on Ewing's sarcoma... \n", "GSE7002 Formaldehyde effect on nasal epithelium: dose ... \n", "GSE35366 Models of Neuronal Migration Defects: time course \n", "\n", " repository_name \n", "dataset_accession \n", "GSE50588 Gene Expression Omnibus \n", "GSE47856 Gene Expression Omnibus \n", "GSE6930 Gene Expression Omnibus \n", "GSE7002 Gene Expression Omnibus \n", "GSE35366 Gene Expression Omnibus " ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "results = search_datasets2tools({'object_type': 'dataset',\n", " 'tool_name': 'Enrichr'})\n", "results.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##### 2.3.4 By Canned Analysis\n", "Search all datasets which have been used to generate canned analysis DCA00000002." ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
analysesdataset_descriptiondataset_landing_urldataset_titlerepository_name
dataset_accession
GSE77542Temporal analysis of acute myocardial infarcti...https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi...Myocardial infarction time courseGene Expression Omnibus
\n", "
" ], "text/plain": [ " analyses \\\n", "dataset_accession \n", "GSE775 42 \n", "\n", " dataset_description \\\n", "dataset_accession \n", "GSE775 Temporal analysis of acute myocardial infarcti... \n", "\n", " dataset_landing_url \\\n", "dataset_accession \n", "GSE775 https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi... \n", "\n", " dataset_title repository_name \n", "dataset_accession \n", "GSE775 Myocardial infarction time course Gene Expression Omnibus " ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "results = search_datasets2tools({'object_type': 'dataset',\n", " 'canned_analysis_accession': 'DCA00000002'})\n", "results.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 2.3 Tools\n", "We can search tools by name, text-based search, accessions of analyzed datasets, accessions of canned analyses generated using them.\n", "\n", "##### 2.3.1 By Name\n", "Search ARCHS4." ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
analysesarticlestool_descriptiontool_name
tool_accession
DCT000100524645[https://doi.org/10.1101/189092]ARCHS4 provides access to gene counts from HiS...ARCHS4
\n", "
" ], "text/plain": [ " analyses articles \\\n", "tool_accession \n", "DCT00010052 4645 [https://doi.org/10.1101/189092] \n", "\n", " tool_description tool_name \n", "tool_accession \n", "DCT00010052 ARCHS4 provides access to gene counts from HiS... ARCHS4 " ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "results = search_datasets2tools({'object_type': 'tool',\n", " 'tool_name': 'ARCHS4'})\n", "results.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##### 2.3.2 By Text\n", "Search all tools which contain the keyword *enrichment*." ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
analysesarticlestool_descriptiontool_name
tool_accession
DCT000047027759[https://doi.org/10.1093/nar/gkw377]A comprehensive gene set enrichment analysis w...Enrichr
DCT000100443879[]Enrichment analysis tool implementing the prin...PAEA
DCT000001490[https://doi.org/10.1093/bioinformatics/btq503]An R/C++ package to identify patterns and biol...CoGAPS
DCT000048520[https://doi.org/10.1093/nar/gkx295]A web-based tool for comprehensive statistical...MicrobiomeAnalyst
DCT000021740[https://doi.org/10.1093/bioinformatics/btw511]Translating PubMed and PMC texts to networks f...HiPub
\n", "
" ], "text/plain": [ " analyses articles \\\n", "tool_accession \n", "DCT00004702 7759 [https://doi.org/10.1093/nar/gkw377] \n", "DCT00010044 3879 [] \n", "DCT00000149 0 [https://doi.org/10.1093/bioinformatics/btq503] \n", "DCT00004852 0 [https://doi.org/10.1093/nar/gkx295] \n", "DCT00002174 0 [https://doi.org/10.1093/bioinformatics/btw511] \n", "\n", " tool_description \\\n", "tool_accession \n", "DCT00004702 A comprehensive gene set enrichment analysis w... \n", "DCT00010044 Enrichment analysis tool implementing the prin... \n", "DCT00000149 An R/C++ package to identify patterns and biol... \n", "DCT00004852 A web-based tool for comprehensive statistical... \n", "DCT00002174 Translating PubMed and PMC texts to networks f... \n", "\n", " tool_name \n", "tool_accession \n", "DCT00004702 Enrichr \n", "DCT00010044 PAEA \n", "DCT00000149 CoGAPS \n", "DCT00004852 MicrobiomeAnalyst \n", "DCT00002174 HiPub " ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "results = search_datasets2tools({'object_type': 'tool',\n", " 'q': 'enrichment'})\n", "results.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##### 2.3.3 By Dataset\n", "Search all tools which have analyzed GEO dataset GSE775." ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
analysesarticlestool_descriptiontool_name
tool_accession
DCT000047027759[https://doi.org/10.1093/nar/gkw377]A comprehensive gene set enrichment analysis w...Enrichr
DCT000100437756[]An ultra-fast LINCS L1000 Characteristic Direc...L1000CDS2
DCT000033487435[https://doi.org/10.1093/nar/gkq537]Biological network integration for gene priori...GeneMANIA
DCT000100443879[]Enrichment analysis tool implementing the prin...PAEA
\n", "
" ], "text/plain": [ " analyses articles \\\n", "tool_accession \n", "DCT00004702 7759 [https://doi.org/10.1093/nar/gkw377] \n", "DCT00010043 7756 [] \n", "DCT00003348 7435 [https://doi.org/10.1093/nar/gkq537] \n", "DCT00010044 3879 [] \n", "\n", " tool_description tool_name \n", "tool_accession \n", "DCT00004702 A comprehensive gene set enrichment analysis w... Enrichr \n", "DCT00010043 An ultra-fast LINCS L1000 Characteristic Direc... L1000CDS2 \n", "DCT00003348 Biological network integration for gene priori... GeneMANIA \n", "DCT00010044 Enrichment analysis tool implementing the prin... PAEA " ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "results = search_datasets2tools({'object_type': 'tool',\n", " 'dataset_accession': 'GSE775'})\n", "results.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##### 2.3.4 By Canned Analysis\n", "Search all tools which have been used to generate canned analysis DCA00000002." ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
analysesarticlestool_descriptiontool_name
tool_accession
DCT000047027759[https://doi.org/10.1093/nar/gkw377]A comprehensive gene set enrichment analysis w...Enrichr
\n", "
" ], "text/plain": [ " analyses articles \\\n", "tool_accession \n", "DCT00004702 7759 [https://doi.org/10.1093/nar/gkw377] \n", "\n", " tool_description tool_name \n", "tool_accession \n", "DCT00004702 A comprehensive gene set enrichment analysis w... Enrichr " ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "results = search_datasets2tools({'object_type': 'tool',\n", " 'canned_analysis_accession': 'DCA00000002'})\n", "results.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.10" } }, "nbformat": 4, "nbformat_minor": 2 }