[BioC] limma makeContrasts names

Yannick Wurm Yannick.Wurm at unil.ch
Tue Mar 4 11:47:00 CET 2008


Hi,
I just stumbled onto an error creating contrasts in limma 2.12 on R  
2.6.2, but could not find it in the mailing list archives or google,  
so I thought I might share it for the next person.


Here's what happened:
	> cont.matrix= makeContrasts(MT_3hvsMT_0h= (M_A3h+M_D3h+M_G3h+M_K3h- 
(M_A0h+M_D0h+M_G0h+M_K0h))/4, levels=design)
	Error in makeContrasts(MT_3hvsMT_0h = (M_A3h + M_D3h + M_G3h + M_K3h  
-  :
	  Parameter names must by syntactically valid names in R


But my same command had worked on a reduced dataset just a few days  
earlier.
Turns out the issue came from my targets file:
		> cont.matrix= makeContrasts(MT_3hvsMT_0h= (M_A3h+M_D3h+M_G3h+M_K3h- 
(M_A0h+M_D0h+M_G0h+M_K0h))/4, levels=colnames(design)[1:186])
#this one worked
		> cont.matrix= makeContrasts(MT_3hvsMT_0h= (M_A3h+M_D3h+M_G3h+M_K3h- 
(M_A0h+M_D0h+M_G0h+M_K0h))/4, levels=colnames(design)[1:187])
		Error in makeContrasts(MT_3hvsMT_0h = (M_A3h + M_D3h + M_G3h +  
M_K3h -  :
		  Parameter names must by syntactically valid names in R
		> colnames(design)[187]
		[1] "W_P48h  "


One of the sample names had spaces in it...

Have a great day,

yannick



More information about the Bioconductor mailing list