Created
February 2, 2019 03:51
-
-
Save k3yavi/ac748e9790e23cba69090d545585e848 to your computer and use it in GitHub Desktop.
Go analysis in R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stderr", | |
"output_type": "stream", | |
"text": [ | |
"Loading required package: BiocGenerics\n", | |
"Loading required package: parallel\n", | |
"\n", | |
"Attaching package: ‘BiocGenerics’\n", | |
"\n", | |
"The following objects are masked from ‘package:parallel’:\n", | |
"\n", | |
" clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,\n", | |
" clusterExport, clusterMap, parApply, parCapply, parLapply,\n", | |
" parLapplyLB, parRapply, parSapply, parSapplyLB\n", | |
"\n", | |
"The following objects are masked from ‘package:stats’:\n", | |
"\n", | |
" IQR, mad, sd, var, xtabs\n", | |
"\n", | |
"The following objects are masked from ‘package:base’:\n", | |
"\n", | |
" anyDuplicated, append, as.data.frame, basename, cbind, colMeans,\n", | |
" colnames, colSums, dirname, do.call, duplicated, eval, evalq,\n", | |
" Filter, Find, get, grep, grepl, intersect, is.unsorted, lapply,\n", | |
" lengths, Map, mapply, match, mget, order, paste, pmax, pmax.int,\n", | |
" pmin, pmin.int, Position, rank, rbind, Reduce, rowMeans, rownames,\n", | |
" rowSums, sapply, setdiff, sort, table, tapply, union, unique,\n", | |
" unsplit, which, which.max, which.min\n", | |
"\n", | |
"Loading required package: graph\n", | |
"Loading required package: Biobase\n", | |
"Welcome to Bioconductor\n", | |
"\n", | |
" Vignettes contain introductory material; view with\n", | |
" 'browseVignettes()'. To cite Bioconductor, see\n", | |
" 'citation(\"Biobase\")', and for packages 'citation(\"pkgname\")'.\n", | |
"\n", | |
"Loading required package: GO.db\n", | |
"Loading required package: AnnotationDbi\n", | |
"Loading required package: stats4\n", | |
"Loading required package: IRanges\n", | |
"Loading required package: S4Vectors\n", | |
"\n", | |
"Attaching package: ‘S4Vectors’\n", | |
"\n", | |
"The following object is masked from ‘package:base’:\n", | |
"\n", | |
" expand.grid\n", | |
"\n", | |
"\n", | |
"Loading required package: SparseM\n", | |
"\n", | |
"Attaching package: ‘SparseM’\n", | |
"\n", | |
"The following object is masked from ‘package:base’:\n", | |
"\n", | |
" backsolve\n", | |
"\n", | |
"\n", | |
"groupGOTerms: \tGOBPTerm, GOMFTerm, GOCCTerm environments built.\n", | |
"\n", | |
"Attaching package: ‘topGO’\n", | |
"\n", | |
"The following object is masked from ‘package:IRanges’:\n", | |
"\n", | |
" members\n", | |
"\n", | |
"\n" | |
] | |
} | |
], | |
"source": [ | |
"library(topGO)\n", | |
"library(org.Hs.eg.db)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stderr", | |
"output_type": "stream", | |
"text": [ | |
"\n", | |
"Attaching package: ‘AnnotationHub’\n", | |
"\n", | |
"The following object is masked from ‘package:Biobase’:\n", | |
"\n", | |
" cache\n", | |
"\n", | |
"snapshotDate(): 2018-10-24\n", | |
"downloading 0 resources\n", | |
"loading from cache \n", | |
" ‘/home/avi//.AnnotationHub/72902’\n", | |
"\n", | |
"Please see: help('select') for usage information\n" | |
] | |
}, | |
{ | |
"data": { | |
"text/plain": [ | |
"OrgDb object:\n", | |
"| DBSCHEMAVERSION: 2.1\n", | |
"| Db type: OrgDb\n", | |
"| Supporting package: AnnotationDbi\n", | |
"| DBSCHEMA: HUMAN_DB\n", | |
"| ORGANISM: Homo sapiens\n", | |
"| SPECIES: Human\n", | |
"| EGSOURCEDATE: 2018-Oct11\n", | |
"| EGSOURCENAME: Entrez Gene\n", | |
"| EGSOURCEURL: ftp://ftp.ncbi.nlm.nih.gov/gene/DATA\n", | |
"| CENTRALID: EG\n", | |
"| TAXID: 9606\n", | |
"| GOSOURCENAME: Gene Ontology\n", | |
"| GOSOURCEURL: ftp://ftp.geneontology.org/pub/go/godatabase/archive/latest-lite/\n", | |
"| GOSOURCEDATE: 2018-Oct10\n", | |
"| GOEGSOURCEDATE: 2018-Oct11\n", | |
"| GOEGSOURCENAME: Entrez Gene\n", | |
"| GOEGSOURCEURL: ftp://ftp.ncbi.nlm.nih.gov/gene/DATA\n", | |
"| KEGGSOURCENAME: KEGG GENOME\n", | |
"| KEGGSOURCEURL: ftp://ftp.genome.jp/pub/kegg/genomes\n", | |
"| KEGGSOURCEDATE: 2011-Mar15\n", | |
"| GPSOURCENAME: UCSC Genome Bioinformatics (Homo sapiens)\n", | |
"| GPSOURCEURL: \n", | |
"| GPSOURCEDATE: 2018-Oct2\n", | |
"| ENSOURCEDATE: 2018-Oct05\n", | |
"| ENSOURCENAME: Ensembl\n", | |
"| ENSOURCEURL: ftp://ftp.ensembl.org/pub/current_fasta\n", | |
"| UPSOURCENAME: Uniprot\n", | |
"| UPSOURCEURL: http://www.UniProt.org/\n", | |
"| UPSOURCEDATE: Thu Oct 18 05:22:10 2018" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
}, | |
{ | |
"name": "stderr", | |
"output_type": "stream", | |
"text": [ | |
"'select()' returned 1:1 mapping between keys and columns\n" | |
] | |
}, | |
{ | |
"data": { | |
"text/html": [ | |
"<table>\n", | |
"<thead><tr><th scope=col>SYMBOL</th><th scope=col>GENENAME</th></tr></thead>\n", | |
"<tbody>\n", | |
"\t<tr><td>HLA-A </td><td>major histocompatibility complex, class I, A</td></tr>\n", | |
"</tbody>\n", | |
"</table>\n" | |
], | |
"text/latex": [ | |
"\\begin{tabular}{r|ll}\n", | |
" SYMBOL & GENENAME\\\\\n", | |
"\\hline\n", | |
"\t HLA-A & major histocompatibility complex, class I, A\\\\\n", | |
"\\end{tabular}\n" | |
], | |
"text/markdown": [ | |
"\n", | |
"SYMBOL | GENENAME | \n", | |
"|---|\n", | |
"| HLA-A | major histocompatibility complex, class I, A | \n", | |
"\n", | |
"\n" | |
], | |
"text/plain": [ | |
" SYMBOL GENENAME \n", | |
"1 HLA-A major histocompatibility complex, class I, A" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
}, | |
{ | |
"name": "stderr", | |
"output_type": "stream", | |
"text": [ | |
"'select()' returned 1:many mapping between keys and columns\n" | |
] | |
}, | |
{ | |
"data": { | |
"text/html": [ | |
"<table>\n", | |
"<thead><tr><th></th><th scope=col>SYMBOL</th><th scope=col>GO</th><th scope=col>EVIDENCE</th><th scope=col>ONTOLOGY</th></tr></thead>\n", | |
"<tbody>\n", | |
"\t<tr><th scope=row>2</th><td>HLA-A </td><td>GO:0001916</td><td>IBA </td><td>BP </td></tr>\n", | |
"\t<tr><th scope=row>3</th><td>HLA-A </td><td>GO:0002474</td><td>TAS </td><td>BP </td></tr>\n", | |
"\t<tr><th scope=row>4</th><td>HLA-A </td><td>GO:0002476</td><td>IBA </td><td>BP </td></tr>\n", | |
"\t<tr><th scope=row>5</th><td>HLA-A </td><td>GO:0002479</td><td>TAS </td><td>BP </td></tr>\n", | |
"\t<tr><th scope=row>6</th><td>HLA-A </td><td>GO:0002480</td><td>TAS </td><td>BP </td></tr>\n", | |
"\t<tr><th scope=row>14</th><td>HLA-A </td><td>GO:0006955</td><td>IBA </td><td>BP </td></tr>\n", | |
"\t<tr><th scope=row>25</th><td>HLA-A </td><td>GO:0050776</td><td>TAS </td><td>BP </td></tr>\n", | |
"\t<tr><th scope=row>27</th><td>HLA-A </td><td>GO:0060333</td><td>TAS </td><td>BP </td></tr>\n", | |
"\t<tr><th scope=row>28</th><td>HLA-A </td><td>GO:0060337</td><td>TAS </td><td>BP </td></tr>\n", | |
"</tbody>\n", | |
"</table>\n" | |
], | |
"text/latex": [ | |
"\\begin{tabular}{r|llll}\n", | |
" & SYMBOL & GO & EVIDENCE & ONTOLOGY\\\\\n", | |
"\\hline\n", | |
"\t2 & HLA-A & GO:0001916 & IBA & BP \\\\\n", | |
"\t3 & HLA-A & GO:0002474 & TAS & BP \\\\\n", | |
"\t4 & HLA-A & GO:0002476 & IBA & BP \\\\\n", | |
"\t5 & HLA-A & GO:0002479 & TAS & BP \\\\\n", | |
"\t6 & HLA-A & GO:0002480 & TAS & BP \\\\\n", | |
"\t14 & HLA-A & GO:0006955 & IBA & BP \\\\\n", | |
"\t25 & HLA-A & GO:0050776 & TAS & BP \\\\\n", | |
"\t27 & HLA-A & GO:0060333 & TAS & BP \\\\\n", | |
"\t28 & HLA-A & GO:0060337 & TAS & BP \\\\\n", | |
"\\end{tabular}\n" | |
], | |
"text/markdown": [ | |
"\n", | |
"| <!--/--> | SYMBOL | GO | EVIDENCE | ONTOLOGY | \n", | |
"|---|---|---|---|---|---|---|---|---|\n", | |
"| 2 | HLA-A | GO:0001916 | IBA | BP | \n", | |
"| 3 | HLA-A | GO:0002474 | TAS | BP | \n", | |
"| 4 | HLA-A | GO:0002476 | IBA | BP | \n", | |
"| 5 | HLA-A | GO:0002479 | TAS | BP | \n", | |
"| 6 | HLA-A | GO:0002480 | TAS | BP | \n", | |
"| 14 | HLA-A | GO:0006955 | IBA | BP | \n", | |
"| 25 | HLA-A | GO:0050776 | TAS | BP | \n", | |
"| 27 | HLA-A | GO:0060333 | TAS | BP | \n", | |
"| 28 | HLA-A | GO:0060337 | TAS | BP | \n", | |
"\n", | |
"\n" | |
], | |
"text/plain": [ | |
" SYMBOL GO EVIDENCE ONTOLOGY\n", | |
"2 HLA-A GO:0001916 IBA BP \n", | |
"3 HLA-A GO:0002474 TAS BP \n", | |
"4 HLA-A GO:0002476 IBA BP \n", | |
"5 HLA-A GO:0002479 TAS BP \n", | |
"6 HLA-A GO:0002480 TAS BP \n", | |
"14 HLA-A GO:0006955 IBA BP \n", | |
"25 HLA-A GO:0050776 TAS BP \n", | |
"27 HLA-A GO:0060333 TAS BP \n", | |
"28 HLA-A GO:0060337 TAS BP " | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"# Mike's titorial for getting annotations\n", | |
"library(\"AnnotationHub\")\n", | |
"ah <- AnnotationHub()\n", | |
"\n", | |
"orgs <- subset(ah, ah$rdataclass == \"OrgDb\")\n", | |
"orgdb <- query(orgs, \"Homo sapiens\")[[1]]\n", | |
"\n", | |
"orgdb\n", | |
"\n", | |
"select(orgdb, keys=\"HLA-A\", columns=\"GENENAME\", keytype=\"SYMBOL\")\n", | |
"go <- select(orgdb, \"HLA-A\", \"GO\", \"SYMBOL\")\n", | |
"go[go$ONTOLOGY == \"BP\",]" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<table>\n", | |
"<thead><tr><th scope=col>ensembl_gene_id</th><th scope=col>go_id</th></tr></thead>\n", | |
"<tbody>\n", | |
"\t<tr><td>ENSG00000147403</td><td> </td></tr>\n", | |
"\t<tr><td>ENSG00000147403</td><td>GO:0003723 </td></tr>\n", | |
"\t<tr><td>ENSG00000147403</td><td>GO:0016020 </td></tr>\n", | |
"\t<tr><td>ENSG00000147403</td><td>GO:0006412 </td></tr>\n", | |
"\t<tr><td>ENSG00000147403</td><td>GO:0005783 </td></tr>\n", | |
"\t<tr><td>ENSG00000147403</td><td>GO:0005829 </td></tr>\n", | |
"</tbody>\n", | |
"</table>\n" | |
], | |
"text/latex": [ | |
"\\begin{tabular}{r|ll}\n", | |
" ensembl\\_gene\\_id & go\\_id\\\\\n", | |
"\\hline\n", | |
"\t ENSG00000147403 & \\\\\n", | |
"\t ENSG00000147403 & GO:0003723 \\\\\n", | |
"\t ENSG00000147403 & GO:0016020 \\\\\n", | |
"\t ENSG00000147403 & GO:0006412 \\\\\n", | |
"\t ENSG00000147403 & GO:0005783 \\\\\n", | |
"\t ENSG00000147403 & GO:0005829 \\\\\n", | |
"\\end{tabular}\n" | |
], | |
"text/markdown": [ | |
"\n", | |
"ensembl_gene_id | go_id | \n", | |
"|---|---|---|---|---|---|\n", | |
"| ENSG00000147403 | | \n", | |
"| ENSG00000147403 | GO:0003723 | \n", | |
"| ENSG00000147403 | GO:0016020 | \n", | |
"| ENSG00000147403 | GO:0006412 | \n", | |
"| ENSG00000147403 | GO:0005783 | \n", | |
"| ENSG00000147403 | GO:0005829 | \n", | |
"\n", | |
"\n" | |
], | |
"text/plain": [ | |
" ensembl_gene_id go_id \n", | |
"1 ENSG00000147403 \n", | |
"2 ENSG00000147403 GO:0003723\n", | |
"3 ENSG00000147403 GO:0016020\n", | |
"4 ENSG00000147403 GO:0006412\n", | |
"5 ENSG00000147403 GO:0005783\n", | |
"6 ENSG00000147403 GO:0005829" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"library(biomaRt)\n", | |
"All.genes.Ens <- c(\"ENSG00000147403\")\n", | |
"ensembl61 <- useMart( \"ENSEMBL_MART_ENSEMBL\", \n", | |
" dataset = \"hsapiens_gene_ensembl\", \n", | |
" host = \"www.ensembl.org\" )\n", | |
"\n", | |
"# ensembl61@attributes$\n", | |
"\n", | |
"test.GO.BP <- getBM(attributes = c(\"ensembl_gene_id\", \n", | |
" \"go_id\"), \n", | |
" filters = \"ensembl_gene_id\", \n", | |
" values = All.genes.Ens,\n", | |
" mart = ensembl61)\n", | |
"head(test.GO.BP)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"#GO analysis\n", | |
"All.genes.Ens <- c(\"ENSG00000147403\",\"ENSG00000184009\",\"ENSG00000259380\",\"ENSG00000253729\",\"ENSG00000163386\",\"ENSG00000113658\",\"ENSG00000182149\",\"ENSG00000149547\",\"ENSG00000055163\",\"ENSG00000161960\",\"ENSG00000147403\",\"ENSG00000055163\",\"ENSG00000132475\",\"ENSG00000161960\",\"ENSG00000196531\",\"ENSG00000174749\",\"ENSG00000149547\",\"ENSG00000210140\",\"ENSG00000133138\",\"ENSG00000251562\",\"ENSG00000206503\",\"ENSG00000181458\",\"ENSG00000248360\",\"ENSG00000055163\",\"ENSG00000169499\",\"ENSG00000139644\",\"ENSG00000168918\",\"ENSG00000133131\",\"ENSG00000161016\",\"ENSG00000234745\",\"ENSG00000269821\",\"ENSG00000112096\",\"ENSG00000249348\",\"ENSG00000210135\",\"ENSG00000171109\",\"ENSG00000104164\",\"ENSG00000151338\",\"ENSG00000206503\",\"ENSG00000176619\")\n", | |
"geneList <- unique(read.table(\"./txp2gene.tsv\")['V2'])[, \"V2\"]\n", | |
"topGenes <- All.genes.Ens\n", | |
"geneListF <- factor(as.integer(geneList %in% topGenes))\n", | |
"names(geneListF) <- geneList" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stderr", | |
"output_type": "stream", | |
"text": [ | |
"\n", | |
"Building most specific GOs .....\n", | |
"\t( 12016 GO terms found. )\n", | |
"\n", | |
"Build GO DAG topology ..........\n", | |
"\t( 16050 GO terms and 38068 relations. )\n", | |
"\n", | |
"Annotating nodes ...............\n", | |
"\t( 18682 genes annotated to the GO terms. )\n" | |
] | |
} | |
], | |
"source": [ | |
"dat <- new(\"topGOdata\", \n", | |
" ontology=\"BP\", \n", | |
" allGenes=geneListF, \n", | |
" nodeSize=10,\n", | |
" annot=annFUN.org, \n", | |
" mapping=\"org.Hs.eg.db\", \n", | |
" ID=\"ensembl\")\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 7, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stderr", | |
"output_type": "stream", | |
"text": [ | |
"\n", | |
"\t\t\t -- Classic Algorithm -- \n", | |
"\n", | |
"\t\t the algorithm is scoring 1165 nontrivial nodes\n", | |
"\t\t parameters: \n", | |
"\t\t\t test statistic: fisher\n" | |
] | |
} | |
], | |
"source": [ | |
"res <- runTest(dat, algorithm=\"classic\", statistic=\"fisher\")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 48, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<table>\n", | |
"<thead><tr><th scope=col>GO.ID</th><th scope=col>Term</th><th scope=col>Annotated</th><th scope=col>Significant</th><th scope=col>Expected</th><th scope=col>classicFisher</th></tr></thead>\n", | |
"<tbody>\n", | |
"\t<tr><td>GO:0002252 </td><td>immune effector process </td><td>1292 </td><td> 8 </td><td>1.52 </td><td>6.8e-05 </td></tr>\n", | |
"\t<tr><td>GO:0002638 </td><td>negative regulation of immunoglobulin pr...</td><td> 11 </td><td> 2 </td><td>0.01 </td><td>7.2e-05 </td></tr>\n", | |
"\t<tr><td>GO:0002682 </td><td>regulation of immune system process </td><td>1655 </td><td> 8 </td><td>1.95 </td><td>0.00038 </td></tr>\n", | |
"\t<tr><td>GO:0050778 </td><td>positive regulation of immune response </td><td> 916 </td><td> 6 </td><td>1.08 </td><td>0.00052 </td></tr>\n", | |
"\t<tr><td>GO:0002701 </td><td>negative regulation of production of mol...</td><td> 41 </td><td> 2 </td><td>0.05 </td><td>0.00106 </td></tr>\n", | |
"\t<tr><td>GO:0050776 </td><td>regulation of immune response </td><td>1124 </td><td> 6 </td><td>1.32 </td><td>0.00152 </td></tr>\n", | |
"\t<tr><td>GO:0002376 </td><td>immune system process </td><td>3149 </td><td>10 </td><td>3.71 </td><td>0.00165 </td></tr>\n", | |
"\t<tr><td>GO:0002480 </td><td>antigen processing and presentation of e...</td><td> 52 </td><td> 2 </td><td>0.06 </td><td>0.00169 </td></tr>\n", | |
"\t<tr><td>GO:0006413 </td><td>translational initiation </td><td> 207 </td><td> 3 </td><td>0.24 </td><td>0.00177 </td></tr>\n", | |
"\t<tr><td>GO:0002476 </td><td>antigen processing and presentation of e...</td><td> 58 </td><td> 2 </td><td>0.07 </td><td>0.00210 </td></tr>\n", | |
"</tbody>\n", | |
"</table>\n" | |
], | |
"text/latex": [ | |
"\\begin{tabular}{r|llllll}\n", | |
" GO.ID & Term & Annotated & Significant & Expected & classicFisher\\\\\n", | |
"\\hline\n", | |
"\t GO:0002252 & immune effector process & 1292 & 8 & 1.52 & 6.8e-05 \\\\\n", | |
"\t GO:0002638 & negative regulation of immunoglobulin pr... & 11 & 2 & 0.01 & 7.2e-05 \\\\\n", | |
"\t GO:0002682 & regulation of immune system process & 1655 & 8 & 1.95 & 0.00038 \\\\\n", | |
"\t GO:0050778 & positive regulation of immune response & 916 & 6 & 1.08 & 0.00052 \\\\\n", | |
"\t GO:0002701 & negative regulation of production of mol... & 41 & 2 & 0.05 & 0.00106 \\\\\n", | |
"\t GO:0050776 & regulation of immune response & 1124 & 6 & 1.32 & 0.00152 \\\\\n", | |
"\t GO:0002376 & immune system process & 3149 & 10 & 3.71 & 0.00165 \\\\\n", | |
"\t GO:0002480 & antigen processing and presentation of e... & 52 & 2 & 0.06 & 0.00169 \\\\\n", | |
"\t GO:0006413 & translational initiation & 207 & 3 & 0.24 & 0.00177 \\\\\n", | |
"\t GO:0002476 & antigen processing and presentation of e... & 58 & 2 & 0.07 & 0.00210 \\\\\n", | |
"\\end{tabular}\n" | |
], | |
"text/markdown": [ | |
"\n", | |
"GO.ID | Term | Annotated | Significant | Expected | classicFisher | \n", | |
"|---|---|---|---|---|---|---|---|---|---|\n", | |
"| GO:0002252 | immune effector process | 1292 | 8 | 1.52 | 6.8e-05 | \n", | |
"| GO:0002638 | negative regulation of immunoglobulin pr... | 11 | 2 | 0.01 | 7.2e-05 | \n", | |
"| GO:0002682 | regulation of immune system process | 1655 | 8 | 1.95 | 0.00038 | \n", | |
"| GO:0050778 | positive regulation of immune response | 916 | 6 | 1.08 | 0.00052 | \n", | |
"| GO:0002701 | negative regulation of production of mol... | 41 | 2 | 0.05 | 0.00106 | \n", | |
"| GO:0050776 | regulation of immune response | 1124 | 6 | 1.32 | 0.00152 | \n", | |
"| GO:0002376 | immune system process | 3149 | 10 | 3.71 | 0.00165 | \n", | |
"| GO:0002480 | antigen processing and presentation of e... | 52 | 2 | 0.06 | 0.00169 | \n", | |
"| GO:0006413 | translational initiation | 207 | 3 | 0.24 | 0.00177 | \n", | |
"| GO:0002476 | antigen processing and presentation of e... | 58 | 2 | 0.07 | 0.00210 | \n", | |
"\n", | |
"\n" | |
], | |
"text/plain": [ | |
" GO.ID Term Annotated Significant\n", | |
"1 GO:0002252 immune effector process 1292 8 \n", | |
"2 GO:0002638 negative regulation of immunoglobulin pr... 11 2 \n", | |
"3 GO:0002682 regulation of immune system process 1655 8 \n", | |
"4 GO:0050778 positive regulation of immune response 916 6 \n", | |
"5 GO:0002701 negative regulation of production of mol... 41 2 \n", | |
"6 GO:0050776 regulation of immune response 1124 6 \n", | |
"7 GO:0002376 immune system process 3149 10 \n", | |
"8 GO:0002480 antigen processing and presentation of e... 52 2 \n", | |
"9 GO:0006413 translational initiation 207 3 \n", | |
"10 GO:0002476 antigen processing and presentation of e... 58 2 \n", | |
" Expected classicFisher\n", | |
"1 1.52 6.8e-05 \n", | |
"2 0.01 7.2e-05 \n", | |
"3 1.95 0.00038 \n", | |
"4 1.08 0.00052 \n", | |
"5 0.05 0.00106 \n", | |
"6 1.32 0.00152 \n", | |
"7 3.71 0.00165 \n", | |
"8 0.06 0.00169 \n", | |
"9 0.24 0.00177 \n", | |
"10 0.07 0.00210 " | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"df <- GenTable(dat, classicFisher=res, topNodes=10)\n", | |
"df" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "R", | |
"language": "R", | |
"name": "ir" | |
}, | |
"language_info": { | |
"codemirror_mode": "r", | |
"file_extension": ".r", | |
"mimetype": "text/x-r-source", | |
"name": "R", | |
"pygments_lexer": "r", | |
"version": "3.5.1" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment