[BioC] limma contrast.matrix and design with "common reference"

Benedikt Athmer [guest] guest at bioconductor.org
Fri Jul 25 13:41:26 CEST 2014


Hi,

I'm confused about creating a contrast matrix with Limma. I've got three groups (LA1777_X, LA_1777_6, LA1777_LVS), each replicted threefold. I would like to use the group LA1777_LVS as a "common reference" to find genes that are expressed differently between LA1777_X and LA1777_6.

The design looks like this:

  LA1777_LVS LA1777_6 LA1777_X
1          0        0        1
2          0        0        1
3          0        0        1
4          0        1        0
5          0        1        0
6          0        1        0
7          1        0        0
8          1        0        0
9          1        0        0
attr(,"assign")
[1] 1 1 1
attr(,"contrasts")
attr(,"contrasts")$target
[1] "contr.treatment"

My contrast.matrix looks like this 

contrast <- makeContrasts(diff1 = (LA1777_6-LA1777_LVS) - (LA1777_X-LA1777_LVS),
                          diff2 = LA1777_6-LA1777_X, levels = design)
> contrast
            Contrasts
Levels       diff1 diff2
  LA1777_LVS     0     0
  LA1777_6       1     1
  LA1777_X      -1    -1
  
I would expect from the contrast diff1 to find genes that differing between LA1777_6/LA1777_LVS and LA1777_X/LA1777_LVS, but diff2 give the same contrast and result. 
Can you show me how to set up the right design and contrast matrix?

Best regards, Benedikt


 -- output of sessionInfo(): 

R version 3.0.0 Patched (2013-04-04 r62494)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C         LC_TIME=C            LC_COLLATE=C         LC_MONETARY=C        LC_MESSAGES=C        LC_PAPER=C           LC_NAME=C           
 [9] LC_ADDRESS=C         LC_TELEPHONE=C       LC_MEASUREMENT=C     LC_IDENTIFICATION=C 

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

other attached packages:
 [1] topGO_2.14.0         SparseM_1.03         GO.db_2.10.1         RSQLite_0.11.4       DBI_0.2-7            AnnotationDbi_1.24.0 graph_1.40.0         gtools_3.3.0        
 [9] MapManITAG2.3_1.0    biomaRt_2.18.0       RColorBrewer_1.0-5   gplots_2.12.1        hopach_2.22.0        cluster_1.14.4       limma_3.18.13        Biobase_2.22.0      
[17] BiocGenerics_0.8.0  

loaded via a namespace (and not attached):
 [1] IRanges_1.20.6     KernSmooth_2.23-10 RCurl_1.95-4.1     XML_3.98-1.1       bitops_1.0-6       caTools_1.16       gdata_2.13.2       grid_3.0.0         lattice_0.20-24   
[10] stats4_3.0.0       tools_3.0.0 

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



More information about the Bioconductor mailing list