[BioC] something wrong with my design matrix in edgeR
Wang, Li
li.wang at ttu.edu
Thu Apr 26 18:56:46 CEST 2012
Dear List members
My targets include 31 samples representing two groups (south and north) and also four populations (FBK, NWL, SOU, CAR).
> targets <- read.delim(file = "Targets.txt", stringsAsFactors = FALSE)
> targets
files group pop
1 FBK01.txt N FBK
2 FBK04.txt N FBK
3 FBK05.txt N FBK
4 FBK08.txt N FBK
5 FBK09.txt N FBK
6 FBK10.txt N FBK
7 FBK13.txt N FBK
8 NWL02.txt N NWL
9 NWL04.txt N NWL
10 NWL06.txt N NWL
11 NWL08.txt N NWL
12 NWL09.txt N NWL
13 NWL10.txt N NWL
14 NWL11.txt N NWL
15 NWL14.txt N NWL
16 SOU01.txt S SOU
17 SOU02.txt S SOU
18 SOU03.txt S SOU
19 SOU04.txt S SOU
20 SOU07.txt S SOU
21 SOU09.txt S SOU
22 SOU11.txt S SOU
23 SOU15.txt S SOU
24 CAR01.txt S CAR
25 CAR02.txt S CAR
26 CAR03.txt S CAR
27 CAR04.txt S CAR
28 CAR05.txt S CAR
29 CAR11.txt S CAR
30 CAR12.txt S CAR
31 CAR14.txt S CAR
We are interested with the differential expression between north and south group by adjusting for differences between populations.
> latitude <- factor(targets$group)
> latitude <- relevel(latitude, ref="N")
> pop <- factor(targets$pop)
> design <- model.matrix(~pop+latitude)
> rownames(design) <- rownames(d$samples)
> design
(Intercept) popFBK popNWL popSOU latitudeS
1 1 1 0 0 0
2 1 1 0 0 0
3 1 1 0 0 0
4 1 1 0 0 0
5 1 1 0 0 0
6 1 1 0 0 0
7 1 1 0 0 0
8 1 0 1 0 0
9 1 0 1 0 0
10 1 0 1 0 0
11 1 0 1 0 0
12 1 0 1 0 0
13 1 0 1 0 0
14 1 0 1 0 0
15 1 0 1 0 0
16 1 0 0 1 1
17 1 0 0 1 1
18 1 0 0 1 1
19 1 0 0 1 1
20 1 0 0 1 1
21 1 0 0 1 1
22 1 0 0 1 1
23 1 0 0 1 1
24 1 0 0 0 1
25 1 0 0 0 1
26 1 0 0 0 1
27 1 0 0 0 1
28 1 0 0 0 1
29 1 0 0 0 1
30 1 0 0 0 1
31 1 0 0 0 1
attr(,"assign")
[1] 0 1 1 1 2
attr(,"contrasts")
attr(,"contrasts")$pop
[1] "contr.treatment"
attr(,"contrasts")$latitude
[1] "contr.treatment"
I am wondering maybe there is something wrong with my design matrix. So, when I tried to estimate the dispersions, I got the following errors.
> d <- estimateGLMCommonDisp(d, design)
Error in solve.default(R, t(beta)) :
system is computationally singular: reciprocal condition number = 5.16368e-17
The following is session information. Any comments are very appreciated.
> sessionInfo()
R version 2.15.0 (2012-03-30)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=C LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] qvalue_1.30.0 edgeR_2.6.0 limma_3.12.0
loaded via a namespace (and not attached):
[1] tcltk_2.15.0 tools_2.15.0
Thanks in advance!
Best wishes
Li
More information about the Bioconductor
mailing list