Thank you, this is perfect!!
Hi, I have a list of 50 genes like this:
"Tshz2" "Ebf1" "Col26a1" "Ebf2" "Unc5c" "Prkg1" "Eya1" "Ldb2" "Rbms3" "Arhgap6"
And I need the coordinates of gene body and the TSS +1000/-1000 bp. How can I get it on R?
The genome is mm10.
Thanks
3 answers
To get gene bodies:
library(Rsubread)
GeneBody <- promoterRegions("mm10", upstream=0, downstream=Inf)
To get TSS +/- 1000 bp:
TSS <- promoterRegions("mm10", upstream=1000, downstream=1000)
This gives results for all genes by Entrez Gene ID.
I always like using the UCSC Table Browser for things like these. You might need to convert to Refseq (NM_*) for it to work well, which can also be done easily with biomaRt.
I'm not going to give you a complete answer, but you can start looking at this posts: how to retrieve mouse (mm10) gene information from Ensemble using Biomart inR
And use the R interface for biomart. Its also possible to access biomart through the Ensemb website.
thank you, I was able to get the coordinates of the gene, but I need to extract the TSS and extend it to 1000 bp.
Log in to answer this question.