Problem in running GSVA
2
0
Entering edit mode
@sathyabaarathi-6865
Last seen 5.7 years ago
India

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

 

 

GSVA getting error in gsva function • 1.1k views
ADD COMMENT
0
Entering edit mode
Robert Castelo ★ 2.7k
@rcastelo
Last seen 12 weeks ago
Barcelona/Universitat Pompeu Fabra

hi,

with respect to your first question, GSVA is non-parametric and in principle you could use it with fold-changes, but if you have the normalized expression values i would recommend to run GSVA on the normalized expression values. Depending on whether you expect that the gene sets you're interested in have genes changing in the same direction or in opposite directions you should change the setting of the parameter mx.diff, please consult the manual page of the gsva() function and the article for full details on this.

With respect to the problem you report, please paste the output of the traceback() function right after the error occurs and the output of sessionInfo().

cheers,

robert.

ADD COMMENT
0
Entering edit mode
@sathyabaarathi-6865
Last seen 5.7 years ago
India

Thanks Robert. I was able to figure out. I didn't assign pData for my Expressionset. After assigning, it s working fine.

ADD COMMENT

Login before adding your answer.

Traffic: 280 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6