<p>I am having trouble grabbing specific pathway info using databases in R. I have RNAseq results and I want to remove immune related genes from the current list that I have.</p>
<p>With a vector of gene names/symbols from RNAseq , I queried org.hs.eg.db to grab entrezIDs keys etc.</p>
<pre><code>mapIds(org.Hs.eg.db,keys=mygenes,keytype =&quot;ENTREZID&quot;,column=&quot;PATHID&quot;)
</code></pre>
<p>I thought about trying to use pathids from this database which I think are <a href="https://www.genome.jp/kegg/" rel="nofollow noreferrer">KEGG</a> pathway ids which I can subsequently filter out the appropriate  ones but my list goes from 19,000 to 4,000 before I drop immune related genes due to a lot of NAs. I tried reactomedb, but the pathnames don't really let me filter by immune related or not.</p>
<p>Any advice is appreciated.</p>
<hr />
<p>mapIds Bioconductor <a href="https://bioconductor.org/packages/devel/bioc/vignettes/AnnotationDbi/inst/doc/IntroToAnnotationPackages.pdf" rel="nofollow noreferrer">https://bioconductor.org/packages/devel/bioc/vignettes/AnnotationDbi/inst/doc/IntroToAnnotationPackages.pdf</a></p>
<p>KEGG <a href="https://www.genome.jp/kegg/" rel="nofollow noreferrer">https://www.genome.jp/kegg/</a>
&quot;KEGG is a database resource for understanding high-level functions and utilities of the biological system, such as the cell, the organism and the ecosystem, from molecular-level information, especially large-scale molecular datasets generated by genome sequencing and other high-throughput experimental technologies.
See Release notes (April 1, 2022) for new and updated features.&quot;</p>

CC BY-SA 4.0
2020-06-15T09:53:51.437Z
Hi James, those pathID come from the KEGG database and aren't updated since 2016 due to a license change. There isn't an easy solution to this problem (what is the threshold for a gene to be considered immune related?) and most people either use REACTOME, wikipathways or MSigDB (from the broad institute).
llrs
CC BY-SA 4.0
2020-06-15T12:11:36.970Z
I was a bit confused on how to query REACTOME, as it was hard to visually see which terms were immune related when I looked at the pathname keys. Would a threshold use some sort of ranked pvalue (in which case probably something low)? Thanks for the suggestions on the others!
James
CC BY-SA 4.0
2020-06-15T13:17:57.017Z
Well the problem is that the "olfactory pathway" on your epithelial cells might indicate an immune response and there isn't a test to prove that. People use some kind of network/system-biology approach or the databases available. Afaik there isn't much progress on this field. I'm attempting to tackle this problem by creating new methods about pathways but my thesis is in other topics so I can't invest much time on this...
llrs
<rna-seq><bioconductor><database>
Grabbing all Immune related genes with databases in R
# Grabbing all Immune related genes with databases in R

(Asked by: username_0 on 2020-06-15)

I am having trouble grabbing specific pathway info using databases in R. I have RNAseq results and I want to remove immune related genes from the current list that I have.
With a vector of gene names/symbols from RNAseq , I queried org.hs.eg.db to grab entrezIDs keys etc.
mapIds(org.Hs.eg.db,keys=mygenes,keytype ="ENTREZID",column="PATHID")

I thought about trying to use pathids from this database which I think are KEGG pathway ids which I can subsequently filter out the appropriate  ones but my list goes from 19,000 to 4,000 before I drop immune related genes due to a lot of NAs. I tried reactomedb, but the pathnames don't really let me filter by immune related or not.
Any advice is appreciated.

mapIds Bioconductor https://bioconductor.org/packages/devel/bioc/vignettes/AnnotationDbi/inst/doc/IntroToAnnotationPackages.pdf
KEGG https://www.genome.jp/kegg/
"KEGG is a database resource for understanding high-level functions and utilities of the biological system, such as the cell, the organism and the ecosystem, from molecular-level information, especially large-scale molecular datasets generated by genome sequencing and other high-throughput experimental technologies.
See Release notes (April 1, 2022) for new and updated features."

**Tags:** rna-seq, bioconductor, database
> **Comments:**
> **username_1**: Hi James, those pathID come from the KEGG database and aren't updated since 2016 due to a license change. There isn't an easy solution to this problem (what is the threshold for a gene to be considered immune related?) and most people either use REACTOME, wikipathways or MSigDB (from the broad institute).  
> **username_0**: I was a bit confused on how to query REACTOME, as it was hard to visually see which terms were immune related when I looked at the pathname keys. Would a threshold use some sort of ranked pvalue (in which case probably something low)? Thanks for the suggestions on the others!  
> **username_1**: Well the problem is that the "olfactory pathway" on your epithelial cells might indicate an immune response and there isn't a test to prove that. People use some kind of network/system-biology approach or the databases available. Afaik there isn't much progress on this field. I'm attempting to tackle this problem by creating new methods about pathways but my thesis is in other topics so I can't invest much time on this...  

---

## 0 answers

