[BioC] problem with contrast.matrix and eBayes in limma

Oihane Irazoki [guest] guest at bioconductor.org
Tue May 21 16:48:13 CEST 2013


Hi! I'm sorry for bothering you. I'm a new R-user and I'm having some problems while doing a microarray analysis. I'm comparing the whole genome array of a Salmonella serovar to another 25, and my goal is to determine which genes are differentially expressed. I'm using limma package and running the next code, 


DIFFERENTIAL EXPRESSION i
#several groups comparisson (by serovars)

groups <- read.table("ClusteringSamples.txt", head=T, sep='\t')

f <- factor(groups$Serovar)
design <- model.matrix(~0 + f) 

colnames(design) <- c("Abortusovis", "Agona", "Anatum", "Arizonae", "Braenderup",
       "Bredeney", "Cholerasuis", "Derby", "Enteritidis", "Gallinarum", "Goelzau", 
        "Hadar", "Havana", "Infantis", "Kedougou", "Mbandaka", "Mikawasima", "Ohio", 
        "ParatiphyA", "ParatiphyB", "Pos.Control", "Pullorum", "Typhi", 
        "Typhimurium", "Virchow") 
           #Convertir a vectores!

summary(is.na(data)) #check if there is any missing value in the dataset. 

fit <- lmFit(data, design)

contrast.matrix <- makeContrasts(Abortusovis-Pos.Control, Agona-Pos.Control, 
        Anatum-Pos.Control, Arizonae-Pos.Control, Braenderup-Pos.Control, 
        Bredeney-Pos.Control, Cholerasuis-Pos.Control, Derby-Pos.Control, 
        Enteritidis-Pos.Control, Gallinarum-Pos.Control, Goelzau-Pos.Control, 
        Hadar-Pos.Control, Havana-Pos.Control, Infantis-Pos.Control, 
        Kedougou-Pos.Control, Mbandaka-Pos.Control, Mikawasima-Pos.Control, 
        Ohio-Pos.Control, ParatiphyA-Pos.Control, ParatiphyB-Pos.Control, 
        Pos.Control-Pos.Control, Pullorum-Pos.Control, Typhi-Pos.Control, 
        Typhimurium-Pos.Control, Virchow-Pos.Control, 
                               levels=design)

fit1 <- contrasts.fit(fit, contrast.matrix)
fit2 <- eBayes(fit1)

But when I try to run eBayes correction to then compute topTable and get those differentially expressed genes, I get the next error back:  


Error in eigen(cor.matrix, symmetric = TRUE) : 
  infinite or missing values in 'x'
In addition: Warning messages:
1: In ebayes(fit = fit, proportion = proportion, stdev.coef.lim = stdev.coef.lim,  :
  Estimation of var.prior failed - set to default value
2: In cov2cor(object$cov.coefficients) :
  diag(.) had 0 or NA entries; non-finite result is doubtful

I try to eliminate those missing values, but then I only can compute the contrast matrix of 13 of the 25 different serovars. 
How can I solve the problem? I'll appreciate all the help and advices. 

Oihane

 -- output of sessionInfo(): 

R version 3.0.0 (2013-04-03)
Platform: x86_64-apple-darwin10.8.0 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
 [1] splines   parallel  grid      stats     graphics  grDevices utils    
 [8] datasets  methods   base     

other attached packages:
 [1] venneuler_1.1-0    rJava_0.9-4        siggenes_1.34.0    multtest_2.16.0   
 [5] Biobase_2.20.0     BiocGenerics_0.6.0 limma_3.16.1       gplots_2.11.0     
 [9] MASS_7.3-26        KernSmooth_2.23-10 caTools_1.14       gdata_2.12.0      
[13] gtools_2.7.1       ggplot2_0.9.3.1   

loaded via a namespace (and not attached):
 [1] bitops_1.0-5       colorspace_1.2-1   dichromat_2.0-0    digest_0.6.3      
 [5] gtable_0.1.2       labeling_0.1       munsell_0.4        plyr_1.8          
 [9] proto_0.3-10       RColorBrewer_1.0-5 reshape2_1.2.2     scales_0.2.3      
[13] stats4_3.0.0       stringr_0.6.2      survival_2.37-4    tools_3.0.0       

--
Sent via the guest posting facility at bioconductor.org.



More information about the Bioconductor mailing list