Problem with hLICORN function of CoRegNet
4
0
Entering edit mode
Aaerp ▴ 40
@aaerp-6373
Last seen 7.2 years ago
France

Dear all,

I have this error when I try to use the hLICORN from CoRegNet.

As example:

library(CoRegNet)

gexp=matrix(rnorm(2600,sd=3),ncol=100)
gexp=rbind(gexp,do.call(rbind,lapply(1:26,function(i){
tf = sample(1:26,4)
return((gexp[tf[1],]+gexp[tf[2],] -gexp[tf[3],]-gexp[tf[4],] +rnorm(100,sd=3))/2)})))
dimnames(gexp)=list(c(letters,LETTERS),paste("s",1:100,sep=""))
GRN=hLICORN(gexp,TFlist = letters)

Error in validObject(.Object) :
  invalid class “itemMatrix” object: item labels do not match number of columns
In addition: Warning message:
In hLICORN(gexp, TFlist = letters) :
  Expression data should be in a matrix or data frame with genes in rows and samples in column.

sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.5 (Yosemite)

locale:
[1] fr_FR.UTF-8/fr_FR.UTF-8/fr_FR.UTF-8/C/fr_FR.UTF-8/fr_FR.UTF-8

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

other attached packages:
[1] CoRegNet_1.5.0 arules_1.1-9   Matrix_1.2-2   shiny_0.12.2   igraph_1.0.1  

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.0                ComplexHeatmap_1.3.3       RColorBrewer_1.1-2         futile.logger_1.4.1        GenomeInfoDb_1.5.13       
 [6] XVector_0.9.3              GenomicFeatures_1.21.18    bitops_1.0-6               futile.options_1.0.0       tools_3.2.2               
[11] zlibbioc_1.15.0            dendextend_1.1.0           biomaRt_2.25.1             digest_0.6.8               lattice_0.20-33           
[16] RSQLite_1.0.0              DBI_0.3.1                  parallel_3.2.2             rtracklayer_1.29.21        Biostrings_2.37.8         
[21] GlobalOptions_0.0.8        S4Vectors_0.7.14           IRanges_2.3.18             stats4_3.2.2               grid_3.2.2                
[26] Biobase_2.29.1             R6_2.1.1                   GetoptLong_0.1.0           AnnotationDbi_1.31.17      XML_3.98-1.3              
[31] BiocParallel_1.3.51        lambda.r_1.1.7             magrittr_1.5               whisker_0.3-2              htmltools_0.2.6           
[36] Rsamtools_1.21.16          BiocGenerics_0.15.6        GenomicRanges_1.21.20      GenomicAlignments_1.5.12   SummarizedExperiment_0.3.3
[41] xtable_1.7-4               mime_0.3                   shape_1.4.2                circlize_0.3.1             colorspace_1.2-6          
[46] httpuv_1.3.3               RCurl_1.95-4.7             rjson_0.2.15

 

 

 

network analysis • 3.1k views
ADD COMMENT
1
Entering edit mode
svlachavas ▴ 830
@svlachavas-7225
Last seen 13 months ago
Germany/Heidelberg/German Cancer Resear…

Dear Aaerp,

