Sorry Kevin
I have Rosetta probe identifiers
I have a Agilent microarray gene expression matrix like this by weird gene IDs in rows.
> head(mat[1:10,1:5])
GSM482796 GSM482797 GSM482798 GSM482799 GSM482800
10019475365 0.243 0.0176 0.1200 0.0994 0.0782
10019481149 0.504 0.1700 0.2690 0.2640 0.2070
10019495284 0.247 0.0300 0.0993 0.0113 0.1440
10019687586 0.148 -0.0542 -0.0408 -0.0072 -0.0924
10019713746 0.953 0.3400 0.6800 0.2300 0.5640
10019799479 0.672 0.2130 0.2470 0.1610 0.4050
>
> dim(mat)
[1] 39302 76
>
There is matched gene symbol for each of these identifiers in another matrix
> head(matched)
Gene.symbol
174996658 USHBP1
174996659 USHBP1
174996660 USHBP1
174996661 USHBP1
174996662 USHBP1
174996663 USHBP1
>
> dim(matched)
[1] 23107 1
>
How I can have matched gene symbol with probe identifiers in the row names of my expression matrix please? The problem is, for one gene symbol we may have different probe identifiers; For instance for USHBP1 we have 174996658, 174996659, 174996660, 174996661, 174996662, 174996663. So really I don't know what to do know
I tried
> merged <- merge(mat, matched)
Error: cannot allocate vector of size 6.8 Gb
Yes, but you need to know the array type that you are using. Take a look at this example for Affymetrix U133 Plus 2.0: A: Affymetrix Human Genome U133 Plus 2.0 Array
You can try two things (assuming your dataset used Affymetrix Human Genome U133 Plus 2.0 Array):
Use
BioMaRtUse
GEOqueryWhat should I do if the array is not in biomaRt?
Which array is it? - try the manufacturer's website for the annotation. Also look at the Bioconductor annotation packages: https://www.bioconductor.org/packages/release/data/annotation/
Its from the Affymetrix Clariom D Assay
If Human, then the annotation package that you want is: https://www.bioconductor.org/packages/release/data/annotation/html/clariomdhumanprobeset.db.html
Would I just download the annotation package and then run the same script as above and just swap the attribute and filter?
Yes, I posted a solution below for that package.