Limma, lmFit, array weight
0
0
Entering edit mode
9.0 years ago
jl.juluan • 0

Hey all,

I am doing microarray data analysis using limma package.

However, I tried to combine 'array weight' into:

it <- lmFit([large expressionSet data], design, weights=arrayw)
Error in lm.wfit(design, t(M), weights[1, ]) : incompatible dimensions

Anyone help?

Thanks

R • 2.4k views
ADD COMMENT
0
Entering edit mode

Job tag is for job offers. Please, change it to question :).

ADD REPLY
0
Entering edit mode

I think you should give details of your data and design. Otherwise it will impossible for us to help you

ADD REPLY
0
Entering edit mode
###paired###

IQRs <- esApply(data.gcrma,1,IQR)

f3 <- function(x)( IQR(x) > median(IQRs) )
selected3 <- genefilter(data.gcrma, f3)
sum(selected3)

gcrmaf3 <- (data.gcrma[selected3,])
dim(data.gcrma)

Features  Samples
   54675       56 

dim(gcrmaf3)

Features  Samples
   27337       56

library(limma)

arrayw <- arrayWeights(data.gcrma)
targets <- readTargets("phenoDataRTC.txt")
sibShip <- factor(targets$sibShip)
Disease <- factor(targets$Disease, levels=c("N","L"))
design <- model.matrix(~sibShip+Disease)
design

(Intercept) sibShip7 sibShip8 sibShip10 sibShip11 sibShip12 sibShip13 sibShip15
1            1        0        0         0         0         0         0         0
2            1        0        0         0         0         0         0         0
3            1        1        0         0         0         0         0         0
4            1        1        0         0         0         0         0         0
5            1        0        1         0         0         0         0         0
6            1        0        1         0         0         0         0         0
7            1        0        0         1         0         0         0         0
8            1        0        0         1         0         0         0         0
9            1        0        0         0         1         0         0         0
10           1        0        0         0         1         0         0         0
11           1        0        0         0         0         1         0         0
12           1        0        0         0         0         1         0         0
13           1        0        0         0         0         0         1         0
14           1        0        0         0         0         0         1         0
15           1        0        0         0         0         0         0         1
16           1        0        0         0         0         0         0         1
17           1        0        0         0         0         0         0         0
18           1        0        0         0         0         0         0         0
19           1        0        0         0         0         0         0         0
20           1        0        0         0         0         0         0         0
21           1        0        0         0         0         0         0         0
22           1        0        0         0         0         0         0         0
23           1        0        0         0         0         0         0         0
24           1        0        0         0         0         0         0         0
25           1        0        0         0         0         0         0         0
26           1        0        0         0         0         0         0         0
27           1        0        0         0         0         0         0         0
28           1        0        0         0         0         0         0         0

   sibShip17 sibShip19 sibShip20 sibShip21 sibShip22 sibShip23 DiseaseL
1          0         0         0         0         0         0        0
2          0         0         0         0         0         0        1
3          0         0         0         0         0         0        0
4          0         0         0         0         0         0        1
5          0         0         0         0         0         0        0
6          0         0         0         0         0         0        1
7          0         0         0         0         0         0        0
8          0         0         0         0         0         0        1
9          0         0         0         0         0         0        0
10         0         0         0         0         0         0        1
11         0         0         0         0         0         0        0
12         0         0         0         0         0         0        1
13         0         0         0         0         0         0        0
14         0         0         0         0         0         0        1
15         0         0         0         0         0         0        0
16         0         0         0         0         0         0        1
17         1         0         0         0         0         0        0
18         1         0         0         0         0         0        1
19         0         1         0         0         0         0        0
20         0         1         0         0         0         0        1
21         0         0         1         0         0         0        0
22         0         0         1         0         0         0        1
23         0         0         0         1         0         0        0
24         0         0         0         1         0         0        1
25         0         0         0         0         1         0        0
26         0         0         0         0         1         0        1
27         0         0         0         0         0         1        0
28         0         0         0         0         0         1        1

attr(,"assign")
 [1] 0 1 1 1 1 1 1 1 1 1 1 1 1 1 2

attr(,"contrasts")

attr(,"contrasts")$sibShip
[1] "contr.treatment"

attr(,"contrasts")$Disease
[1] "contr.treatment"

fit <- lmFit(gcrmaf3, design,  weights=arrayw)
fits <-eBayes(fit)
ADD REPLY

Login before adding your answer.

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