have you firstly checked the vignette (http://bioconductor.org/packages/release/bioc/vignettes/CoRegNet/inst/doc/CoRegNet.html) ?

If not, you could first set.seed(0) in order for the results to be reproducible:

i run your code and returned:

Warning messages:
1: In hLICORN(gexp, TFlist = letters) :
  Expression data should be in a matrix or data frame with genes in rows and samples in column.
2: In coregulators(coregnetwork, verbose = FALSE, alpha = 1) :
  No natural co-regulators found in the network. This either means that the network was inferred with another methods or that there is insufficient evidences to infer significant co-regulators. Only pairs will be returned.

So, you need to have in mind that CoRegNet works only as it shows with unique gene symbols in rows of data frame or matrix, and with samples in column.

Also, regarding the TFlist the TFlist argument should simply contain an [object(vector)] with the name of the TF coding genes-thus, you could simply use as the vignettes:

data(HumanTF)-TFlist=HumanTF, or download another TF lists of your interest.

Finally, on what did you use the package CoRegNet and have the above problems ? some microarray datasets ?

Best,

Efstathios

ADD COMMENT
1
Entering edit mode
@remycnicolle-7004
Last seen 7.1 years ago
CIT, Ligue Nationale Contre le Cancer, …

Hi Aaerp,

I'm sorry you're experiencing some problems with the package.

Unfortunately, I'm absolutely unable to reproduce your errors. I do get some warnings (that I should correct anyhow) but a it works find on the machines I tested. 

I'll try to look deeper in the code but for now, you may want to try this :

gexp=matrix(rnorm(2600,sd=3),ncol=100)

gexp=rbind(gexp,do.call(rbind,lapply(1:26,function(i){

tf = sample(1:26,4)

return((gexp[tf[1],]+gexp[tf[2],] -gexp[tf[3],]-gexp[tf[4],] +rnorm(100,sd=3))/2)})))

gexp=data.frame(gexp)

dimnames(gexp)=list(c(letters,LETTERS),paste("s",1:100,sep=""))

GRN=hLICORN(gexp,TFlist = letters)

 

Using a data.frame might force some faulty instruction to consider dimnames as unique. That's all I can think of for the moment.

ADD COMMENT
0
Entering edit mode

Dear Remy,

Thank you for your answer. However, tt doesn't seem to work:

gexp=matrix(rnorm(2600,sd=3),ncol=100)

gexp=rbind(gexp,do.call(rbind,lapply(1:26,function(i){

tf = sample(1:26,4)

return((gexp[tf[1],]+gexp[tf[2],] -gexp[tf[3],]-gexp[tf[4],] +rnorm(100,sd=3))/2)})))

gexp=data.frame(gexp)

dimnames(gexp)=list(c(letters,LETTERS),paste("s",1:100,sep=""))

GRN=hLICORN(gexp,TFlist = letters)

Error in validObject(.Object) :
  invalid class “itemMatrix” object: item labels do not match number of columns

session_info()
Session info --------------------------------------------------------------------------------
 setting  value                       
 version  R version 3.2.2 (2015-08-14)
 system   x86_64, darwin13.4.0        
 ui       RStudio (0.99.441)          
 language (EN)                        
 collate  fr_FR.UTF-8                 
 tz       Europe/Paris                
 date     2015-08-31                  

Packages ------------------------------------------------------------------------------------
 package              * version  date       source                                    
 ade4                 * 1.7-2    2015-04-14 CRAN (R 3.2.0)                            
 AnnotationDbi          1.31.17  2015-06-18 Bioconductor                              
 arules               * 1.1-9    2015-07-14 CRAN (R 3.2.0)                            
 assertthat             0.1      2013-12-06 CRAN (R 3.2.0)                            
 Biobase              * 2.29.1   2015-05-03 Bioconductor                              
 BiocGenerics         * 0.15.6   2015-08-08 Bioconductor                              
 BiocParallel           1.3.51   2015-08-22 Bioconductor                              
 BiocStyle            * 1.7.6    2015-07-31 Bioconductor                              
 biomaRt                2.25.1   2015-04-21 Bioconductor                              
 Biostrings           * 2.37.8   2015-08-22 Bioconductor                              
 bit                  * 1.1-12   2014-04-09 CRAN (R 3.2.0)                            
 bitops                 1.0-6    2013-08-17 CRAN (R 3.2.0)                            
 BSgenome             * 1.37.4   2015-07-26 Bioconductor                              
 car                  * 2.0-26   2015-08-06 CRAN (R 3.2.0)                            
 CGHbase              * 1.29.0   2015-04-17 Bioconductor                              
 circlize               0.3.1    2015-08-19 CRAN (R 3.2.2)                            
 cluster              * 2.0.3    2015-07-21 CRAN (R 3.2.2)                            
 codetools              0.2-14   2015-07-15 CRAN (R 3.2.2)                            
 colorspace             1.2-6    2015-03-11 CRAN (R 3.2.0)                            
 ComplexHeatmap         1.3.3    2015-08-25 Bioconductor (R 3.2.2)                    
 CoRegNet             * 1.5.0    2015-04-17 Bioconductor                              
 corrplot             * 0.73     2013-10-15 CRAN (R 3.2.0)                            
 DBI                    0.3.1    2014-09-24 CRAN (R 3.2.0)                            
 dendextend             1.1.0    2015-07-31 CRAN (R 3.2.1)                            
 devtools             * 1.9.0    2015-08-15 Github (hadley/devtools@2881db5)          
 digest                 0.6.8    2014-12-31 CRAN (R 3.2.0)                            
 doParallel             1.0.8    2014-02-28 CRAN (R 3.2.0)                            
 dplyr                  0.4.2    2015-06-16 CRAN (R 3.2.0)                            
 evaluate               0.7.2    2015-08-13 CRAN (R 3.2.1)                            
 fastmatch              1.0-4    2012-01-21 CRAN (R 3.2.0)                            
 ff                   * 2.2-13   2014-04-09 CRAN (R 3.2.0)                            
 ffbase               * 0.12.1   2015-06-05 CRAN (R 3.2.0)                            
 foreach                1.4.2    2014-04-11 CRAN (R 3.2.0)                            
 formatR                1.2      2015-04-21 CRAN (R 3.2.0)                            
 futile.logger          1.4.1    2015-04-20 CRAN (R 3.2.0)                            
 futile.options         1.0.0    2010-04-06 CRAN (R 3.2.0)                            
 gdata                  2.17.0   2015-07-04 CRAN (R 3.2.0)                            
 GenomeInfoDb         * 1.5.13   2015-08-20 Bioconductor                              
 GenomicAlignments      1.5.13   2015-08-29 Bioconductor                              
 GenomicFeatures        1.21.18  2015-08-19 Bioconductor                              
 GenomicRanges        * 1.21.20  2015-08-26 Bioconductor                              
 GetoptLong             0.1.0    2015-03-09 CRAN (R 3.2.0)                            
 ggfortify            * 0.0.3    2015-08-16 Github (sinhrks/ggfortify@2555d3a)        
 ggplot2              * 1.0.1    2015-03-17 CRAN (R 3.2.0)                            
 GlobalOptions          0.0.8    2015-08-18 CRAN (R 3.2.2)                            
 gmodels                2.16.2   2015-07-22 CRAN (R 3.2.0)                            
 gridBase               0.4-7    2014-02-24 CRAN (R 3.2.0)                            
 gridExtra            * 2.0.0    2015-07-14 CRAN (R 3.2.0)                            
 gtable                 0.1.2    2012-12-05 CRAN (R 3.2.0)                            
 gtools                 3.5.0    2015-05-29 CRAN (R 3.2.0)                            
 highr                  0.5      2015-04-21 CRAN (R 3.2.0)                            
 htmltools              0.2.6    2014-09-08 CRAN (R 3.2.0)                            
 httpuv                 1.3.3    2015-08-04 CRAN (R 3.2.0)                            
 igraph               * 1.0.1    2015-06-26 CRAN (R 3.2.0)                            
 IRanges              * 2.3.18   2015-08-08 Bioconductor                              
 iterators              1.0.7    2014-04-11 CRAN (R 3.2.0)                            
 knitr                * 1.11     2015-08-14 CRAN (R 3.2.1)                            
 labeling               0.3      2014-08-23 CRAN (R 3.2.0)                            
 lambda.r               1.1.7    2015-03-20 CRAN (R 3.2.0)                            
 lattice              * 0.20-33  2015-07-14 CRAN (R 3.2.2)                            
 latticeExtra         * 0.6-26   2013-08-15 CRAN (R 3.2.0)                            
 lazyeval               0.1.10   2015-01-02 CRAN (R 3.2.0)                            
 limma                * 3.25.15  2015-08-06 Bioconductor                              
 lme4                   1.1-9    2015-08-20 CRAN (R 3.2.0)                            
 magrittr               1.5      2014-11-22 CRAN (R 3.2.0)                            
 marray               * 1.47.1   2015-08-19 Bioconductor                              
 MASS                   7.3-43   2015-07-16 CRAN (R 3.2.2)                            
 Matrix               * 1.2-2    2015-07-08 CRAN (R 3.2.2)                            
 MatrixModels           0.4-1    2015-08-22 CRAN (R 3.2.2)                            
 memoise                0.2.1    2014-04-22 CRAN (R 3.2.0)                            
 mgcv                   1.8-7    2015-07-23 CRAN (R 3.2.2)                            
 mime                   0.3      2015-03-29 CRAN (R 3.2.0)                            
 minqa                  1.2.4    2014-10-09 CRAN (R 3.2.0)                            
 mnormt                 1.5-3    2015-05-25 CRAN (R 3.2.0)                            
 munsell                0.4.2    2013-07-11 CRAN (R 3.2.0)                            
 nlme                   3.1-122  2015-08-19 CRAN (R 3.2.0)                            
 nloptr                 1.0.4    2014-08-04 CRAN (R 3.2.0)                            
 NMF                  * 0.20.6   2015-05-26 CRAN (R 3.2.0)                            
 nnet                   7.3-10   2015-06-29 CRAN (R 3.2.2)                            
 pander               * 0.5.2    2015-05-18 CRAN (R 3.2.0)                            
 papeR                * 0.6-1    2015-06-09 CRAN (R 3.2.0)                            
 pbkrtest               0.4-2    2014-11-13 CRAN (R 3.2.0)                            
 phenotypicForest     * 0.3      2015-08-08 Github (chrislad/phenotypicForest@ddebfe5)
 pkgmaker             * 0.25.9   2015-07-18 Github (renozao/pkgmaker@751511b)         
 plyr                 * 1.8.3    2015-06-12 CRAN (R 3.2.0)                            
 proto                * 0.3-10   2012-12-22 CRAN (R 3.2.0)                            
 psych                * 1.5.6    2015-07-08 CRAN (R 3.2.0)                            
 quantreg               5.18     2015-08-16 CRAN (R 3.2.0)                            
 R6                     2.1.1    2015-08-19 CRAN (R 3.2.2)                            
 RColorBrewer         * 1.1-2    2014-12-07 CRAN (R 3.2.0)                            
 Rcpp                   0.12.0   2015-07-25 CRAN (R 3.2.1)                            
 RCurl                  1.95-4.7 2015-06-30 CRAN (R 3.2.0)                            
 registry             * 0.3      2015-07-08 CRAN (R 3.2.0)                            
 reshape              * 0.8.5    2014-04-23 CRAN (R 3.2.0)                            
 reshape2               1.4.1    2014-12-06 CRAN (R 3.2.0)                            
 rjson                  0.2.15   2014-11-03 CRAN (R 3.2.0)                            
 rmarkdown            * 0.7.3    2015-08-23 Github (rstudio/rmarkdown@ee2f13c)        
 rngtools             * 1.2.4    2014-03-06 CRAN (R 3.2.0)                            
 Rsamtools              1.21.16  2015-08-28 Bioconductor                              
 RSQLite                1.0.0    2014-10-25 CRAN (R 3.2.0)                            
 rtracklayer          * 1.29.21  2015-08-27 Bioconductor                              
 S4Vectors            * 0.7.14   2015-08-28 Bioconductor                              
 scales               * 0.3.0    2015-08-25 CRAN (R 3.2.0)                            
 shape                  1.4.2    2014-11-05 CRAN (R 3.2.0)                            
 shiny                * 0.12.2   2015-08-05 CRAN (R 3.2.0)                            
 SparseM                1.7      2015-08-15 CRAN (R 3.2.0)                            
 stringi                0.5-5    2015-06-29 CRAN (R 3.2.0)                            
 stringr                1.0.0    2015-04-30 CRAN (R 3.2.0)                            
 SummarizedExperiment   0.3.3    2015-08-08 Bioconductor                              
 survival             * 2.38-3   2015-07-02 CRAN (R 3.2.2)                            
 tabplot              * 1.1      2014-02-24 CRAN (R 3.2.0)                            
 tidyr                  0.2.0    2014-12-05 CRAN (R 3.2.0)                            
 whisker                0.3-2    2013-04-28 CRAN (R 3.2.0)                            
 XML                    3.98-1.3 2015-06-30 CRAN (R 3.2.0)                            
 xtable               * 1.7-4    2014-09-12 CRAN (R 3.2.0)                            
 XVector              * 0.9.3    2015-08-22 Bioconductor                              
 yaml                   2.1.13   2014-06-12 CRAN (R 3.2.0)                            
 zlibbioc               1.15.0   2015-04-17 Bioconductor  

ADD REPLY
0
Entering edit mode

Try loading the parallel package beforehand (library(parallel)) and run hLICORN with the verbose parameter to TRUE :

 

library(parallel)

gexp=matrix(rnorm(2600,sd=3),ncol=100)

gexp=rbind(gexp,do.call(rbind,lapply(1:26,function(i){

tf = sample(1:26,4)

return((gexp[tf[1],]+gexp[tf[2],] -gexp[tf[3],]-gexp[tf[4],] +rnorm(100,sd=3))/2)})))

gexp=data.frame(gexp)

dimnames(gexp)=list(c(letters,LETTERS),paste("s",1:100,sep=""))

GRN=hLICORN(gexp,TFlist = letters,verbose=T)

 

ADD REPLY
0
Entering edit mode

Here's the output:

library(parallel)

gexp=matrix(rnorm(2600,sd=3),ncol=100)

gexp=rbind(gexp,do.call(rbind,lapply(1:26,function(i){
    
  tf = sample(1:26,4)
    
  return((gexp[tf[1],]+gexp[tf[2],] -gexp[tf[3],]-gexp[tf[4],] +rnorm(100,sd=3))/2)})))

gexp=data.frame(gexp)

dimnames(gexp)=list(c(letters,LETTERS),paste("s",1:100,sep=""))

GRN=hLICORN(gexp,TFlist = letters,verbose = T)

Pre-process.
Error in validObject(.Object) :
  invalid class “itemMatrix” object: item labels do not match number of columns

ADD REPLY
0
Entering edit mode

Well, something is going wrong with your version of arules or of Matrix.

I'm soory to make you try so many things but I'd really like to track down your error.

 

Would you mind trying this ?

 

gexp=matrix(rnorm(2600,sd=3),ncol=100)

gexp=rbind(gexp,do.call(rbind,lapply(1:26,function(i){

tf = sample(1:26,4)

return((gexp[tf[1],]+gexp[tf[2],] -gexp[tf[3],]-gexp[tf[4],] +rnorm(100,sd=3))/2)})))

gexp=data.frame(gexp)

dimnames(gexp)=list(c(letters,LETTERS),paste("s",1:100,sep=""))

discreteExpression=CoRegNet::discretizeExpressionData(gexp)

discreteExpression[1:10,1:10]

posSamples = 1:ncol(discreteExpression)

negSamples= (ncol(discreteExpression) +1):(ncol(discreteExpression) *2)

regBitData =cbind(discreteExpression==+1 , discreteExpression== -1)

regBitData[c(1:5,48:52),c(1:5,95:105,195:200)]

transRegBitData= as(t(regBitData),"transactions")

print(transRegBitData)

 

ADD REPLY
0
Entering edit mode

gexp=matrix(rnorm(2600,sd=3),ncol=100)

 gexp=rbind(gexp,do.call(rbind,lapply(1:26,function(i){

 tf = sample(1:26,4)

 return((gexp[tf[1],]+gexp[tf[2],] -gexp[tf[3],]-gexp[tf[4],] +rnorm(100,sd=3))/2)})))

gexp=data.frame(gexp)

dimnames(gexp)=list(c(letters,LETTERS),paste("s",1:100,sep=""))
discreteExpression=CoRegNet::discretizeExpressionData(gexp)

discreteExpression[1:10,1:10]
#  s1 s2 s3 s4 s5 s6 s7 s8 s9 s10
#a  0  0  0 -1 -1  0  0  0  0   0
#b  1  0  0 -1 -1  0  0  0  0   0
#c  0 -1  1  0 -1  0  0  1  0   0
#d  0 -1  0  0  0  0  0  0  1   0
#e  0  0  0  0  1  1  0  0  1   0
#f  0  1  0  0  0  0  0  0  0   1
#g  0  0  0  0  1  1  0  0  0   1
#h  0  0  0  0 -1  0  0  0  0   1
#i  0 -1  0  0  0  0  0  0  0   0
#j -1  0 -1  0  0  0  0  0 -1   0

posSamples = 1:ncol(discreteExpression)

negSamples= (ncol(discreteExpression) +1):(ncol(discreteExpression) *2)

regBitData =cbind(discreteExpression==+1 , discreteExpression== -1)

regBitData[c(1:5,48:52),c(1:5,95:105,195:200)]
#     s1    s2    s3    s4    s5   s95   s96   s97   s98   s99  s100    s1    s2    s3    s4    s5   s95   s96   s97   s98   s99  #s100
#a FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE  TRUE  #TRUE FALSE FALSE  TRUE FALSE FALSE FALSE
#b  TRUE FALSE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE  TRUE  #TRUE FALSE FALSE FALSE FALSE FALSE FALSE
#c FALSE FALSE  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE  #TRUE FALSE FALSE FALSE FALSE FALSE FALSE
#d FALSE FALSE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE #FALSE FALSE FALSE FALSE FALSE FALSE FALSE
#e FALSE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE #FALSE  TRUE  TRUE FALSE  TRUE FALSE FALSE
#V FALSE  TRUE FALSE FALSE FALSE  TRUE FALSE FALSE  TRUE FALSE  TRUE FALSE FALSE FALSE  TRUE #FALSE FALSE  TRUE FALSE FALSE FALSE FALSE
#W FALSE FALSE  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE #FALSE FALSE FALSE FALSE FALSE FALSE FALSE
#X FALSE FALSE FALSE  TRUE  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE #FALSE FALSE FALSE FALSE FALSE  TRUE FALSE
#Y FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE  TRUE FALSE  TRUE FALSE FALSE FALSE FALSE #FALSE FALSE FALSE FALSE FALSE  TRUE FALSE
#Z FALSE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE  TRUE  TRUE FALSE FALSE FALSE FALSE #FALSE FALSE FALSE FALSE FALSE FALSE FALSE

transRegBitData= as(t(regBitData),"transactions")
Error in validObject(.Object) :
  invalid class “itemMatrix” object: item labels do not match number of columns


print(transRegBitData)
Error in print(transRegBitData) : object 'transRegBitData' not found

sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.5 (Yosemite)

locale:
[1] fr_FR.UTF-8/fr_FR.UTF-8/fr_FR.UTF-8/C/fr_FR.UTF-8/fr_FR.UTF-8

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

other attached packages:
[1] MVpower_2.0         class_7.3-13        kernlab_0.9-22      pamr_1.55           survival_2.38-3     cluster_2.0.3       randomForest_4.6-10

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.0                ComplexHeatmap_1.3.3       RColorBrewer_1.1-2         futile.logger_1.4.1        GenomeInfoDb_1.5.13       
 [6] XVector_0.9.3              GenomicFeatures_1.21.18    bitops_1.0-6               futile.options_1.0.0       tools_3.2.2               
[11] zlibbioc_1.15.0            digest_0.6.8               dendextend_1.1.0           biomaRt_2.25.1             lattice_0.20-33           
[16] RSQLite_1.0.0              igraph_1.0.1               Matrix_1.2-2               shiny_0.12.2               DBI_0.3.1                 
[21] parallel_3.2.2             rtracklayer_1.29.21        arules_1.1-9               Biostrings_2.37.8          GlobalOptions_0.0.8       
[26] S4Vectors_0.7.14           IRanges_2.3.18             stats4_3.2.2               grid_3.2.2                 Biobase_2.29.1            
[31] R6_2.1.1                   GetoptLong_0.1.0           AnnotationDbi_1.31.17      XML_3.98-1.3               BiocParallel_1.3.51       
[36] lambda.r_1.1.7             magrittr_1.5               whisker_0.3-2              htmltools_0.2.6            Rsamtools_1.21.16         
[41] BiocGenerics_0.15.6        GenomicRanges_1.21.20      GenomicAlignments_1.5.13   splines_3.2.2              CoRegNet_1.5.0            
[46] SummarizedExperiment_0.3.3 xtable_1.7-4               mime_0.3                   shape_1.4.2                circlize_0.3.1            
[51] colorspace_1.2-6           httpuv_1.3.3               RCurl_1.95-4.7             rjson_0.2.15

ADD REPLY
0
Entering edit mode

OK. The problem clearly comes from the arules package.

I'll let you try something I directly got out of the package help :

library(arules)

a_matrix <- matrix(

c(1,1,1,0,0,

1,1,0,0,0,

1,1,0,1,0,

0,0,1,0,1,

1,1,0,1,1), ncol = 5)

## set dim names

dimnames(a_matrix) <-  list(

c("a","b","c","d","e"),

paste("Tr",c(1:5), sep = ""))

a_matrix

## coerce

trans2 <-  as(a_matrix, "transactions")

trans2

inspect(trans2)

ADD REPLY
0
Entering edit mode

ibrary(arules)

a_matrix <- matrix(

c(1,1,1,0,0,

1,1,0,0,0,

1,1,0,1,0,

0,0,1,0,1,

1,1,0,1,1), ncol = 5)

## set dim names

dimnames(a_matrix) <-  list(

c("a","b","c","d","e"),

paste("Tr",c(1:5), sep = ""))

a_matrix

## coerce

trans2 <-  as(a_matrix, "transactions")

Error in validObject(.Object) :
  invalid class “itemMatrix” object: item labels do not match number of columns

trans2

Error: object 'trans2' not found

inspect(trans2)

Error in inspect(trans2) :
  error in evaluating the argument 'x' in selecting a method for function 'inspect': Error: object 'trans2' not found

ADD REPLY
0
Entering edit mode

This is crazy, your version of arules doesn't work.

Now, aside from reinstalling it, I do not see what else you could do.

install.packages("arules")

and try again the last bit, (including the library(arules) )

 

ADD REPLY
0
Entering edit mode

Well actually, I have already reinstalled arules package even before to start this post in bioconductor forum... with the same results ;(

ADD REPLY
1
Entering edit mode

Did you do this in a new R session, with no other packages attached? Maybe arules is expecting to use symbols or methods from one package, but is getting them from another.

ADD REPLY
0
Entering edit mode

Yes, that's exactly what I was going to suggest until I realised my reputation is so bad around here that I couldn't do anything anymore and certainly not try to help you using my own package.

Anyway, the next possible fix is to try again (try all the tests I proposed here in reverse chronological order, starting with arules testing)  but using a fresh new R session.

ADD REPLY
0
Entering edit mode

Dear Martin and Remy,

Using a new "clean" R session it works!

ADD REPLY
0
Entering edit mode
Aaerp ▴ 40
@aaerp-6373
Last seen 7.2 years ago
France

Dear Efstathios,

 

Actually the code that I have used is given as example in the manual of the CoRegNet package (page 14). Indeed, I have already tried the CoRegNet vignette with the same result/error:

library(CoRegNet)
data(CIT_BLCA_EXP,HumanTF,CIT_BLCA_Subgroup)

grn = hLICORN(CIT_BLCA_EXP, TFlist=HumanTF)

Error in validObject(.Object) :
  invalid class “itemMatrix” object: item labels do not match number of columns

sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.5 (Yosemite)

locale:
[1] fr_FR.UTF-8/fr_FR.UTF-8/fr_FR.UTF-8/C/fr_FR.UTF-8/fr_FR.UTF-8

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

other attached packages:
 [1] gplots_2.17.0         CoRegNet_1.5.0        shiny_0.12.2          igraph_1.0.1         
 [5] arules_1.1-9          Matrix_1.2-2          BSgenome_1.37.4       rtracklayer_1.29.21  
 [9] Biostrings_2.37.8     XVector_0.9.3         GenomicRanges_1.21.20 GenomeInfoDb_1.5.13  
[13] IRanges_2.3.18        S4Vectors_0.7.14      CMA_1.27.0            CGHbase_1.29.0       
[17] marray_1.47.1         limma_3.25.15         Biobase_2.29.1        BiocGenerics_0.15.6  

loaded via a namespace (and not attached):
 [1] SummarizedExperiment_0.3.3 circlize_0.3.1             shape_1.4.2               
 [4] gtools_3.5.0               GetoptLong_0.1.0           lattice_0.20-33           
 [7] colorspace_1.2-6           htmltools_0.2.6            GenomicFeatures_1.21.18   
[10] XML_3.98-1.3               DBI_0.3.1                  BiocParallel_1.3.51       
[13] RColorBrewer_1.1-2         lambda.r_1.1.7             zlibbioc_1.15.0           
[16] futile.logger_1.4.1        GlobalOptions_0.0.8        caTools_1.17.1            
[19] ComplexHeatmap_1.3.3       biomaRt_2.25.1             httpuv_1.3.3              
[22] AnnotationDbi_1.31.17      Rcpp_0.12.0                KernSmooth_2.23-15        
[25] xtable_1.7-4               gdata_2.17.0               jsonlite_0.9.16           
[28] mime_0.3                   Rsamtools_1.21.16          rjson_0.2.15              
[31] digest_0.6.8               grid_3.2.2                 tools_3.2.2               
[34] bitops_1.0-6               magrittr_1.5               RCurl_1.95-4.7            
[37] RSQLite_1.0.0              futile.options_1.0.0       whisker_0.3-2             
[40] dendextend_1.1.0           rstudioapi_0.3.1           R6_2.1.1                  
[43] GenomicAlignments_1.5.12

ADD COMMENT
0
Entering edit mode
svlachavas ▴ 830
@svlachavas-7225
Last seen 13 months ago
Germany/Heidelberg/German Cancer Resear…

Dear Aaerp,

i also re-run the vignette, because i have used the package extensively before two of months :

rn = hLICORN(CIT_BLCA_EXP, TFlist=HumanTF)
> rn
[1] "63 Transcription Factors.  867 Target Genes.  8072 Regulatory interactions."
[1] "No added evidences."
Warning message:
In if (len > 1) paste(len, " elements, ", sep = "") else "" :
  the condition has length > 1 and only the first element will be used

So it runs without an error and the warning is probably irrelevant regarding the package-maybe did you install the package via install.packages ? and not by biocLite() ? Because with install.packages i believe includes sometimes unstable versions, and maybe there is the problem. Otherwise i cant see why it returns an error in your devise. Heres my sessionInfo()

sessionInfo()
R version 3.2.0 (2015-04-16)
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] parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] CoRegNet_1.4.0       arules_1.1-9         Matrix_1.2-2         shiny_0.12.2        
 [5] igraph_1.0.1         affy_1.46.1          Biobase_2.28.0       BiocGenerics_0.14.0 
 [9] caret_6.0-52         ggplot2_1.0.1        BiocInstaller_1.18.4 lattice_0.20-33     

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.0           nloptr_1.0.4          plyr_1.8.3            zlibbioc_1.14.0      
 [5] iterators_1.0.7       tools_3.2.0           digest_0.6.8          lme4_1.1-9           
 [9] preprocessCore_1.30.0 nlme_3.1-122          gtable_0.1.2          mgcv_1.8-7           
