Search
Question: Error in data.frame for limmaCtData function
0
gravatar for azmir004
12 weeks ago by
azmir0040
azmir0040 wrote:

Hi all,

I have a set of raw data from Taqman Low Density Array cards to be analysed with HTqPCR package. My data input has 2 types of files. First type of files are the .txt files for each sample which containing columns of 1) Flag (pass or fail), 2) Feature (name of genes), 3) Type (target or endogenous control), 4) Position (no. of wells), 5) Ct and 6) Sample (name of sample of respective file, e.g. treatment1). Second type of file is a .txt file containing columns of 1) File (name of file for each sample, e.g. treatment1.txt, treatment2.txt, control1.txt, control2.txt, ...), Phenotype (TREATMENT, CONTROL), Sample (number of sample, e.g. sample1, sample2, ...) and ID (name of samples, e.g. treatment1, treatment2, control1, control2, ...). I used the data that have been normalized using quantile normalization for limma test. The quantile-normalized data has been named as "q.norm". I encountered a problem while running limmaCtData function.  These are the R codes that I ran for limma test.

>design <- model.matrix(~0+phenotype)
>colnames(design) <- c("CONTROL", "TREATMENT")

>print(design)
>contrasts <- makeContrasts(TREATMENT-CONTROL, levels=design)
>colnames(contrasts) <- c("TREATMENT-CONTROL")
>print(contrasts)

>qDE.limma <- limmaCtData(q.norm, design=design, contrasts=contrasts)

The error warning came out after I ran limmaCtData function and it appeared as below:

> qDE.limma <- limmaCtData(q.norm, design=design, contrasts=contrasts)
Error in data.frame(..., check.names = FALSE) : 
  arguments imply differing number of rows: 187, 0

This is the output of my traceback():

> traceback()
5: stop(gettextf("arguments imply differing number of rows: %s", 
       paste(unique(nrows), collapse = ", ")), domain = NA)
4: data.frame(..., check.names = FALSE)
3: cbind(deparse.level, ...)
2: cbind(rownames(res), featPos, res[, c("t", "P.Value", "adj.P.Val", 
       "logFC")], 2^(-res$logFC), both.means, both.cats)
1: limmaCtData(q.norm, design = design, contrasts = contrasts)

This is the output of my sessionInfo():

> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows >= 8 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_Malaysia.1252 
[2] LC_CTYPE=English_Malaysia.1252   
[3] LC_MONETARY=English_Malaysia.1252
[4] LC_NUMERIC=C                     
[5] LC_TIME=English_Malaysia.1252    

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

other attached packages:
[1] HTqPCR_1.34.0       limma_3.36.3        RColorBrewer_1.1-2 
[4] Biobase_2.40.0      BiocGenerics_0.26.0

loaded via a namespace (and not attached):
 [1] gtools_3.8.1          bitops_1.0-6         
 [3] affy_1.58.0           stats4_3.5.1         
 [5] KernSmooth_2.23-15    BiocInstaller_1.30.0 
 [7] gplots_3.0.1          zlibbioc_1.26.0      
 [9] gdata_2.18.0          affyio_1.50.0        
[11] preprocessCore_1.42.0 tools_3.5.1          
[13] compiler_3.5.1        caTools_1.17.1.1

This is the output of my BiocInstaller::BiocValid():

> BiocInstaller::biocValid()

* sessionInfo()

R version 3.5.1 (2018-07-02)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows >= 8 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_Malaysia.1252 
[2] LC_CTYPE=English_Malaysia.1252   
[3] LC_MONETARY=English_Malaysia.1252
[4] LC_NUMERIC=C                     
[5] LC_TIME=English_Malaysia.1252    

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

other attached packages:
[1] HTqPCR_1.34.0       limma_3.36.3        RColorBrewer_1.1-2 
[4] Biobase_2.40.0      BiocGenerics_0.26.0

loaded via a namespace (and not attached):
 [1] gtools_3.8.1          bitops_1.0-6         
 [3] affy_1.58.0           stats4_3.5.1         
 [5] KernSmooth_2.23-15    BiocInstaller_1.30.0 
 [7] gplots_3.0.1          zlibbioc_1.26.0      
 [9] gdata_2.18.0          affyio_1.50.0        
[11] preprocessCore_1.42.0 tools_3.5.1          
[13] compiler_3.5.1        caTools_1.17.1.1     

Library path directories:
  C:/Users/Admin/Documents/R/win-library/3.5 

* Out-of-date packages
             Package       
DelayedArray "DelayedArray"
digest       "digest"      
later        "later"       
rtracklayer  "rtracklayer" 
snow         "snow"        
stringi      "stringi"     
xtable       "xtable"      
             LibPath                                     
DelayedArray "C:/Users/Admin/Documents/R/win-library/3.5"
digest       "C:/Users/Admin/Documents/R/win-library/3.5"
later        "C:/Users/Admin/Documents/R/win-library/3.5"
rtracklayer  "C:/Users/Admin/Documents/R/win-library/3.5"
snow         "C:/Users/Admin/Documents/R/win-library/3.5"
stringi      "C:/Users/Admin/Documents/R/win-library/3.5"
xtable       "C:/Users/Admin/Documents/R/win-library/3.5"
             Installed Built   ReposVer
DelayedArray "0.6.5"   "3.5.1" "0.6.6" 
digest       "0.6.16"  "3.5.1" "0.6.17"
later        "0.7.3"   "3.5.1" "0.7.5" 
rtracklayer  "1.40.5"  "3.5.1" "1.40.6"
snow         "0.4-2"   "3.5.0" "0.4-3" 
stringi      "1.1.7"   "3.5.0" "1.2.4" 
xtable       "1.8-2"   "3.5.1" "1.8-3" 
             Repository                                              
DelayedArray "https://bioconductor.org/packages/3.7/bioc/src/contrib"
digest       "https://cran.rstudio.com/src/contrib"                  
later        "https://cran.rstudio.com/src/contrib"                  
rtracklayer  "https://bioconductor.org/packages/3.7/bioc/src/contrib"
snow         "https://cran.rstudio.com/src/contrib"                  
stringi      "https://cran.rstudio.com/src/contrib"                  
xtable       "https://cran.rstudio.com/src/contrib"                  

update with biocLite()

Error: 7 package(s) out of date

As I am still new with R software, based on the information that I present here, can you help me where is my mistake and what should I do so I can run limmaCtData function?

ADD COMMENTlink modified 12 weeks ago by Gordon Smyth35k • written 12 weeks ago by azmir0040
0
gravatar for Gordon Smyth
12 weeks ago by
Gordon Smyth35k
Walter and Eliza Hall Institute of Medical Research, Melbourne, Australia
Gordon Smyth35k wrote:

I see that you've gone to a lot of effort to try to provide information, but I still can't guess what the problem is, particularly without seeing anything about your object q.norm.

You are using the HTqPCR package, so you need to attach the HTqPCR tag to your question, otherwise the HTqPCR authors may not be alerted to your question. The limmaCtData() is a HTqPCR function rather than a limma function. HTqPCR wraps limma functionality and it might be the wrapping that is causing the problem.

Alternatively you could use try using limma directly, which would allow me and others to provide more help.

 

ADD COMMENTlink modified 12 weeks ago • written 12 weeks ago by Gordon Smyth35k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 358 users visited in the last hour