csbl-usp / CEMiTool

Co-Expression Module Identification Tool (CEMiTool) official repository
22 stars 9 forks source link

Error dev.off() when performing cemitool #38

Closed CDaems closed 4 years ago

CDaems commented 4 years ago

Hi,

I'm new to using R for data analysis and just managed to perform DESeq2 on my RNA-sequencing data. I would like to use cemitool, but I keep on getting the same error:

Error in dev.off() : cannot shut down device 1 (the null device)

Previously everything worked fine, and performing cemitool on the data that is included in the package works (expr0) fine as well. The code that I've used is the following:

`> library(CEMiTool)

Expr <- read.csv("normalized counts_all wt vs ko.csv", header=T, row.names=1, sep=",")

head(Expr) GC058565 GC058566 GC058567 GC058568 GC058569 GC058570 GC058559 0610009B22Rik 426.868903 463.465790 438.783079 480.97240 484.206797 479.74765 502.46918 0610010F05Rik 1372.004429 1391.445935 1404.105854 1330.78866 1425.819276 1447.92055 1476.42677 0610010K14Rik 4.154442 7.339956 8.775662 18.68809 9.827075 22.31384 14.52223 0610012G03Rik 21.810820 35.651215 53.629043 69.83444 51.815487 71.90016 64.86596 0610030E20Rik 550.463548 533.719654 555.791901 521.29933 493.140502 534.29260 517.95956 0610040J01Rik 103.861047 89.128037 109.208233 106.22703 109.884568 79.33811 110.36895 GC058560 GC058561 GC058563 GC058564 0610009B22Rik 457.350993 475.009836 471.70454 529.78143 0610010F05Rik 1466.595819 1266.062074 1292.32910 1499.11171 0610010K14Rik 9.454284 6.623643 15.90015 12.50749 0610012G03Rik 38.998922 70.967605 53.00051 31.26872 0610030E20Rik 472.714204 551.654850 514.10495 538.71535 0610040J01Rik 94.542841 118.279342 95.40092 107.20703

ann <- read.csv("Coldata_Cemitool.csv", header=T, sep = ";") head(ann) SampleName Class 1 GC058565 wt 2 GC058566 wt 3 GC058567 wt 4 GC058568 wt 5 GC058569 wt 6 GC058570 wt

cem3 <- cemitool(Expr, apply_vst = T) Error in dev.off() : cannot shut down device 1 (the null device)`

Expr: contains 11 samples with 15679 variables. This data is normalized data that I've obtained using DESeq2 ann: is my annotation file, containing SampleName column stating the different samples + Class with the genotype of my animals.

I have already tried to update RStudio, restart it for a couple of times and tried to work in R instead of RStudio. But I keep on having the same issue. Underneath you can find the sessionInfo().

Could you please help me with this issue, as I have no clue what to do or what I'm doing wrong.

Many thanks in advance, Carmen

