Mapping unique GO term description given a specific GO id
1
0
Entering edit mode
8 weeks ago
aranyak111 • 0

I have a list of GO ids and I want to find unique term description such that if I provide say 200 GO IDs I will get 200 specific GO terms. The code snippet I am using is given below. Although it kind of works ,but for one GO ids I get several terms like for my 200 GO ids I get 2577 GO terms where as I am interested in a specific unique GO term. The output that I want is like this GO:0007254 = JNK cascade

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)
genomics • 435 views
ADD COMMENT
0
Entering edit mode

Are you actually passing in c("v1") in your real code or are you using just v1? The former is wrong.

ADD REPLY
0
Entering edit mode

I have used whole data with c(v1) removing the quotes and I get 2557 GO ids given 234 GO terms, without finding out unique GO terms.

ADD REPLY
0
Entering edit mode

Since OP won't add a link even when explicitly asked to, here's a link to their cross-post: https://bioinformatics.stackexchange.com/questions/17619/mapping-unique-go-term-description-given-a-specific-go-ids

ADD REPLY
0
Entering edit mode
7 weeks ago
benformatics ★ 2.6k

You correct that the biomaRt call pulls more than just your "filtering" subset.

A simple solution is to do the following:

go_list <- subset(go_list,go_id %in% v1)
ADD COMMENT
0
Entering edit mode

Such command is not returning any result.

ADD REPLY
0
Entering edit mode

That suggest that none of the values in v1 are present in the drerio annotation... or your object is formatted incorrectly.

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

v1 <- c(list("GO:0000003","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)
go_list <- subset(go_list,go_id %in% v1)
go_list

        go_id                                                   name_1006
10 GO:0000003                                                reproduction
11 GO:0016020                                                    membrane
13 GO:0016491                                     oxidoreductase activity
25 GO:0006122 mitochondrial electron transport, ubiquinol to cytochrome c
31 GO:0008121                   ubiquinol-cytochrome-c reductase activity
       namespace_1003
10 biological_process
11 cellular_component
13 molecular_function
25 biological_process
31 molecular_function
ADD REPLY

Login before adding your answer.

Traffic: 2171 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6