Hello,

From where did you obtain the code for the biomaRt workflow? - one of my posts? If you use that, then you need to select a different attribute, because, in that code that you have pasted, you are assuming that the probe IDs are derived from the 'Affymetrix U133 Plus 2.0'; however, you have the 'Affymetrix U95 Version 2'. You can find attributes via biomaRt like this:

listAttributes(mart)[grep("affy", listAttributes(mart)[,1]),]
                     name                 description         page
104          affy_hc_g110          AFFY HC G110 probe feature_page
105         affy_hg_focus         AFFY HG Focus probe feature_page
106         affy_hg_u133a         AFFY HG U133A probe feature_page
107       affy_hg_u133a_2       AFFY HG U133A 2 probe feature_page
108         affy_hg_u133b         AFFY HG U133B probe feature_page
109   affy_hg_u133_plus_2   AFFY HG U133 Plus 2 probe feature_page
110          affy_hg_u95a          AFFY HG U95A probe feature_page
111        affy_hg_u95av2        AFFY HG U95Av2 probe feature_page
112          affy_hg_u95b          AFFY HG U95B probe feature_page
113          affy_hg_u95c          AFFY HG U95C probe feature_page
114          affy_hg_u95d          AFFY HG U95D probe feature_page
115          affy_hg_u95e          AFFY HG U95E probe feature_page
116          affy_hta_2_0          AFFY HTA 2 0 probe feature_page
117   affy_huex_1_0_st_v2   AFFY HuEx 1 0 st v2 probe feature_page
118         affy_hugenefl         AFFY HuGeneFL probe feature_page
119 affy_hugene_1_0_st_v1 AFFY HuGene 1 0 st v1 probe feature_page
120 affy_hugene_2_0_st_v1 AFFY HuGene 2 0 st v1 probe feature_page
121        affy_primeview        AFFY PrimeView probe feature_page
122         affy_u133_x3p         AFFY U133 X3P probe feature_page

...so, you will want to use affy_hg_u95av2.

As to whether or not the general code will work, please take time to examine what each line is doing, make QC checks, and then make an 'executive' decision about whether or not it is doing what you want. To me, it looks like the code will do what you want it to do, but please do check yourself.

--------------------

Regarding the other code that you have pasted using hgu95av2.db, I am not so sure... You simply have to do something like the following:

library(hgu95av2.db) 

mapIds(
  hgu95av2.db,
  c('991_g_at','976_s_at','954_s_at', 'hhh', '39167_r_at'),
  keytype="PROBEID",
  column = 'SYMBOL')

'select()' returned 1:1 mapping between keys and columns
  991_g_at   976_s_at   954_s_at        hhh 39167_r_at 
    "FLT1"    "MAPK1"   "PPP1CA"         NA "SERPINH1"

I added a dummy probe ID, 'hhh', just to show you that it returns NA when no match is found.

-------------------------------

Kevin



Source link