[13] foreach_1.4.2         brglm_0.5-9           SparseM_1.7           proto_0.3-10         
[17] BradleyTerry2_1.0-6   stringr_1.0.0         gtools_3.5.0          MatrixModels_0.4-1   
[21] stats4_3.2.0          grid_3.2.0            nnet_7.3-10           R6_2.1.1             
[25] minqa_1.2.4           reshape2_1.4.1        car_2.0-26            magrittr_1.5         
[29] htmltools_0.2.6       scales_0.3.0          codetools_0.2-14      MASS_7.3-43          
[33] splines_3.2.0         pbkrtest_0.4-2        xtable_1.7-4          mime_0.3             
[37] colorspace_1.2-6      httpuv_1.3.3          quantreg_5.18         stringi_0.5-5        
[41] munsell_0.4.2         affyio_1.36.0        

 

ADD COMMENT
0
Entering edit mode

I still have the problem/error. I have reinstalled the 1.4.0 version for Mac OS X Mavericks and I get the same error. BTW, our sessions are different you use R 3.2.0, me the 3.2.2.

Does anyone have any clue how to fix this error?

ADD REPLY
0
Entering edit mode

I dont think that the problem is the R version, i used CoRegNet even with 3.1.1-probably something other is happening-also i dont know if there is an issue with the Mac OS, but also i believe that is irrelevant

ADD REPLY

Login before adding your answer.

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