Hello Bioconductor comunity.
I'm new with Bioconductor so probably my question is very basic. I have a list of gene names from a proteomic analysis we've run in the lab. I need to obtain the GO annotations of the genes (from Rattus norvergicus) I have in my list.
The rownames of my expression set object is:
> Gene names
head(rownames(AverageDataSet))
[1] "Emc2" "GLTP" "Nceh1" "Erlin2" "Atp9b" "Tep1"
I download Bioconductor annotations as follows:
gsets = AnnotationDbi::as.list(org.Rn.egGO2ALLEGS)
gsets[[1]]
IEA ISO IEA ISO IEA ISO IBA TAS
"24842" "24842" "25591" "25591" "29414" "29414" "54304" "83474"
IEA ISO IBA ISO ISO ISS ISO IEA
"83516" "83516" "85472" "85472" "171116" "171116" "291824" "294388"
ISO IBA IBA IEA ISO ISO ISS ISO
"294388" "295237" "296200" "296200" "296200" "298203" "298203" "298933"
IEA ISO IEA ISO IEA ISO IBA IEA
"299976" "299976" "303185" "303185" "303194" "303194" "303369" "303369"
ISO IBA IEA ISO IEA ISO IEA ISO
"303369" "303612" "303612" "303612" "309441" "309441" "309957" "309957"
ISO IMP IEA ISO IEA ISO IEA ISO
"312559" "312647" "315219" "315219" "360463" "360463" "360481" "360481"
IBA IEA ISO IEA IEA IEA ISO IEA
"361147" "361147" "361147" "361836" "367645" "501039" "501039" "502988"
ISO IEA ISO
"502988" "691431" "691431"
Now, when I try to filter for the genes that I have in my list I get no matches.
> unlist(sapply(gsets, function(gset) intersect(rownames(AverageDataSet), unique(as.character(gset)))))
character(0)
I'm truly lost here. I'm not even sure how data is stored in the gsets list nor even if the genes names are in that list for that matter. I'm sure I'm missing something very basic here but can't see what. Could anyone give me a hand with this issue??
Best regards, Jose.
Also, do note that GLTP isn't a gene symbol for rat, but is a gene symbol for human. You need to convert to the correct format for things to work correctly (and shouldn't rely on gene symbols anyway, but people tend to do so...)
Thank you very much James!! Your answer indeed solved my problem and I also got to understand the logic of it. Best, Jose.