Hi, I want to use my Cufflinks output in order to use them in gage! I have to convert the Gene IDs to Entrez gene IDs I guess?! For that can some body help me for the species? I have gage data preparation manual but it doesn't include pombe when I print(bods)! Please give me feedback or a link that explains how to do this.
Cheers,
1 answer
Ah, a "convert ID X to ID Y" question. The answer is almost always BioMart. In this case it's a little trickier as the organism is less widely-used, so I'll get you started:
library(biomaRt)
mart.sp <- useMart(biomart = "fungal_mart", dataset = "spombe_eg_gene", host = "fungi.ensembl.org")
# some example gene IDs
ids <- c("SPAC11D3.02c", "SPAC18B11.02c")
getBM(attributes = c("ensembl_gene_id", "entrezgene"), filters = "ensembl_gene_id", values = ids, mart = mart.sp)
# ensembl_gene_id entrezgene
# 1 SPAC11D3.02c 2542974
# 2 SPAC18B11.02c 2542607
You could then use e.g. match() to match your list of gene IDs to the first column returned using getBM() and replace with the entrezgene column.
You can but in this case, they're using the R/Bioconductor gage package, so my example lets them stay in R.
Indeed, but here's hoping that other people will stumble across this by searching, rather than creating their own post. We don't want them looking at your lovely R example and thinking Oh no - I don't know what that means and creating another post asking for a pointy-clicky method.
Thanks, but I want to convert all the genes in gene_exp.diff out of Cufflink, not few specific genes, and I am not an advanced user. So if you could do a favour and provide few more lines on how to incorporate the whole file and convert all the IDs in the file to Entrez I extremely appreciate it.
Well, I showed those "few specific genes" just as an example. You will need to use your own list of IDs; I do not know what your data looks like or how they would be derived from it.
If, for example, you have a data frame or matrix where the gene IDs are row names, you might use something like:
ids <- rownames(mydataframe)
Presumably your gene_exp.diff file is some kind of delimited data that you can read into R using e.g. read.table().
OK, here I have a link to my data and a link to the workflow I am trying. Section 6.5 when it is converting IDs, I wonder what should I change in the code lines, if you could do a favour and have a look on it. Probably it is this code line that needs a change?
> gnames.eg=pathview::id2eg(gnames, category ="symbol")
Thanks!
Log in to answer this question.