Entering edit mode
Dear all,
I want to find out on which Chromosome a Gene is. I am trying to adapt below code which uses the Gene Entrez to get the Chromosome Location. I already have my dataset d1 with one column containing the Gene Entrez, but I don't quite get below code adapted for that:
# select() interface:
## Objects in this package can be accessed using the select() interface
## from the AnnotationDbi package. See ?select for details.
## Bimap interface:
x <- org.Hs.egCHR
# Get the entrez gene identifiers that are mapped to a chromosome
mapped_genes <- mappedkeys(x)
# Convert to a list
xx <- as.list(x[mapped_genes])
if(length(xx) > 0) {
# Get the CHR for the first five genes
xx[1:5]
# Get the first one
xx[[1]]
}
Can anyone help me?
Thank you, Bine
Thank you very much, I will try it later