[BioC] Fold change GEO data
Sean Davis
sdavis2 at mail.nih.gov
Tue Sep 9 20:21:35 CEST 2008
On Tue, Sep 9, 2008 at 1:31 PM, hemant ritturaj
<ritturajhemant at gmail.com> wrote:
> Dear Sean,
>
> My apologies for the errror.
>
> Here I am giving the complete error which i am getting
>
>> gse <- getGEO('gse6901')[[1]]
>> exprs(gse)
>> log2(exprs(gse))
>> set <- log2(exprs(gse))
>> targets <- c('A','A','A','B','B','B','C','C','C','D','D','D')
>> f <- factor(targets,levels=c('A','B','C','D'))
>> design <- model.matrix(~0+f)
>> contrast.matrix <- makeContrasts(fA-fB,fA-fC,fA-fD,levels=design)
>> fit <- lmFit(set,design,method="robust")
>> fit2 <- contrasts.fit(fit,contrast.matrix)
>> fit2 <- ebayes(fit2)
>
>> names(fit2)
> [1] "df.prior" "s2.prior" "s2.post" "t" "p.value" "var.prior"
> [7] "lods"
>
> topTable(fit2,n=10)
> Error in if (ncol(fit) > 1) return(topTableF(fit, number = number, genelist
> = genelist, :
> argument is of length zero
This works for me:
gse <- getGEO('gse6901')[[1]]
exprs(gse) <- log2(exprs(gse)+1) # avoid log2(0) since we are not normalizing
targets <- c('A','A','A','B','B','B','C','C','C','D','D','D')
f <- factor(targets,levels=c('A','B','C','D'))
design <- model.matrix(~0+f)
contrast.matrix <- makeContrasts(fA-fB,fA-fC,fA-fD,levels=design)
fit <- lmFit(gse,design) # you can use an ExpressionSet just fine in limma
fit2 <- contrasts.fit(fit,contrast.matrix)
fit2 <- eBayes(fit2)
names(fit2)
[1] "coefficients" "rank" "assign" "qr"
[5] "df.residual" "sigma" "cov.coefficients" "stdev.unscaled"
[9] "genes" "Amean" "method" "design"
[13] "contrasts" "df.prior" "s2.prior" "var.prior"
[17] "proportion" "s2.post" "t" "p.value"
[21] "lods" "F" "F.p.value"
Again, start with a clean workspace, load GEOquery and limma, then
paste the above commands into the window. Let us know if you have
further questions.
More information about the Bioconductor
mailing list