Skip to content

Instantly share code, notes, and snippets.

@armish armish/gsheets_to_gmt.ipynb Secret
Last active Jul 26, 2018

Embed
What would you like to do?
Convert gene tables from Google Spreadsheets into GSEA-compatible GMT format
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The following utility functions provide support for converting a table-formatted gene set data into a GMT file that is compatible with Broad's GSEA software."
]
},
{
"cell_type": "code",
"execution_count": 132,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"from StringIO import StringIO\n",
"import pandas as pd\n",
"import requests\n",
"\n",
"def importFromSpreadSheetAsFramework(key, gid):\n",
" downloadURL = \"https://docs.google.com/spreadsheets/d/{}/export?gid={}&format=csv\".format(key, gid)\n",
" req = requests.get(downloadURL)\n",
" df = pd.read_csv(StringIO(req.content), header=0)\n",
" return df\n",
"\n",
"def GSEAifyColumn(df, columnIdx, customName):\n",
" df[columnIdx] = df[columnIdx].apply(lambda x: customName + x.upper().replace(\" \", \"_\"))\n",
" return df\n",
"\n",
"def GMTifyFromSpreadSheet(sskey, ssgid, customPrefix, columnIdx, symbolIdx):\n",
" df = importFromSpreadSheetAsFramework(sskey, ssgid)\n",
" df[\"DESC\"] = df[columnIdx]\n",
" dfgsea = GSEAifyColumn(df, columnIdx, customPrefix)\n",
" dfagg = dfgsea.groupby(columnIdx).agg({\"DESC\": lambda x: x.iloc[0],\n",
" symbolIdx: lambda x: '\\t'.join(set(x))})\n",
" return dfagg[[\"DESC\", symbolIdx]]\n",
"\n",
"def saveAsGMT(dfgmt, filename):\n",
" sep = '\\t'\n",
" gmtfile = open(filename, 'w')\n",
" for index, row in dfgmt.iterrows():\n",
" gmtfile.write(index + sep + sep.join(row) + '\\n')\n",
" gmtfile.close"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In this particular example, we have [a single spreadsheet](https://docs.google.com/spreadsheets/d/1gUmc6RoTVcpXBsj5Ypc2RKX3-wPrbVhznQjLj6hJkOw/edit#gid=750136295) (key: `1gUmc6RoTVcpXBsj5Ypc2RKX3-wPrbVhznQjLj6hJkOw`) with two tabs corresponding to two data sources with different column structures. We convert these into GMTs and save them with the name of the lead author for later use."
]
},
{
"cell_type": "code",
"execution_count": 133,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"spreadSheetKey = \"1gUmc6RoTVcpXBsj5Ypc2RKX3-wPrbVhznQjLj6hJkOw\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Bindea et al gene set"
]
},
{
"cell_type": "code",
"execution_count": 134,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>DESC</th>\n",
" <th>Symbol</th>\n",
" </tr>\n",
" <tr>\n",
" <th>CellType</th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>BINDEA-ADC</th>\n",
" <td>aDC</td>\n",
" <td>INDO\\tCCL1\\tLAMP3\\tEBI3\\tOAS3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BINDEA-BLOOD_VESSELS</th>\n",
" <td>Blood vessels</td>\n",
" <td>CDH5</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BINDEA-B_CELLS</th>\n",
" <td>B cells</td>\n",
" <td>CD72\\tIGHA1\\tBCL11A\\tIGHG1\\tSLC15A2\\tKIAA0125\\...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BINDEA-CD8_T_CELLS</th>\n",
" <td>CD8 T cells</td>\n",
" <td>AES\\tRBM3\\tCDKN2AIP\\tC19orf6\\tSF1\\tARHGAP8\\tPF...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BINDEA-CYTOTOXIC_CELLS</th>\n",
" <td>Cytotoxic cells</td>\n",
" <td>WHDC1L1\\tKLRB1\\tGZMA\\tAPBA2\\tKLRD1\\tZBTB16\\tGN...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BINDEA-DC</th>\n",
" <td>DC</td>\n",
" <td>NPR1\\tCCL13\\tCCL17\\tPPFIBP2\\tCD209\\tCCL22\\tHSD...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BINDEA-EOSINOPHILS</th>\n",
" <td>Eosinophils</td>\n",
" <td>RNU2\\tEMR1\\tIGSF2\\tCAT\\tRCOR3\\tABHD2\\tCCR3\\tSM...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BINDEA-IDC</th>\n",
" <td>iDC</td>\n",
" <td>CLEC10A\\tCD1E\\tCD1B\\tCD1C\\tMMP12\\tCD1A\\tFABP4\\...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BINDEA-LYMPH_VESSELS</th>\n",
" <td>Lymph vessels</td>\n",
" <td>FIGF\\tVEGFC\\tPDPN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BINDEA-MACROPHAGES</th>\n",
" <td>Macrophages</td>\n",
" <td>CCL7\\tSGMS1\\tSCG5\\tPCOLCE2\\tME1\\tCHI3L1\\tPTGDS...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BINDEA-MAST_CELLS</th>\n",
" <td>Mast cells</td>\n",
" <td>PTGS1\\tSCG2\\tHDC\\tPRG2\\tADCYAP1\\tMS4A2\\tHPGD\\t...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BINDEA-NEUTROPHILS</th>\n",
" <td>Neutrophils</td>\n",
" <td>FCGR3B\\tTNFRSF10C\\tSLC25A37\\tCYP4F3\\tS100A12\\t...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BINDEA-NK_CD56BRIGHT_CELLS</th>\n",
" <td>NK CD56bright cells</td>\n",
" <td>FOXJ1\\tMADD\\tMUC3B\\tRRAD\\tMPPED1\\tPLA2G6\\tXCL1...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BINDEA-NK_CD56DIM_CELLS</th>\n",
" <td>NK CD56dim cells</td>\n",
" <td>SPON2\\tKIR2DS5\\tGZMB\\tTMEPAI\\tIL21R\\tKIR2DS2\\t...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BINDEA-NK_CELLS</th>\n",
" <td>NK cells</td>\n",
" <td>ZNF528\\tMCM3AP\\tNM_017616\\tAF107846\\tLOC643313...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BINDEA-NORMAL_MUCOSA</th>\n",
" <td>Normal mucosa</td>\n",
" <td>MYH11\\tFXYD3\\tCDH17\\tSPARCL1\\tTPM1\\tPPAP2B\\tCO...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BINDEA-PDC</th>\n",
" <td>pDC</td>\n",
" <td>IL3RA</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BINDEA-SW480_CANCER_CELLS</th>\n",
" <td>SW480 cancer cells</td>\n",
" <td>VSNL1\\tEEF1A2\\tSLC6A8\\tNTSR1\\tFKBP4\\tSLC27A5\\t...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BINDEA-TCM</th>\n",
" <td>Tcm</td>\n",
" <td>CLUAP1\\tRPP38\\tDOCK9\\tSLC7A6\\tPCM1\\tATM\\tPSPC1...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BINDEA-TEM</th>\n",
" <td>Tem</td>\n",
" <td>DDX17\\tNFATC4\\tTRA@\\tVIL2\\tTBCD\\tFLI1\\tMEFV\\tT...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BINDEA-TFH</th>\n",
" <td>TFH</td>\n",
" <td>TOX\\tHIST1H4K\\tCHGB\\tSMAD1\\tICA1\\tTSHR\\tB3GAT1...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BINDEA-TGD</th>\n",
" <td>Tgd</td>\n",
" <td>TARP\\tFEZ1\\tCD160\\tTRD@\\tTRGV9\\tC1orf61</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BINDEA-TH17_CELLS</th>\n",
" <td>Th17 cells</td>\n",
" <td>RORC\\tIL17A\\tIL17RA</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BINDEA-TH1_CELLS</th>\n",
" <td>Th1 cells</td>\n",
" <td>CD38\\tCMAH\\tCD70\\tCCL4\\tIL22\\tATP9A\\tAPOD\\tBTG...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BINDEA-TH2_CELLS</th>\n",
" <td>Th2 cells</td>\n",
" <td>DHFR\\tBIRC5\\tLAIR2\\tAHI1\\tSMAD2\\tIL26\\tWDHD1\\t...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BINDEA-TREG</th>\n",
" <td>TReg</td>\n",
" <td>FOXP3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BINDEA-T_CELLS</th>\n",
" <td>T cells</td>\n",
" <td>CD28\\tTRA@\\tNCALD\\tCD96\\tSH2D1A\\tITM2A\\tBCL11B...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>BINDEA-T_HELPER_CELLS</th>\n",
" <td>T helper cells</td>\n",
" <td>BATF\\tFRYL\\tPHF10\\tATF2\\tANP32B\\tUBE2L3\\tSLC25...</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" DESC \\\n",
"CellType \n",
"BINDEA-ADC aDC \n",
"BINDEA-BLOOD_VESSELS Blood vessels \n",
"BINDEA-B_CELLS B cells \n",
"BINDEA-CD8_T_CELLS CD8 T cells \n",
"BINDEA-CYTOTOXIC_CELLS Cytotoxic cells \n",
"BINDEA-DC DC \n",
"BINDEA-EOSINOPHILS Eosinophils \n",
"BINDEA-IDC iDC \n",
"BINDEA-LYMPH_VESSELS Lymph vessels \n",
"BINDEA-MACROPHAGES Macrophages \n",
"BINDEA-MAST_CELLS Mast cells \n",
"BINDEA-NEUTROPHILS Neutrophils \n",
"BINDEA-NK_CD56BRIGHT_CELLS NK CD56bright cells \n",
"BINDEA-NK_CD56DIM_CELLS NK CD56dim cells \n",
"BINDEA-NK_CELLS NK cells \n",
"BINDEA-NORMAL_MUCOSA Normal mucosa \n",
"BINDEA-PDC pDC \n",
"BINDEA-SW480_CANCER_CELLS SW480 cancer cells \n",
"BINDEA-TCM Tcm \n",
"BINDEA-TEM Tem \n",
"BINDEA-TFH TFH \n",
"BINDEA-TGD Tgd \n",
"BINDEA-TH17_CELLS Th17 cells \n",
"BINDEA-TH1_CELLS Th1 cells \n",
"BINDEA-TH2_CELLS Th2 cells \n",
"BINDEA-TREG TReg \n",
"BINDEA-T_CELLS T cells \n",
"BINDEA-T_HELPER_CELLS T helper cells \n",
"\n",
" Symbol \n",
"CellType \n",
"BINDEA-ADC INDO\\tCCL1\\tLAMP3\\tEBI3\\tOAS3 \n",
"BINDEA-BLOOD_VESSELS CDH5 \n",
"BINDEA-B_CELLS CD72\\tIGHA1\\tBCL11A\\tIGHG1\\tSLC15A2\\tKIAA0125\\... \n",
"BINDEA-CD8_T_CELLS AES\\tRBM3\\tCDKN2AIP\\tC19orf6\\tSF1\\tARHGAP8\\tPF... \n",
"BINDEA-CYTOTOXIC_CELLS WHDC1L1\\tKLRB1\\tGZMA\\tAPBA2\\tKLRD1\\tZBTB16\\tGN... \n",
"BINDEA-DC NPR1\\tCCL13\\tCCL17\\tPPFIBP2\\tCD209\\tCCL22\\tHSD... \n",
"BINDEA-EOSINOPHILS RNU2\\tEMR1\\tIGSF2\\tCAT\\tRCOR3\\tABHD2\\tCCR3\\tSM... \n",
"BINDEA-IDC CLEC10A\\tCD1E\\tCD1B\\tCD1C\\tMMP12\\tCD1A\\tFABP4\\... \n",
"BINDEA-LYMPH_VESSELS FIGF\\tVEGFC\\tPDPN \n",
"BINDEA-MACROPHAGES CCL7\\tSGMS1\\tSCG5\\tPCOLCE2\\tME1\\tCHI3L1\\tPTGDS... \n",
"BINDEA-MAST_CELLS PTGS1\\tSCG2\\tHDC\\tPRG2\\tADCYAP1\\tMS4A2\\tHPGD\\t... \n",
"BINDEA-NEUTROPHILS FCGR3B\\tTNFRSF10C\\tSLC25A37\\tCYP4F3\\tS100A12\\t... \n",
"BINDEA-NK_CD56BRIGHT_CELLS FOXJ1\\tMADD\\tMUC3B\\tRRAD\\tMPPED1\\tPLA2G6\\tXCL1... \n",
"BINDEA-NK_CD56DIM_CELLS SPON2\\tKIR2DS5\\tGZMB\\tTMEPAI\\tIL21R\\tKIR2DS2\\t... \n",
"BINDEA-NK_CELLS ZNF528\\tMCM3AP\\tNM_017616\\tAF107846\\tLOC643313... \n",
"BINDEA-NORMAL_MUCOSA MYH11\\tFXYD3\\tCDH17\\tSPARCL1\\tTPM1\\tPPAP2B\\tCO... \n",
"BINDEA-PDC IL3RA \n",
"BINDEA-SW480_CANCER_CELLS VSNL1\\tEEF1A2\\tSLC6A8\\tNTSR1\\tFKBP4\\tSLC27A5\\t... \n",
"BINDEA-TCM CLUAP1\\tRPP38\\tDOCK9\\tSLC7A6\\tPCM1\\tATM\\tPSPC1... \n",
"BINDEA-TEM DDX17\\tNFATC4\\tTRA@\\tVIL2\\tTBCD\\tFLI1\\tMEFV\\tT... \n",
"BINDEA-TFH TOX\\tHIST1H4K\\tCHGB\\tSMAD1\\tICA1\\tTSHR\\tB3GAT1... \n",
"BINDEA-TGD TARP\\tFEZ1\\tCD160\\tTRD@\\tTRGV9\\tC1orf61 \n",
"BINDEA-TH17_CELLS RORC\\tIL17A\\tIL17RA \n",
"BINDEA-TH1_CELLS CD38\\tCMAH\\tCD70\\tCCL4\\tIL22\\tATP9A\\tAPOD\\tBTG... \n",
"BINDEA-TH2_CELLS DHFR\\tBIRC5\\tLAIR2\\tAHI1\\tSMAD2\\tIL26\\tWDHD1\\t... \n",
"BINDEA-TREG FOXP3 \n",
"BINDEA-T_CELLS CD28\\tTRA@\\tNCALD\\tCD96\\tSH2D1A\\tITM2A\\tBCL11B... \n",
"BINDEA-T_HELPER_CELLS BATF\\tFRYL\\tPHF10\\tATF2\\tANP32B\\tUBE2L3\\tSLC25... "
]
},
"execution_count": 134,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"bindeaGMT = GMTifyFromSpreadSheet(spreadSheetKey, \"750136295\", \"BINDEA-\", \"CellType\", \"Symbol\")\n",
"saveAsGMT(bindeaGMT, \"custom.bindea.gmt\")\n",
"bindeaGMT"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Senbabaoglu et al"
]
},
{
"cell_type": "code",
"execution_count": 135,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>DESC</th>\n",
" <th>Symbol</th>\n",
" </tr>\n",
" <tr>\n",
" <th>Cell.Type</th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>SENBABAOGLU-ADC</th>\n",
" <td>aDC</td>\n",
" <td>INDO\\tCCL1\\tLAMP3\\tEBI3\\tOAS3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SENBABAOGLU-ANGIOGENESIS</th>\n",
" <td>Angiogenesis</td>\n",
" <td>ITGA9\\tEMCN\\tSPARCL1\\tCLEC14A\\tEDNRB\\tA2M\\tPLV...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SENBABAOGLU-APM1</th>\n",
" <td>APM1</td>\n",
" <td>TAP1\\tTAP2\\tHLA-C\\tHLA-B\\tHLA-A\\tTAPBP\\tB2M</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SENBABAOGLU-APM2</th>\n",
" <td>APM2</td>\n",
" <td>HLA-DPB1\\tHLA-DPB2\\tHLA-DRB1\\tHLA-DRB6\\tHLA-DR...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SENBABAOGLU-B_CELLS</th>\n",
" <td>B cells</td>\n",
" <td>CD72\\tIGHA1\\tBCL11A\\tIGHG1\\tSLC15A2\\tKIAA0125\\...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SENBABAOGLU-CD8_T_CELLS</th>\n",
" <td>CD8 T cells</td>\n",
" <td>AES\\tRBM3\\tCDKN2AIP\\tC19orf6\\tSF1\\tARHGAP8\\tPF...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SENBABAOGLU-CTLA4</th>\n",
" <td>CTLA4</td>\n",
" <td>CTLA4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SENBABAOGLU-CYTOTOXIC_CELLS</th>\n",
" <td>Cytotoxic cells</td>\n",
" <td>KLRB1\\tGZMA\\tAPBA2\\tKLRD1\\tZBTB16\\tGNLY\\tGZMH\\...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SENBABAOGLU-DC</th>\n",
" <td>DC</td>\n",
" <td>NPR1\\tCCL13\\tCCL17\\tPPFIBP2\\tCD209\\tCCL22\\tHSD...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SENBABAOGLU-EOSINOPHILS</th>\n",
" <td>Eosinophils</td>\n",
" <td>EMR1\\tIGSF2\\tCAT\\tRCOR3\\tABHD2\\tCCR3\\tSMPD3\\tC...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SENBABAOGLU-IDC</th>\n",
" <td>iDC</td>\n",
" <td>CLEC10A\\tCD1E\\tCD1B\\tCD1C\\tMMP12\\tCD1A\\tFABP4\\...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SENBABAOGLU-LYMPH_VESSELS</th>\n",
" <td>Lymph vessels</td>\n",
" <td>FIGF\\tVEGFC\\tPDPN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SENBABAOGLU-MACROPHAGES</th>\n",
" <td>Macrophages</td>\n",
" <td>CCL7\\tSGMS1\\tSCG5\\tPCOLCE2\\tME1\\tCHI3L1\\tPTGDS...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SENBABAOGLU-MAST_CELLS</th>\n",
" <td>Mast cells</td>\n",
" <td>PTGS1\\tSCG2\\tHDC\\tPRG2\\tADCYAP1\\tMS4A2\\tHPGD\\t...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SENBABAOGLU-NEUTROPHILS</th>\n",
" <td>Neutrophils</td>\n",
" <td>FCGR3B\\tTNFRSF10C\\tSLC25A37\\tCYP4F3\\tS100A12\\t...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SENBABAOGLU-NK_CD56BRIGHT_CELLS</th>\n",
" <td>NK CD56bright cells</td>\n",
" <td>FOXJ1\\tMADD\\tMUC3B\\tRRAD\\tMPPED1\\tXCL1\\tPLA2G6...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SENBABAOGLU-NK_CD56DIM_CELLS</th>\n",
" <td>NK CD56dim cells</td>\n",
" <td>SPON2\\tKIR2DS5\\tGZMB\\tTMEPAI\\tIL21R\\tKIR2DS2\\t...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SENBABAOGLU-NK_CELLS</th>\n",
" <td>NK cells</td>\n",
" <td>ZNF528\\tMCM3AP\\tPSMD4\\tTINAGL1\\tRP5-886K2.1\\tS...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SENBABAOGLU-PD1</th>\n",
" <td>PD1</td>\n",
" <td>PDCD1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SENBABAOGLU-PDC</th>\n",
" <td>pDC</td>\n",
" <td>IL3RA</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SENBABAOGLU-PDL1</th>\n",
" <td>PDL1</td>\n",
" <td>CD274</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SENBABAOGLU-TCM_CELLS</th>\n",
" <td>Tcm cells</td>\n",
" <td>CLUAP1\\tRPP38\\tDOCK9\\tSLC7A6\\tPCM1\\tATM\\tPSPC1...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SENBABAOGLU-TEM_CELLS</th>\n",
" <td>Tem cells</td>\n",
" <td>DDX17\\tNFATC4\\tVIL2\\tTRA\\tTBCD\\tFLI1\\tMEFV\\tTB...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SENBABAOGLU-TFH_CELLS</th>\n",
" <td>Tfh cells</td>\n",
" <td>TOX\\tHIST1H4K\\tCHGB\\tSMAD1\\tICA1\\tTSHR\\tB3GAT1...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SENBABAOGLU-TGD_CELLS</th>\n",
" <td>Tgd cells</td>\n",
" <td>TARP\\tFEZ1\\tCD160\\tTRD\\tTRGV9\\tC1orf61</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SENBABAOGLU-TH17_CELLS</th>\n",
" <td>Th17 cells</td>\n",
" <td>RORC\\tIL17A\\tIL17RA</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SENBABAOGLU-TH1_CELLS</th>\n",
" <td>Th1 cells</td>\n",
" <td>CD38\\tCMAH\\tCD70\\tCCL4\\tIL22\\tATP9A\\tAPOD\\tBTG...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SENBABAOGLU-TH2_CELLS</th>\n",
" <td>Th2 cells</td>\n",
" <td>DHFR\\tBIRC5\\tLAIR2\\tAHI1\\tSMAD2\\tIL26\\tWDHD1\\t...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SENBABAOGLU-TREG_CELLS</th>\n",
" <td>Treg cells</td>\n",
" <td>FOXP3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SENBABAOGLU-T_CELLS</th>\n",
" <td>T cells</td>\n",
" <td>CD28\\tTRBC1\\tTRAC\\tNCALD\\tCD96\\tSH2D1A\\tITM2A\\...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SENBABAOGLU-T_HELPER_CELLS</th>\n",
" <td>T helper cells</td>\n",
" <td>BATF\\tFRYL\\tPHF10\\tYME1L1\\tATF2\\tANP32B\\tSRSF1...</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" DESC \\\n",
"Cell.Type \n",
"SENBABAOGLU-ADC aDC \n",
"SENBABAOGLU-ANGIOGENESIS Angiogenesis \n",
"SENBABAOGLU-APM1 APM1 \n",
"SENBABAOGLU-APM2 APM2 \n",
"SENBABAOGLU-B_CELLS B cells \n",
"SENBABAOGLU-CD8_T_CELLS CD8 T cells \n",
"SENBABAOGLU-CTLA4 CTLA4 \n",
"SENBABAOGLU-CYTOTOXIC_CELLS Cytotoxic cells \n",
"SENBABAOGLU-DC DC \n",
"SENBABAOGLU-EOSINOPHILS Eosinophils \n",
"SENBABAOGLU-IDC iDC \n",
"SENBABAOGLU-LYMPH_VESSELS Lymph vessels \n",
"SENBABAOGLU-MACROPHAGES Macrophages \n",
"SENBABAOGLU-MAST_CELLS Mast cells \n",
"SENBABAOGLU-NEUTROPHILS Neutrophils \n",
"SENBABAOGLU-NK_CD56BRIGHT_CELLS NK CD56bright cells \n",
"SENBABAOGLU-NK_CD56DIM_CELLS NK CD56dim cells \n",
"SENBABAOGLU-NK_CELLS NK cells \n",
"SENBABAOGLU-PD1 PD1 \n",
"SENBABAOGLU-PDC pDC \n",
"SENBABAOGLU-PDL1 PDL1 \n",
"SENBABAOGLU-TCM_CELLS Tcm cells \n",
"SENBABAOGLU-TEM_CELLS Tem cells \n",
"SENBABAOGLU-TFH_CELLS Tfh cells \n",
"SENBABAOGLU-TGD_CELLS Tgd cells \n",
"SENBABAOGLU-TH17_CELLS Th17 cells \n",
"SENBABAOGLU-TH1_CELLS Th1 cells \n",
"SENBABAOGLU-TH2_CELLS Th2 cells \n",
"SENBABAOGLU-TREG_CELLS Treg cells \n",
"SENBABAOGLU-T_CELLS T cells \n",
"SENBABAOGLU-T_HELPER_CELLS T helper cells \n",
"\n",
" Symbol \n",
"Cell.Type \n",
"SENBABAOGLU-ADC INDO\\tCCL1\\tLAMP3\\tEBI3\\tOAS3 \n",
"SENBABAOGLU-ANGIOGENESIS ITGA9\\tEMCN\\tSPARCL1\\tCLEC14A\\tEDNRB\\tA2M\\tPLV... \n",
"SENBABAOGLU-APM1 TAP1\\tTAP2\\tHLA-C\\tHLA-B\\tHLA-A\\tTAPBP\\tB2M \n",
"SENBABAOGLU-APM2 HLA-DPB1\\tHLA-DPB2\\tHLA-DRB1\\tHLA-DRB6\\tHLA-DR... \n",
"SENBABAOGLU-B_CELLS CD72\\tIGHA1\\tBCL11A\\tIGHG1\\tSLC15A2\\tKIAA0125\\... \n",
"SENBABAOGLU-CD8_T_CELLS AES\\tRBM3\\tCDKN2AIP\\tC19orf6\\tSF1\\tARHGAP8\\tPF... \n",
"SENBABAOGLU-CTLA4 CTLA4 \n",
"SENBABAOGLU-CYTOTOXIC_CELLS KLRB1\\tGZMA\\tAPBA2\\tKLRD1\\tZBTB16\\tGNLY\\tGZMH\\... \n",
"SENBABAOGLU-DC NPR1\\tCCL13\\tCCL17\\tPPFIBP2\\tCD209\\tCCL22\\tHSD... \n",
"SENBABAOGLU-EOSINOPHILS EMR1\\tIGSF2\\tCAT\\tRCOR3\\tABHD2\\tCCR3\\tSMPD3\\tC... \n",
"SENBABAOGLU-IDC CLEC10A\\tCD1E\\tCD1B\\tCD1C\\tMMP12\\tCD1A\\tFABP4\\... \n",
"SENBABAOGLU-LYMPH_VESSELS FIGF\\tVEGFC\\tPDPN \n",
"SENBABAOGLU-MACROPHAGES CCL7\\tSGMS1\\tSCG5\\tPCOLCE2\\tME1\\tCHI3L1\\tPTGDS... \n",
"SENBABAOGLU-MAST_CELLS PTGS1\\tSCG2\\tHDC\\tPRG2\\tADCYAP1\\tMS4A2\\tHPGD\\t... \n",
"SENBABAOGLU-NEUTROPHILS FCGR3B\\tTNFRSF10C\\tSLC25A37\\tCYP4F3\\tS100A12\\t... \n",
"SENBABAOGLU-NK_CD56BRIGHT_CELLS FOXJ1\\tMADD\\tMUC3B\\tRRAD\\tMPPED1\\tXCL1\\tPLA2G6... \n",
"SENBABAOGLU-NK_CD56DIM_CELLS SPON2\\tKIR2DS5\\tGZMB\\tTMEPAI\\tIL21R\\tKIR2DS2\\t... \n",
"SENBABAOGLU-NK_CELLS ZNF528\\tMCM3AP\\tPSMD4\\tTINAGL1\\tRP5-886K2.1\\tS... \n",
"SENBABAOGLU-PD1 PDCD1 \n",
"SENBABAOGLU-PDC IL3RA \n",
"SENBABAOGLU-PDL1 CD274 \n",
"SENBABAOGLU-TCM_CELLS CLUAP1\\tRPP38\\tDOCK9\\tSLC7A6\\tPCM1\\tATM\\tPSPC1... \n",
"SENBABAOGLU-TEM_CELLS DDX17\\tNFATC4\\tVIL2\\tTRA\\tTBCD\\tFLI1\\tMEFV\\tTB... \n",
"SENBABAOGLU-TFH_CELLS TOX\\tHIST1H4K\\tCHGB\\tSMAD1\\tICA1\\tTSHR\\tB3GAT1... \n",
"SENBABAOGLU-TGD_CELLS TARP\\tFEZ1\\tCD160\\tTRD\\tTRGV9\\tC1orf61 \n",
"SENBABAOGLU-TH17_CELLS RORC\\tIL17A\\tIL17RA \n",
"SENBABAOGLU-TH1_CELLS CD38\\tCMAH\\tCD70\\tCCL4\\tIL22\\tATP9A\\tAPOD\\tBTG... \n",
"SENBABAOGLU-TH2_CELLS DHFR\\tBIRC5\\tLAIR2\\tAHI1\\tSMAD2\\tIL26\\tWDHD1\\t... \n",
"SENBABAOGLU-TREG_CELLS FOXP3 \n",
"SENBABAOGLU-T_CELLS CD28\\tTRBC1\\tTRAC\\tNCALD\\tCD96\\tSH2D1A\\tITM2A\\... \n",
"SENBABAOGLU-T_HELPER_CELLS BATF\\tFRYL\\tPHF10\\tYME1L1\\tATF2\\tANP32B\\tSRSF1... "
]
},
"execution_count": 135,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"senbabaGMT = GMTifyFromSpreadSheet(spreadSheetKey, \"795328083\", \"SENBABAOGLU-\", \"Cell.Type\", \"Symbol\")\n",
"saveAsGMT(senbabaGMT, \"custom.senbabaoglu.gmt\")\n",
"senbabaGMT"
]
}
],
"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": 0
}
@vallurumk

This comment has been minimized.

Copy link

commented Jul 26, 2018

Thank you so much for sharing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.