Such command is not returning any result.
Mapping unique GO term description given a specific GO id
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)
• 2,657 views
•
link
1 answer
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)
• 0 views
•
link
• 0 views
•
link
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
• 0 views
•
link
Log in to answer this question.
Are you actually passing in
c("v1")in your real code or are you using justv1? The former is wrong.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.
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