Thanks a lot for the response. I'll try working with this if I can't figure out how to run it in R. I am working with mmusculus v95 but should be able to tweak this for that purpose? Other issue is that I am running linux as a subsystem in windows (WSL, up to now just for running salmon/kallisto etc.) and don't have much experience with it.
Hi All!
I am working in R with data extracted from EnsDb.Mmusculus.v95. I have generated a list of deferentially expressed genes and have their gene names like so:
...
Olfr61
P4ha2
Pcdh8
...
I am trying to create a data frame which maps each gene to its genomic coordinates like so:
...
Olfr61 Chr7:140637703-140638638
P4ha2 Chr11:54100924-54131668
Pcdh8 Chr14:79766775-79771312
...
I have started by using the GRanges function but am not finding it intuitive. This seems like it should be fairly simply. Any ideas?
After this I would like to plot each of these DE genes locations on a chromosome map to visualize if they are grouped in particular locations. Any favorite packages for doing this?
Thanks very much for your help
2 answers
No idea how to do it with R, but here's an approach with a couple, simple command-line statements:
$ wget -qO- ftp://ftp.sanger.ac.uk/pub/gencode/Gencode_human/release_26/gencode.v26.basic.annotation.gff3.gz | gunzip -c > gencode.v26.basic.annotation.gff3
$ grep -wfF genes-of-interest.txt gencode.v26.basic.annotation.gff3 > genes-of-interest.gff3
Then munge genes-of-interest.gff3 for coordinates with awk.
Modify as needed for your source of annotations, genome assembly, etc.
Gencode has mouse annotations.
BioMart is your easiest method. You can use it with an online interface but if you want to use R there's also an R package.
Log in to answer this question.