JEFworks-Lab / HoneyBADGER

HMM-integrated Bayesian approach for detecting CNV and LOH events from single-cell RNA-seq data
http://jef.works/HoneyBADGER/
GNU General Public License v3.0
95 stars 31 forks source link

Error in summarizeResults #32

Open rosaranli opened 4 years ago

rosaranli commented 4 years ago

Hi,

I followed the "Getting Started" tutorial on the website to identify CNVs from expression data. I have no problem runing the functions until I run summarizeResults. The error is Error in dimnames(x) <- dn : length of 'dimnames' [1] not equal to array extent

Could you please advise what could cause the error? Thank you so much.

sessionInfo() R version 3.6.0 (2019-04-26) Platform: x86_64-pc-linux-gnu (64-bit) Running under: CentOS release 6.8 (Final)

Matrix products: default BLAS: /data/nephron/ranli/tools/lib64/R/lib/libRblas.so LAPACK: /data/nephron/ranli/tools/lib64/R/lib/libRlapack.so

locale: [1] C

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

other attached packages: [1] rjags_4-8 coda_0.19-3 biomaRt_2.40.1 HoneyBADGER_0.1

loaded via a namespace (and not attached): [1] progress_1.2.2 tidyselect_0.2.5 purrr_0.3.2
[4] reshape2_1.4.3 lattice_0.20-38 colorspace_1.4-1
[7] vctrs_0.2.0 stats4_3.6.0 blob_1.2.0
[10] XML_3.98-1.20 rlang_0.4.0 pillar_1.4.2
[13] glue_1.3.1 DBI_1.0.0 BiocGenerics_0.30.0
[16] bit64_0.9-7 GenomeInfoDbData_1.2.1 plyr_1.8.4
[19] zlibbioc_1.30.0 stringr_1.4.0 munsell_0.5.0
[22] gtable_0.3.0 caTools_1.17.1.2 memoise_1.1.0
[25] Biobase_2.44.0 HiddenMarkov_1.8-11 IRanges_2.18.1
[28] GenomeInfoDb_1.20.0 parallel_3.6.0 curl_3.3
[31] AnnotationDbi_1.46.0 Rcpp_1.0.1 scales_1.0.0
[34] backports_1.1.4 S4Vectors_0.22.0 XVector_0.24.0
[37] bit_1.1-14 gridExtra_2.3 ggplot2_3.2.0
[40] hms_0.5.0 digest_0.6.20 stringi_1.4.3
[43] dplyr_0.8.3 GenomicRanges_1.36.0 grid_3.6.0
[46] tools_3.6.0 bitops_1.0-6 magrittr_1.5
[49] lazyeval_0.2.2 RCurl_1.95-4.12 tibble_2.1.3
[52] RSQLite_2.1.1 crayon_1.3.4 pkgconfig_2.0.2
[55] zeallot_0.1.0 prettyunits_1.0.2 assertthat_0.2.1
[58] httr_1.4.0 R6_2.4.0 compiler_3.6.0

JEFworks commented 4 years ago

Thanks for catching and reporting this bug. It has been addressed in commit https://github.com/JEFworks/HoneyBADGER/commit/b3648e766d2e885910b5c0758b18c62a63ca3471

rosaranli commented 4 years ago

Thank you so much for looking into the case and sorry for commenting on the closed issue. I reran the updated package and still found an error in summarizeResults. If I use the expression data provided by the package and follow the tutorial exactly, there is an error when I ran

hb$calcGexpCnvBoundaries(init=TRUE, verbose=FALSE) ERROR: Error: subscript contains invalid names NULL

It was not there before and it showed different identified CNV regions as shown on the website. The regions are

print(regions.genes) GRanges object with 5 ranges and 0 metadata columns: seqnames ranges strand

[1] chr11 167784-2397419 * [2] chr7 816615-158956747 * [3] chr9 137241287-138124624 * [4] chr10 274190-133373354 * [5] chr5 36876769-179634784 * ------- seqinfo: 58 sequences from an unspecified genome; no seqlengths Then later when I ran summarizeResults, the error is Error in `rownames<-`(`*tmp*`, value = "delchr10: 274190:133373354:133099165:*") : attempt to set 'rownames' on an object with no dimensions. When I use my own data to run the expression analysis, there are not errors in calcGexpCnvBoundaries. But same error happened as before when I ran summarizeResults, it's Error in dimnames(x) <- dn : length of 'dimnames' [1] not equal to array extent Could you please have a look again? Sorry for that. sessionInfo() R version 3.6.1 (2019-07-05) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS High Sierra 10.13.1 Matrix products: default BLAS: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib locale: [1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8 attached base packages: [1] stats4 parallel stats graphics grDevices utils datasets methods base other attached packages: [1] devtools_2.1.0 usethis_1.5.1 [3] rjags_4-9 coda_0.19-3 [5] biomaRt_2.40.3 TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2 [7] GenomicFeatures_1.36.4 AnnotationDbi_1.46.0 [9] Biobase_2.44.0 GenomicRanges_1.36.0 [11] GenomeInfoDb_1.20.0 IRanges_2.18.1 [13] S4Vectors_0.22.0 BiocGenerics_0.30.0 [15] HoneyBADGER_0.1 loaded via a namespace (and not attached): [1] httr_1.4.0 pkgload_1.0.2 bit64_0.9-7 assertthat_0.2.1 [5] blob_1.2.0 HiddenMarkov_1.8-11 GenomeInfoDbData_1.2.1 Rsamtools_2.0.0 [9] remotes_2.1.0 progress_1.2.2 sessioninfo_1.1.1 pillar_1.4.2 [13] RSQLite_2.1.2 backports_1.1.4 lattice_0.20-38 glue_1.3.1 [17] digest_0.6.20 RColorBrewer_1.1-2 XVector_0.24.0 colorspace_1.4-1 [21] Matrix_1.2-17 plyr_1.8.4 XML_3.98-1.20 pkgconfig_2.0.2 [25] zlibbioc_1.30.0 purrr_0.3.2 scales_1.0.0 processx_3.4.1 [29] BiocParallel_1.18.0 tibble_2.1.3 ggplot2_3.2.1 withr_2.1.2 [33] SummarizedExperiment_1.14.0 lazyeval_0.2.2 cli_1.1.0 magrittr_1.5 [37] crayon_1.3.4 memoise_1.1.0 ps_1.3.0 fs_1.3.1 [41] pkgbuild_1.0.3 tools_3.6.1 prettyunits_1.0.2 hms_0.5.0 [45] matrixStats_0.54.0 stringr_1.4.0 munsell_0.5.0 DelayedArray_0.10.0 [49] callr_3.3.1 Biostrings_2.52.0 compiler_3.6.1 caTools_1.17.1.2 [53] rlang_0.4.0 grid_3.6.1 RCurl_1.95-4.12 bitops_1.0-6 [57] testthat_2.2.1 gtable_0.3.0 DBI_1.0.0 curl_4.0 [61] reshape2_1.4.3 R6_2.4.0 GenomicAlignments_1.20.1 gridExtra_2.3 [65] dplyr_0.8.3 rtracklayer_1.44.2 bit_1.1-14 zeallot_0.1.0 [69] rprojroot_1.3-2 desc_1.2.0 stringi_1.4.3 Rcpp_1.0.2 [73] vctrs_0.2.0 tidyselect_0.2.5
JEFworks commented 4 years ago

No problem at all. Thanks for the report. Let me reopen this issue for now so I can remember to address it when I get the chance.