I am getting an error while running the function gsva. I have given the script whichI have followed. Please help me with this. Further, I would like to know instead of using normalised gene expression value, can we use fold change data?
library(GSEABase)
library(GSVAdata)
data(c2BroadSets)
c2BroadSets
head(fcmat_ent[,1:3]) Anaplastic_astrocytoma Ankylosing_spondylitis Asthma A1BG 0 0.0000000 0.0000000 A1BG-AS1 0 0.0000000 1.3437155 A2M 0 0.6848424 0.0000000 A2M-AS1 0 0.0000000 0.0000000 AA06 0 0.0000000 0.8145533 AAAS 0 0.0000000 0.0000000
### rownames refers to gene names and colnames refers to conditions and the values in the matrix referes to fold change ##
> gene_matrix <- ExpressionSet(assayData=as.matrix(fcmat_ent),annotation = "hgu133plus2")
> gene_matrix ExpressionSet (storageMode: lockedEnvironment) assayData: 11525 features, 28 samples element names: exprs protocolData: none phenoData: none featureData: none experimentData: use 'experimentData(object)' Annotation: hgu133plus2
> filtered_eset <- nsFilter(gene_matrix,var.func=IQR, var.filter=TRUE, var.cutoff=0.5, filterByQuantile=TRUE)
> filtered_eset$eset ExpressionSet (storageMode: lockedEnvironment) assayData: 3543 features, 28 samples element names: exprs protocolData: none phenoData: none featureData: none experimentData: use 'experimentData(object)' Annotation: hgu133plus2 $filter.log $filter.log$numDupsRemoved [1] 4447 $filter.log$numLowVar [1] 3544 $filter.log$numRemoved.ENTREZID [1] 1277
> leukemia_filtered_eset <- filtered_eset$eset
> head(leukemia_filtered_eset) ExpressionSet (storageMode: lockedEnvironment) assayData: 1 features, 28 samples element names: exprs protocolData: none phenoData: none featureData: none experimentData: use 'experimentData(object)' Annotation: hgu133plus2
> leukemia_es <- gsva(leukemia_filtered_eset, c2BroadSets, min.sz=3, max.sz=500, verbose=TRUE)$es.obs Error in assign(x[i], value[[i2]], envir = envir, inherits = inherits) : invalid first argument