`> sessionInfo() R version 3.5.3 (2019-03-11) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 17134)

Matrix products: default

locale: [1] LC_COLLATE=Dutch_Belgium.1252 LC_CTYPE=Dutch_Belgium.1252 LC_MONETARY=Dutch_Belgium.1252 [4] LC_NUMERIC=C LC_TIME=Dutch_Belgium.1252

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

other attached packages: [1] CEMiTool_1.6.11

loaded via a namespace (and not attached): [1] backports_1.1.4 Hmisc_4.2-0 fastmatch_1.1-0
[4] plyr_1.8.4 igraph_1.2.4.1 lazyeval_0.2.2
[7] splines_3.5.3 BiocParallel_1.16.6 GenomeInfoDb_1.18.2
[10] ggplot2_3.2.0 urltools_1.7.3 robust_0.4-18.1
[13] digest_0.6.20 foreach_1.4.7 htmltools_0.3.6
[16] GOSemSim_2.8.0 viridis_0.5.1 GO.db_3.7.0
[19] ggpmisc_0.3.1 gdata_2.18.0 magrittr_1.5
[22] checkmate_1.9.4 memoise_1.1.0 fit.models_0.5-14
[25] cluster_2.0.7-1 doParallel_1.0.15 limma_3.38.3
[28] sna_2.4 fastcluster_1.1.25 annotate_1.60.1
[31] matrixStats_0.54.0 GeneOverlap_1.18.0 enrichplot_1.2.0
[34] prettyunits_1.0.2 colorspace_1.4-1 blob_1.2.0
[37] rrcov_1.4-7 ggrepel_0.8.1 xfun_0.8
[40] dplyr_0.8.3 crayon_1.3.4 RCurl_1.95-4.12
[43] jsonlite_1.6 graph_1.60.0 ffbase_0.12.7
[46] genefilter_1.64.0 zeallot_0.1.0 impute_1.56.0
[49] survival_2.43-3 iterators_1.0.12 glue_1.3.1
[52] polyclip_1.10-0 gtable_0.3.0 zlibbioc_1.28.0
[55] XVector_0.22.0 UpSetR_1.4.0 DelayedArray_0.8.0
[58] gRbase_1.8-3.4 BiocGenerics_0.28.0 DEoptimR_1.0-8
[61] scales_1.0.0 DOSE_3.8.2 mvtnorm_1.0-11
[64] DBI_1.0.0 ggthemes_4.2.0 Rcpp_1.0.2
[67] viridisLite_0.3.0 xtable_1.8-4 progress_1.2.2
[70] htmlTable_1.13.1 gridGraphics_0.4-1 foreign_0.8-71
[73] bit_1.1-14 europepmc_0.3 preprocessCore_1.44.0
[76] Formula_1.2-3 stats4_3.5.3 DT_0.8
[79] htmlwidgets_1.3 httr_1.4.1 fgsea_1.8.0
[82] gplots_3.0.1.1 RColorBrewer_1.1-2 acepack_1.4.1
[85] ff_2.2-14 pkgconfig_2.0.2 XML_3.98-1.20
[88] farver_1.1.0 nnet_7.3-12 locfit_1.5-9.1
[91] dynamicTreeCut_1.63-1 polynom_1.4-0 labeling_0.3
[94] ggplotify_0.0.4 tidyselect_0.2.5 rlang_0.4.0
[97] reshape2_1.4.3 AnnotationDbi_1.44.0 munsell_0.5.0
[100] tools_3.5.3 RSQLite_2.1.2 statnet.common_4.3.0
[103] ggridges_0.5.1 evaluate_0.14 stringr_1.4.0
[106] ggdendro_0.1-20 yaml_2.2.0 knitr_1.24
[109] bit64_0.9-7 robustbase_0.93-5 caTools_1.17.1.2
[112] purrr_0.3.2 ggraph_1.0.2 RBGL_1.58.2
[115] pracma_2.2.5 xml2_1.2.1 DO.db_2.9
[118] compiler_3.5.3 rstudioapi_0.10 tibble_2.1.3
[121] tweenr_1.0.1 geneplotter_1.60.0 pcaPP_1.9-73
[124] stringi_1.4.3 lattice_0.20-38 Matrix_1.2-15
[127] vctrs_0.2.0 pillar_1.4.2 BiocManager_1.30.4
[130] triebeard_0.3.0 data.table_1.12.2 cowplot_1.0.0
[133] bitops_1.0-6 GenomicRanges_1.34.0 qvalue_2.14.1
[136] R6_2.4.0 latticeExtra_0.6-28 network_1.15
[139] KernSmooth_2.23-15 gridExtra_2.3 IRanges_2.16.0
[142] codetools_0.2-16 MASS_7.3-51.1 gtools_3.8.1
[145] assertthat_0.2.1 SummarizedExperiment_1.12.0 DESeq2_1.22.2
[148] S4Vectors_0.20.1 GenomeInfoDbData_1.2.0 intergraph_2.0-2
[151] parallel_3.5.3 hms_0.5.0 clusterProfiler_3.10.1
[154] grid_3.5.3 rpart_4.1-13 coda_0.19-3
[157] tidyr_0.8.3 rmarkdown_1.14 rvcheck_0.1.3
[160] ggforce_0.2.2 Biobase_2.42.0 WGCNA_1.68
[163] base64enc_0.1-3 `

pedrostrusso commented 4 years ago

Hi, @CDaems thanks for using CEMiTool! I'm not sure what might be causing the error you're having, but you could try setting the plot_diagnostics argument to FALSE, or the plot argument to FALSE, or both, and you should be able to get away with it. On the other hand, we don't really recommend running CEMiTool with only 11 samples, an ideal amount would be around at the very least 18.