Hi, I am using an 'Affymetrix Human Genome U95 Version 2 Array', I would like to replace the affymetrix probes with the gene symbols in my data matrix 'human'. which one of these code can I use and how correct it please?
require("biomaRt")
mart <- useMart("ENSEMBL_MART_ENSEMBL")
mart <- useDataset("hsapiens_gene_ensembl", mart)
annotLookup <- getBM(mart=mart, attributes=c("affy_hg_u133_plus_2","ensembl_gene_id",
"gene_biotype","external_gene_name"), filter = "affy_hg_u133_plus_2", values = rownames(human), uniqueRows=TRUE)
indicesLookup <- match(rownames(human), annotLookup$affy_hg_u133_plus_2)
rownames(human) <- paste(annotLookup[indicesLookup, "external_gene_name"], c(1:length(indicesLookup)), sep="_")
rownames(human) <-gsub("_[0-9]*$", "", rownames(human))
head(rownames(human))
[1] "NA" "NA" "NA" "NA" "NA" "NA"
in the second one, I obtained a lower size data matrix 'names' with the affy probes id and the symboles? how to correct the code and how to remove the probes id from this matrix? thank you
library(hgu95av2.db)
x <- hgu95av2SYMBOL
# Get the probe identifiers that are mapped to a gene symbol
mapped_probes <- mappedkeys(x)
xx <- as.list(x[mapped_probes])
names <-merge(x,human,by.x=1,by.y=0)
I also have this data: https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE133824 and I would like to convert all Affymetrix HTA 2.0 IDs to standard gene symbols for each sample. The methods above do not work with this data. Can someone help with this please
Hi javanokendo, I have posted an answer here as a Tutorial (for you and future users): Affymetrix HTA 2.0 id conversion