saezlab / dorothea

R package to access DoRothEA's regulons
https://saezlab.github.io/dorothea/
GNU General Public License v3.0
132 stars 26 forks source link

Error in if (names(regulon[[1]])[1] == "tfmode") regulon <- list(regulon = regulon) : argument is of length zero #13

Closed rrydbirk closed 4 years ago

rrydbirk commented 4 years ago

I get this error. It seems to be looking for something that's not there.

dorothea_regulon_human <- get(data("dorothea_hs", package = "dorothea"))

str(dorothea_regulon_human) tibble [486,751 × 4] (S3: tbl_df/tbl/data.frame) $ tf : chr [1:486751] "ADNP" "ADNP" "ADNP" "ADNP" ... $ confidence: chr [1:486751] "D" "D" "D" "D" ... $ target : chr [1:486751] "ATF7IP" "DYRK1A" "TLK1" "ZMYM4" ... $ mor : num [1:486751] 1 1 1 1 1 1 1 1 1 1 ...

viper.scores <- viper(dat, dorothea_regulon_human) Computing the association scores Error in if (names(regulon[[1]])[1] == "tfmode") regulon <- list(regulon = regulon) : argument is of length zero

names(regulon[[1]])[1] NULL

sessionInfo() R version 4.0.2 (2020-06-22) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 18.04.4 LTS

Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1 LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1

locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8
[6] LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

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

other attached packages: [1] viper_1.22.0 Biobase_2.48.0 BiocGenerics_0.34.0 dorothea_1.0.0 magrittr_1.5

loaded via a namespace (and not attached): [1] fastmatch_1.1-0 rnndescent_0.0.7 plyr_1.8.6 igraph_1.2.5 splines_4.0.2
[6] BiocParallel_1.22.0 GenomeInfoDb_1.24.2 ggplot2_3.3.2 scater_1.16.2 urltools_1.7.3
[11] digest_0.6.25 htmltools_0.5.0 GOSemSim_2.14.0 viridis_0.5.1 GO.db_3.11.4
[16] fansi_0.4.1 memoise_1.1.0 mixtools_1.2.0 limma_3.44.3 annotate_1.66.0
[21] graphlayouts_0.7.0 matrixStats_0.56.0 sccore_0.1 enrichplot_1.8.1 prettyunits_1.1.1
[26] colorspace_1.4-1 blob_1.2.1 ggrepel_0.8.2 pagoda2_0.1.1 xfun_0.15
[31] dplyr_1.0.0 crayon_1.3.4 RCurl_1.98-1.2 jsonlite_1.7.0 scatterpie_0.1.4
[36] genefilter_1.70.0 brew_1.0-6 survival_3.2-3 glue_1.4.1 polyclip_1.10-0
[41] gtable_0.3.0 zlibbioc_1.34.0 XVector_0.28.0 DelayedArray_0.14.0 kernlab_0.9-29
[46] BiocSingular_1.4.0 Rook_1.1-1 SingleCellExperiment_1.10.1 scales_1.1.1 DOSE_3.14.0
[51] DBI_1.1.0 edgeR_3.30.3 Rcpp_1.0.5 viridisLite_0.3.0 xtable_1.8-4
[56] progress_1.2.2 gridGraphics_0.5-0 reticulate_1.16-9000 dqrng_0.2.1 bit_1.1-15.2
[61] europepmc_0.4 rsvd_1.0.3 stats4_4.0.2 httr_1.4.1 fgsea_1.14.0
[66] RColorBrewer_1.1-2 ellipsis_0.3.1 pkgconfig_2.0.3 XML_3.99-0.4 farver_2.0.3
[71] locfit_1.5-9.4 labeling_0.3 ggplotify_0.0.5 tidyselect_1.1.0 rlang_0.4.7
[76] reshape2_1.4.4 later_1.1.0.1 AnnotationDbi_1.50.1 munsell_0.5.0 tools_4.0.2
[81] cli_2.0.2 downloader_0.4 generics_0.0.2 RSQLite_2.2.0 ggridges_0.5.2
[86] stringr_1.4.0 fastmap_1.0.1 yaml_2.2.1 knitr_1.29 bit64_0.9-7
[91] tidygraph_1.2.0 bcellViper_1.24.0 purrr_0.3.4 dendextend_1.13.4 ggraph_2.0.3
[96] pbapply_1.4-2 mime_0.9 scran_1.16.0 DO.db_2.9 xml2_1.3.2
[101] compiler_4.0.2 rstudioapi_0.11 beeswarm_0.2.3 e1071_1.7-3 tibble_3.0.3
[106] statmod_1.4.34 tweenr_1.0.1 geneplotter_1.66.0 stringi_1.4.6 lattice_0.20-41
[111] Matrix_1.2-18 vctrs_0.3.1 pillar_1.4.6 lifecycle_0.2.0 BiocManager_1.30.10
[116] triebeard_0.3.0 BiocNeighbors_1.6.0 data.table_1.12.8 cowplot_1.0.0 bitops_1.0-6
[121] irlba_2.3.3 httpuv_1.5.4 conos_1.3.0 GenomicRanges_1.40.0 qvalue_2.20.0
[126] R6_2.4.1 promises_1.1.1 KernSmooth_2.23-17 gridExtra_2.3 vipor_0.4.5
[131] IRanges_2.22.2 assertthat_0.2.1 MASS_7.3-51.6 SummarizedExperiment_1.18.2 rjson_0.2.20
[136] DESeq2_1.28.1 cacoa_0.1 S4Vectors_0.26.1 GenomeInfoDbData_1.2.3 hms_0.5.3
[141] clusterProfiler_3.16.0 grid_4.0.2 class_7.3-17 tidyr_1.1.0 DelayedMatrixStats_1.10.1
[146] rvcheck_0.1.8 segmented_1.2-0 ggforce_0.3.2 base64enc_0.1-3 shiny_1.5.0
[151] tinytex_0.24 ggbeeswarm_0.6.0

christianholland commented 4 years ago

Hi @rrydbirk,

thanks for your interest in working with our dorothea regulons.

You cannot simply plugin the dorothea regulons in the original viper function. Instead you have basically two options:

Cheers, Christian

rrydbirk commented 4 years ago

Hi @christianholland

Thanks for getting back to me. The problem was I was using a sparse matrix (dgCMatrix) as input which wasn't recognized as a matrix. Ran W/O problems with as.matrix(dat).

/Rasmus