Limma Camera error
1
1
Entering edit mode
ea1402 ▴ 20
@ea1402-8294
Last seen 8.1 years ago
United States

Hi,

I have done a differential expression analysis using limma. When I try the camera analysis 

dummy_out=camera(voom_data,all_signatures_for_camera,design,contrast.matrix1)

I get the error Error in U[iset, , drop = FALSE] : no 'dimnames' attribute for array

Here the voom_data is the voom output, design is what i use the design matrix in voom. all_signatures_for_camera is a list of 18 gene sets?

What is causing the error ?

thanks

limma camera • 2.8k views
ADD COMMENT
0
Entering edit mode

Thanks

 

 

ADD REPLY
0
Entering edit mode

Are you using the latest release of Bioconductor and limma? Please give output from sessionInfo().

ADD REPLY
0
Entering edit mode

I reinstalled limma without success. am I supposed to give input voom_data not voom_data$E? I am having more than 2 contrasts to compare I hope this does not cause any problems.

ADD REPLY
0
Entering edit mode

Yes, you are supposed to use voom_data.

Yes, it does cause a problem to have more than 2 contrasts. camera() only accepts 1 contrast.

ADD REPLY
0
Entering edit mode

the contrast.matrix1 has only one contrasts however, length(colnames(design))>2, still would be a problem? Updating bioconductor at the same time.

ADD REPLY
0
Entering edit mode

> sessionInfo()
R version 3.2.0 (2015-04-16)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] edgeR_3.10.5         BiocInstaller_1.18.5 rJava_0.9-7          limma_3.24.15        biomaRt_2.24.1   

ADD REPLY
0
Entering edit mode

You are not using the current release of Bioconductor. To upgrade, start a new R session, then type:

source("http://bioconductor.org/biocLite.R")
biocLite("BiocUpgrade")
ADD REPLY
3
Entering edit mode
@gordon-smyth
Last seen 19 minutes ago
WEHI, Melbourne, Australia

Are you using the latest release of Bioconductor and limma?

Please show us the output of these commands:

show(voom_data)
summary(all_signatures_for_camera)
summary(all_signatures_for_camera[[1]])

If you type this:

voom_data[all_signatures_for_camera[[1]],]

do you get an error?

 

Edit: I have now confirmed that this is a bug in camera(), which is not handling character index vectors correctly when observation weights are set. To avoid this, convert all the character index vectors to integer index vectors like this:

integer_signatures <- ids2indices(all_signatures_for_camera, rownames(voom_data))

Then use integer_signatures instead of all_signatures_for_camera.

Edit 2: This bug has since been fixed in both the release and developmental versions of limma.

 

ADD COMMENT
0
Entering edit mode

Gordon thanks for helping I updated both R and bioconductor but issue is still there. Below is my complete code.

I have 20 treatments and 9 control samples. so length(colnames(design))=21. So using camera in a for loop I am 

checking all of the contrasts one by one as seen by the code:

for (i in samples_for_camera)

{
contrast.matrix1 <- makeContrasts(contrasts=paste0(i,"-","Pcontrol"),levels=design)
dummy_out=camera(voom_data,all_signatures_for_camera,design,contrast.matrix1)
dummy_name=paste0("Camera_gene_set_",i)
assign(dummy_name,dummy_out)
rm(dummy_out,dummy_name,contrast.matrix1)  

 

What do I lose by giving the input as voom_data$E? I get some reasonable results but I guess I lose the beauty of the precision weights from voom? With voom_data$E as input how does camera calculate differential expression and rank genes?

ADD REPLY
0
Entering edit mode

The current release is limma 3.26.0. There has however been no change to the camera() function since 3.24.15.

ADD REPLY
0
Entering edit mode

Gordon thanks for helping I updated both R and bioconductor but issue is still there. Below is my complete code.

I have 20 treatments and 9 control samples. so length(colnames(design))=21. So using camera in a for loop I am 

checking all of the contrasts one by one as seen by the code:

for (i in samples_for_camera)

{
contrast.matrix1 <- makeContrasts(contrasts=paste0(i,"-","Pcontrol"),levels=design)
dummy_out=camera(voom_data,all_signatures_for_camera,design,contrast.matrix1)
dummy_name=paste0("Camera_gene_set_",i)
assign(dummy_name,dummy_out)
rm(dummy_out,dummy_name,contrast.matrix1)  

 

What do I lose by giving the input as voom_data$E? I get some reasonable results but I guess I lose the beauty of the precision weights from voom? With voom_data$E as input how does camera calculate differential expression and rank genes? Just to isolate the issue I tried running this on the cluster we have in our institution with the same issue. I tried a dummy experiment different than mine again same issue. Have you used camera recently, is it possible that there is a bug with other updates?

thanks 

ADD REPLY
0
Entering edit mode

I think I solved the issue by adding

xx=ids2indices(all_signatures_for_camera,rownames(voom_data$E))

which converts the ensembl id's for the genes in the gene set as integer indices, so weird that this causes a problem.

 

thanks again

ADD REPLY

Login before adding your answer.

Traffic: 565 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