<pre><code>library(biomaRt)
mart &lt;- biomaRt:::useMart(biomart = &quot;ENSEMBL_MART_ENSEMBL&quot;, dataset = &quot;drerio_gene_ensembl&quot;, host = &quot;asia.ensembl.org&quot;)  

v1 &lt;- c(&quot;GO::0009055&quot;,&quot;GO:0016020&quot;,&quot;GO:0016491&quot;,&quot;GO:0006122&quot;,&quot;GO:0008121&quot;)

go_list &lt;- biomaRt:::getBM(attributes=c(&quot;go_id&quot;, &quot;name_1006&quot;, &quot;namespace_1003&quot;),
              filters = &quot;go&quot;,
              values = v1,
              mart=mart, uniqueRows = TRUE)
</code></pre>
<p>so it is likely the &quot;v1&quot; that should not be in quotes</p>
<pre><code>head(go_list)
        go_id                                                   name_1006
1 GO:0016020                                                    membrane
2 GO:0005739                                               mitochondrion
3 GO:0005743                                mitochondrial inner membrane
4 GO:0070469                                                 respirasome
5 GO:0006122 mitochondrial electron transport, ubiquinol to cytochrome c
6 GO:0001525                                                angiogenesis
      namespace_1003
1 cellular_component
2 cellular_component
3 cellular_component
4 cellular_component
5 biological_process
6 biological_process
</code></pre>

CC BY-SA 4.0
2021-08-27T17:36:41.390Z
when search filters option is used  searchFilters(ensembl, pattern = "GO") . We get the above filters (ensembl, pattern = "GO")
                name                        description
12           with_go                      With GO ID(s)
13   with_goslim_goa              With GOSlim GOA ID(s)
58                go         GO ID(s) [e.g. GO:0000003]
59        goslim_goa GOSlim GOA ID(s) [e.g. GO:0000003]
183 go_evidence_code                   GO Evidence code. NO go_id filter exists.
Aranyak Goswami
CC BY-SA 4.0
2021-08-27T16:35:57.087Z
2021-08-30T09:59:14.690Z
2021-08-30T09:59:14.690Z
story
<p><em>This question was also asked on <a href="https://www.biostars.org/p/9486373/" rel="nofollow noreferrer">Biostars</a></em></p>
<p>I have a list of GO ids and I want to find out a unique term description such that if I provide say 200 GO IDs I will give 200 specific GO terms. The code snippet I am using is given below. Although it kind of works, for one given  GO ID I get several terms like for my 200 GO ids I get 2577 terms whereas I am interested in a specific GO term. The output that I want is like this GO:0007254 = JNK cascade.
I will like to mention that I have also cross-posted the query in biostars and got no reply for the last 2 days and hence I am posting the query on Stack exchange bioinformatics. Any help will be useful.</p>
<pre><code>library(biomaRT)
mart &lt;- useMart(biomart = &quot;ENSEMBL_MART_ENSEMBL&quot;, dataset = &quot;drerio_gene_ensembl&quot;, host = &quot;asia.ensembl.org&quot;)  
v1 &lt;-c(target)   # The list of GO ids that I want to pass as a list.
go_list &lt;- getBM(attributes=c(&quot;go_id&quot;, &quot;name_1006&quot;, &quot;namespace_1003&quot;),
              filters = &quot;go&quot;,
              values = c(&quot;v1&quot;),
              mart=mart, uniqueRows = TRUE)
</code></pre>

<genomics>
Mapping unique GO term description given a specific GO ids
# Mapping unique GO term description given a specific GO ids

(Asked by: username_0 on 2021-08-27)

This question was also asked on Biostars
I have a list of GO ids and I want to find out a unique term description such that if I provide say 200 GO IDs I will give 200 specific GO terms. The code snippet I am using is given below. Although it kind of works, for one given  GO ID I get several terms like for my 200 GO ids I get 2577 terms whereas I am interested in a specific GO term. The output that I want is like this GO:0007254 = JNK cascade.
I will like to mention that I have also cross-posted the query in biostars and got no reply for the last 2 days and hence I am posting the query on Stack exchange bioinformatics. Any help will be useful.
library(biomaRT)
mart <- useMart(biomart = "ENSEMBL_MART_ENSEMBL", dataset = "drerio_gene_ensembl", host = "asia.ensembl.org")  
v1 <-c(target)   # The list of GO ids that I want to pass as a list.
go_list <- getBM(attributes=c("go_id", "name_1006", "namespace_1003"),
              filters = "go",
              values = c("v1"),
              mart=mart, uniqueRows = TRUE)

**Tags:** genomics

---

## 1 answers

### Answer by username_1 on 2021-08-27. Score: 2

library(biomaRt)
mart <- biomaRt:::useMart(biomart = "ENSEMBL_MART_ENSEMBL", dataset = "drerio_gene_ensembl", host = "asia.ensembl.org")  

v1 <- c("GO::0009055","GO:0016020","GO:0016491","GO:0006122","GO:0008121")

go_list <- biomaRt:::getBM(attributes=c("go_id", "name_1006", "namespace_1003"),
              filters = "go",
              values = v1,
              mart=mart, uniqueRows = TRUE)

so it is likely the "v1" that should not be in quotes
head(go_list)
        go_id                                                   name_1006
1 GO:0016020                                                    membrane
2 GO:0005739                                               mitochondrion
3 GO:0005743                                mitochondrial inner membrane
4 GO:0070469                                                 respirasome
5 GO:0006122 mitochondrial electron transport, ubiquinol to cytochrome c
6 GO:0001525                                                angiogenesis
      namespace_1003
1 cellular_component
2 cellular_component
3 cellular_component
4 cellular_component
5 biological_process
6 biological_process

> **Comments:**
> **username_0**: when search filters option is used  searchFilters(ensembl, pattern = "GO") . We get the above filters (ensembl, pattern = "GO")                 name                        description 12           with_go                      With GO ID(s) 13   with_goslim_goa              With GOSlim GOA ID(s) 58                go         GO ID(s) [e.g. GO:0000003] 59        goslim_goa GOSlim GOA ID(s) [e.g. GO:0000003] 183 go_evidence_code                   GO Evidence code. NO go_id filter exists.  

---

