Last active
December 15, 2015 22:39
-
-
Save thomaskelder/5334672 to your computer and use it in GitHub Desktop.
script to convert affy probes to entrez ids
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Only first time: install bioconductor package for your affy array | |
| ## Find the proper package here: http://www.bioconductor.org/packages/release/data/annotation/ | |
| source("http://bioconductor.org/biocLite.R") | |
| biocLite("hgu95d.db") | |
| ## Load the affy annotation library | |
| library(hgu95d.db) | |
| ids = read.delim("omzetten ids.txt", as.is=T, header=T) | |
| entrez = unlist(mget(ids[,2], hgu95dENTREZID, ifnotfound=NA)) | |
| ids = cbind(ids, entrez) | |
| write.table(ids, "omzetten ids met entrez.txt", sep="\t", row.names=F) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment