Error while calling function topTable() from limma R package in microarray data analysis
1
0
Entering edit mode
svlachavas ▴ 830
@svlachavas-7225
Last seen 13 months ago
Germany/Heidelberg/German Cancer Resear…

Dear People,

i was trying to implement limma for statistical comparison of a microarray dataset, regarding specific comparisons. Part of my code is the following:

# Other code above skipped for simplicity..
condition <- factor(eset.filtered$Disease, levels=c("Normal","Cancer"))
pairs <- factor(rep(1:30, each = 2))
metastatic <- factor(eset.filtered$Meta_factor)
f <- paste(condition, metastatic, sep=".")
f <- factor(f)
design1 <- model.matrix(~0 +f)
colnames(design1) <- levels(f)

aw <- arrayWeights(eset.filtered, design1)

w <- asMatrixWeights(aw, dim(eset.filtered))
dupcor <- duplicateCorrelation(eset.filtered, design1, block=pairs, weights=w)
fit <- lmFit(eset.filtered, design1, block=pairs, correlation=dupcor$consensus, weights=w)
cm <- makeContrasts(Meta_CancervsMeta_Control="Cancer.1-Normal.1" , levels=design1)
fit2 <- contrasts.fit(fit, cm)
fit3 <- eBayes(fit2, trend=TRUE)

But then when im calling the function:

top2 <- topTable(fit3, coef="Meta_CancervsMeta_Control", number=nrow(fit3), adjust.method="fdr", sort.by="none")

The following weird error appeared:

Error in .local(fit, n, ...) : unused argument (number = 9065)

Also, when i tried ?topTable i got the two following results:

S4 Generic for obtaining a top table
(in package a4Core in library C:/Program Files/R/R-3.2.2/library)


Table of Top Genes from Linear Model Fit
(in package limma in library C:/Program Files/R/R-3.2.2/library)

Thus, it seems very "naively" that when i run topTable, it utilizes the S4 generic function for topTable from the package a4Core. However, i need this package upstream, in order to use just a function of merging 2 datasets. So, is it possible to explicitly call topTable from limma with a function, in order to avoid the error ? Or as a last alternative, to isolate the merging function from the a4Core package, and create manually this one, in order not to load the package before limma ?

Any help would be greatful !!

*My sessionInfo:

> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 8 x64 (build 9200)

locale:
[1] LC_COLLATE=Greek_Greece.1253  LC_CTYPE=Greek_Greece.1253   
[3] LC_MONETARY=Greek_Greece.1253 LC_NUMERIC=C                 
[5] LC_TIME=Greek_Greece.1253    

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

other attached packages:
 [1] statmod_1.4.24       sva_3.18.0           mgcv_1.8-11         
 [4] nlme_3.1-124         a4Base_1.18.0        gplots_2.17.0       
 [7] a4Core_1.18.0        a4Preproc_1.18.0     glmnet_2.0-2        
[10] foreach_1.4.3        Matrix_1.2-3         multtest_2.26.0     
[13] limma_3.26.7         genefilter_1.52.1    mpm_1.0-22          
[16] KernSmooth_2.23-15   MASS_7.3-45          annaffy_1.42.0      
[19] KEGG.db_3.2.2        GO.db_3.2.2          RSQLite_1.0.0       
[22] DBI_0.3.1            AnnotationDbi_1.32.3 IRanges_2.4.6       
[25] S4Vectors_0.8.11     Biobase_2.30.0       BiocGenerics_0.16.1 

loaded via a namespace (and not attached):
 [1] bitops_1.0-6     iterators_1.0.8  tools_3.2.2      annotate_1.48.0 
 [5] lattice_0.20-33  gtools_3.5.0     caTools_1.17.1   XML_3.98-1.3    
 [9] survival_2.38-3  gdata_2.17.0     codetools_0.2-14 splines_3.2.2   
[13] xtable_1.8-0    

limma microarray a4Core topTable statistical inference • 2.4k views
ADD COMMENT
2
Entering edit mode
Aaron Lun ★ 28k
@alun
Last seen 18 minutes ago
The city by the bay

Try calling limma::topTable.

ADD COMMENT
0
Entering edit mode

Dear Aaron,

thank you for your quick response !!

So, i used 

top2 <- limma::topTable(fit3, coef="Meta_CancervsMeta_Control", number=nrow(fit3), adjust.method="fdr", sort.by="none")

and it runned without an error !!

ADD REPLY

Login before adding your answer.

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