I have a matrix of gene expression which label of each sample and symbol of each gene is known. I wanna perform gtBroad in globaltest R-package. It needs to convert expression matrix to an ExpressionSet object with known Annotation. How I can do that while I have only the name of genes?
EDIT: You can download sample data from this link: https://www.dropbox.com/s/d50tr958yvvcxwx/TEST.Rdata?dl=0
I wanna run the below code:
library(globaltest)
library(GSEABase)
broadset <- getBroadSets(asBroadUri(c('BIOCARTA_HDAC_PATHWAY', 'PID_HDAC_CLASSII_PATHWAY')))
pData <- data.frame(id=resp, row.names=colnames(data))
phenoData <- AnnotatedDataFrame(data=pData)
exprs <- ExpressionSet(data, phenoData=phenoData)
gtBroad (response=id, exprs, id='PID_HDAC_CLASSIII_PATHWAY', collection=broadset)
Thanks, but the problem still is remained. I added sample data as well as my code to the question. It would be great if you take a look.
I tried fixing your code. The main issue is that to use the GSEA tool you need to know the EntrezIDs of your genes. First, you need to map your gene symbols to their EntrezIDs, and in your case it is not possible for around 2k genes, because they are not called with the official gene name, but with an alias. You have to find the official gene names for all of your genes and change the initial dataset, I think there are some tools on like the HGNC webpage. The rest is explained in the code.
Looks great. Thank you so much for your help.