CRI-iAtlas / ImmuneSubtypeClassifier

An R package for classification of immune subtypes, in cancer, using gene expression data.
Other
40 stars 23 forks source link

Error with callEnsemble #15

Open biodan25 opened 2 years ago

biodan25 commented 2 years ago

With the demo data Xmat, the callEnsembl function works fine but with COAD data (subset of 20 samples) I get this error. It does not matter if symbols or entrez IDs are used. A histogram of the values for Xmat and the COAD data are almost identical (attached). I've dug thru the code and its failing in the dataProc function inside the callOneSubtype function. I'll continue down the chain of functions but I'm already 3 levels deep. I also tried installing the older xgboost as recommended but that didn't resolve the issue.

Error in rownames<-(*tmp*, value = gs) : attempt to set 'rownames' on an object with no dimensions

sampleHist

Below is my sessionInfo (with xgboost_1.5

sessionInfo() R version 4.1.1 (2021-08-10) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Big Sur 11.6.1

Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib

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

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

other attached packages: [1] RColorBrewer_1.1-2 ImmuneSubtypeClassifier_0.1.0 plotROC_2.2.1
[4] xgboost_1.5.0.2 gridExtra_2.3 forcats_0.5.1
[7] stringr_1.4.0 purrr_0.3.4 readr_2.1.1
[10] tidyr_1.1.4 tibble_3.1.6 tidyverse_1.3.1
[13] dplyr_1.0.7 ggplot2_3.3.5

loaded via a namespace (and not attached): [1] Rcpp_1.0.7 lubridate_1.8.0 lattice_0.20-45 assertthat_0.2.1 digest_0.6.29 utf8_1.2.2
[7] R6_2.5.1 cellranger_1.1.0 backports_1.4.0 reprex_2.0.1 evaluate_0.14 httr_1.4.2
[13] pillar_1.6.4 rlang_0.4.12 readxl_1.3.1 rstudioapi_0.13 data.table_1.14.2 jquerylib_0.1.4
[19] Matrix_1.3-4 rmarkdown_2.11 bit_4.0.4 munsell_0.5.0 broom_0.7.10 compiler_4.1.1
[25] modelr_0.1.8 xfun_0.28 pkgconfig_2.0.3 htmltools_0.5.2 tidyselect_1.1.1 fansi_0.5.0
[31] crayon_1.4.2 tzdb_0.2.0 dbplyr_2.1.1 withr_2.4.3 grid_4.1.1 jsonlite_1.7.2
[37] gtable_0.3.0 lifecycle_1.0.1 DBI_1.1.1 magrittr_2.0.1 scales_1.1.1 vroom_1.5.7
[43] cli_3.1.0 stringi_1.7.6 fs_1.5.2 bslib_0.3.1 xml2_1.3.3 ellipsis_0.3.2
[49] generics_0.1.1 vctrs_0.3.8 tools_4.1.1 bit64_4.0.5 glue_1.5.1 hms_1.1.1
[55] fastmap_1.1.0 yaml_2.2.1 colorspace_2.0-2 rvest_1.0.2 knitr_1.36 haven_2.4.3
[61] sass_0.4.0

biodan25 commented 2 years ago

Update: digging thru the dataProc function, this line has an un-defined breakBin function?

Xbinned <- apply(Xmat, 2, breakBin, breakVec)

breakVec is defined above this apply call by this line:

breakVec <- mods$breakVec

EDIT: I finally got your code to work, but I had to modify the functions from callEnsemble down -- by exporting the breakBin, createPairsFeatures and makeSetData functions using the triple colon notation. i.e.

Xbinned <- apply(Xmat, 2, ImmuneSubtypeClassifier:::breakBin, breakVec)
.... Xpairs <- ImmuneSubtypeClassifier:::createPairsFeatures(Xmat, pairedGenes) .... Xset <- ImmuneSubtypeClassifier:::makeSetData(Xmat)

This doesn't explain why your code worked with your demo data and not TCGA COAD or LUAD data tho.

Gibbsdavidl commented 2 years ago

Thanks for letting me know. Definitely time for an update!

Where did the COAD data come from? I'd like to reproduce this.

Thank you!!

biodan25 commented 2 years ago

The COAD data is from TCGA (downloaded from cBioPortal) On Tuesday, December 14, 2021, 04:29:56 PM PST, David L Gibbs @.***> wrote:

Thanks for letting me know. Definitely time for an update!

Where did the COAD data come from? I'd like to reproduce this.

Thank you!!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

biodan25 commented 2 years ago

The COAD data is from TCGA (downloaded from cBioPortal). I've used it for other analyses too.