Search
Question: Problem in running GSVA
0
gravatar for sathyabaarathi
3.8 years ago by
India
sathyabaarathi0 wrote:

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

 

 

ADD COMMENTlink modified 3.8 years ago • written 3.8 years ago by sathyabaarathi0
0
gravatar for Robert Castelo
3.8 years ago by
Robert Castelo2.2k
Spain/Barcelona/Universitat Pompeu Fabra
Robert Castelo2.2k wrote:

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 COMMENTlink written 3.8 years ago by Robert Castelo2.2k
0
gravatar for sathyabaarathi
3.8 years ago by
India
sathyabaarathi0 wrote:

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

ADD COMMENTlink written 3.8 years ago by sathyabaarathi0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 212 users visited in the last hour