bhklab / genefu

R package providing various functions relevant for gene expression analysis with emphasis on breast cancer.
25 stars 13 forks source link

AIMS classification fails under windows while works perfectly under linux #14

Closed martinguerrero89 closed 2 years ago

martinguerrero89 commented 5 years ago

Hi, sorry for bothering but Its been a while since I've been using the Genefu package under linux, and now, I'm testing the exact same code under windows and getting the following problem:

ALL= loadBreastEsets(loadString =c( "UPP","TRANSBIG"), removeDuplicates = TRUE,
                     quantileCutoff = 0, rescale = FALSE, minNumberGenes = 0,
                     minNumberEvents = 0, minSampleSize = 0, removeRetracted = TRUE,
                     removeSubsets = TRUE, keepCommonOnly = FALSE, imputeMissing = FALSE)

esets=ALL$esets

i="UPP"
Dup=unique(fData(esets[[i]])[which(duplicated(fData(esets[[i]])$EntrezGene.ID)),"EntrezGene.ID"])
  Var= apply(exprs(esets[[i]]),1,var)
  drop=NULL
  for(j in Dup){
   pos=which(fData(esets[[i]])$EntrezGene.ID==j)
    drop= c(drop,pos[-which.max(Var[pos])])

  }
  esets[[i]]=esets[[i]][-drop,]

featureNames(esets[[i]]) <- fData(esets[[i]])$EntrezGene.ID

annot= fData(esets[[i]])
colnames(annot)[2]="Gene.Symbol"
annot$probe=annot$EntrezGene.ID

#Perform molecular subtyping
AIMS<-  molecular.subtyping(sbt.model = "AIMS",data = t(exprs(esets[[i]])), annot = annot,do.mapping = TRUE)
pData(esets[[i]])$AIMS=AIMS$subtype

#WINDOWS OUTPUT:
#You are missing the pair or have more than one 11004<25759 in 
#Current k = 20
#Error in if (object$isnumeric[i] != is.numeric(newdata[[i]])) warning(paste0("Type mismatch #between training and new data for variable '",  :  argument is of length zero

#LINUX OUTPUT (No error):
#You are missing the pair or have more than one 11004<25759 in 
#Current k = 20

WINDOWS sessionInfo()

sessionInfo() R version 3.5.2 (2018-12-20) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

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

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

other attached packages: [1] genefu_2.14.0 AIMS_1.14.1 BiocVersion_3.8.0 e1071_1.7-1
[5] iC10_1.5 iC10TrainingData_1.3.1 pamr_1.56.1 cluster_2.0.9
[9] biomaRt_2.38.0 limma_3.38.3 mclust_5.4.3 survcomp_1.32.0
[13] prodlim_2018.04.18 survival_2.44-1.1 MetaGxBreast_1.2.0 ExperimentHub_1.8.0
[17] AnnotationHub_2.14.5 impute_1.56.0 lattice_0.20-38 Biobase_2.42.0
[21] BiocGenerics_0.28.0

loaded via a namespace (and not attached): [1] Rcpp_1.0.1 prettyunits_1.0.2 class_7.3-15
[4] assertthat_0.2.1 digest_0.6.18 mime_0.6
[7] R6_2.4.0 stats4_3.5.2 RSQLite_2.1.1
[10] BiocInstaller_1.32.1 httr_1.4.0 rlang_0.3.4
[13] progress_1.2.2 curl_3.3 rstudioapi_0.10
[16] blob_1.1.1 S4Vectors_0.20.1 Matrix_1.2-17
[19] splines_3.5.2 stringr_1.4.0 RCurl_1.95-4.12
[22] bit_1.1-14 shiny_1.3.2 compiler_3.5.2
[25] httpuv_1.5.1 pkgconfig_2.0.2 htmltools_0.3.6
[28] interactiveDisplayBase_1.20.0 IRanges_2.16.0 XML_3.98-1.19
[31] crayon_1.3.4 later_0.8.0 bitops_1.0-6
[34] SuppDists_1.1-9.4 grid_3.5.2 xtable_1.8-4
[37] DBI_1.0.0 magrittr_1.5 amap_0.8-16
[40] KernSmooth_2.23-15 stringi_1.4.3 promises_1.0.1
[43] rmeta_3.0 lava_1.6.5 tools_3.5.2
[46] bit64_0.9-7 hms_0.4.2 yaml_2.2.0
[49] AnnotationDbi_1.44.0 BiocManager_1.30.4 survivalROC_1.0.3
[52] bootstrap_2017.2 memoise_1.1.0

LINUX sessionInfo()

sessionInfo() R version 3.5.1 (2018-07-02) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 16.04.5 LTS

Matrix products: default BLAS: /usr/lib/libblas/libblas.so.3.6.0 LAPACK: /usr/lib/lapack/liblapack.so.3.6.0

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

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

other attached packages: [1] reshape2_1.4.3 dplyr_0.7.8 gageData_2.20.0
[4] gage_2.32.1 RColorBrewer_1.1-2 bindrcpp_0.2.2
[7] consensusOV_1.4.1 MetaGxOvarian_1.2.0 hgu133plus2.db_3.2.3
[10] edgeR_3.24.3 TCGAbiolinks_2.10.3 xlsx_0.6.1
[13] a4Base_1.30.0 a4Core_1.30.0 a4Preproc_1.30.0
[16] glmnet_2.0-16 Matrix_1.2-15 multtest_2.38.0
[19] genefilter_1.64.0 mpm_1.0-22 KernSmooth_2.23-15
[22] annaffy_1.54.0 KEGG.db_3.2.3 GO.db_3.7.0
[25] GEOquery_2.50.5 MetaGxBreast_1.2.0 ExperimentHub_1.8.0
[28] AnnotationHub_2.14.2 impute_1.56.0 nsga2R_1.0
[31] mco_1.0-15.1 annotate_1.60.0 XML_3.98-1.16
[34] org.Hs.eg.db_3.7.0 AnnotationDbi_1.44.0 WGCNA_1.66
[37] fastcluster_1.1.25 dynamicTreeCut_1.63-1 biclust_2.0.1
[40] colorspace_1.3-2 MASS_7.3-51.1 shiny_1.2.0
[43] subspace_1.0.4 survminer_0.4.3 ggpubr_0.2
[46] magrittr_1.5 genefu_2.14.0 AIMS_1.14.0
[49] e1071_1.7-0 iC10_1.4.2 iC10TrainingData_1.3.1
[52] pamr_1.55 biomaRt_2.38.0 limma_3.38.3
[55] mclust_5.4.2 illuminaio_0.24.0 caret_6.0-81
[58] ggplot2_3.1.0 lattice_0.20-38 matchingR_1.3.0
[61] Rcpp_1.0.0 gpuR_2.0.0 cluster_2.0.7-1
[64] cba_0.2-19 proxy_0.4-22 doParallel_1.0.14
[67] iterators_1.0.10 foreach_1.4.4 gplots_3.0.1
[70] survcomp_1.32.0 prodlim_2018.04.18 survival_2.43-1
[73] SummarizedExperiment_1.12.0 DelayedArray_0.8.0 BiocParallel_1.16.2
[76] matrixStats_0.54.0 Biobase_2.42.0 GenomicRanges_1.34.0
[79] GenomeInfoDb_1.18.1 IRanges_2.16.0 S4Vectors_0.20.1
[82] BiocGenerics_0.28.0 igraph_1.2.4

loaded via a namespace (and not attached): [1] Hmisc_4.1-1 class_7.3-14
[3] assertive.properties_0.0-4 Rsamtools_1.34.1
[5] crayon_1.3.4 nlme_3.1-137
[7] backports_1.1.3 sva_3.30.0
[9] rlang_0.3.0.1 XVector_0.22.0
[11] rjson_0.2.20 cmprsk_2.2-7
[13] bit64_0.9-7 glue_1.3.0
[15] tidyselect_0.2.5 km.ci_0.5-2
[17] tidyr_0.8.2 assertive.types_0.0-3
[19] zoo_1.8-4 SuppDists_1.1-9.4
[21] GenomicAlignments_1.18.1 xtable_1.8-3
[23] zlibbioc_1.28.0 hwriter_1.3.2
[25] rstudioapi_0.8 rpart_4.1-13
[27] GSVA_1.30.0 xfun_0.4
[29] caTools_1.17.1.1 KEGGREST_1.22.0
[31] tibble_1.4.2 interactiveDisplayBase_1.20.0 [33] flexclust_1.4-0 ggrepel_0.8.0
[35] base64_2.0 assertive.sets_0.0-3
[37] xlsxjars_0.6.1 Biostrings_2.50.1
[39] png_0.1-7 ipred_0.9-8
[41] withr_2.1.2 bitops_1.0-6
[43] plyr_1.8.4 assertive.base_0.0-7
[45] GSEABase_1.44.0 pcaPP_1.9-73
[47] assertive.models_0.0-2 ggvis_0.4.4
[49] pillar_1.3.1 GlobalOptions_0.1.0
[51] GenomicFeatures_1.34.3 assertive.matrices_0.0-2
[53] GetoptLong_0.1.7 assertive.reflection_0.0-4
[55] generics_0.0.2 lava_1.6.4
[57] tools_3.5.1 foreign_0.8-71
[59] munsell_0.5.0 fit.models_0.5-14
[61] compiler_3.5.1 httpuv_1.4.5.1
[63] rtracklayer_1.42.1 assertive.data.uk_0.0-2
[65] rJava_0.9-10 GenomeInfoDbData_1.2.0
[67] gridExtra_2.3 assertive.data.us_0.0-2
[69] later_0.7.5 recipes_0.1.4
[71] jsonlite_1.6 scales_1.0.0
[73] graph_1.60.0 lazyeval_0.2.1
[75] promises_1.0.1 latticeExtra_0.6-28
[77] R.utils_2.7.0 checkmate_1.8.5
[79] downloader_0.4 selectr_0.4-1
[81] yaml_2.2.0 survivalROC_1.0.3
[83] htmltools_0.3.6 memoise_1.1.0
[85] modeltools_0.2-22 locfit_1.5-9.1
[87] digest_0.6.18 rrcov_1.4-7
[89] assertthat_0.2.0 mime_0.6
[91] KMsurv_0.1-5 DESeq_1.34.1
[93] assertive.code_0.0-3 RSQLite_2.1.1
[95] amap_0.8-16 assertive.strings_0.0-3
[97] data.table_1.11.8 blob_1.1.1
[99] R.oo_1.22.0 survMisc_0.5.5
[101] preprocessCore_1.44.0 shinythemes_1.1.2
[103] splines_3.5.1 Formula_1.2-3
[105] RCurl_1.95-4.11 broom_0.5.1
[107] assertive.numbers_0.0-2 hms_0.4.2
[109] ConsensusClusterPlus_1.46.0 base64enc_0.1-3
[111] BiocManager_1.30.4 shape_1.4.4
[113] EDASeq_2.16.3 assertive.files_0.0-2
[115] nnet_7.3-12 matlab_1.0.2
[117] mvtnorm_1.0-8 circlize_0.4.5
[119] ModelMetrics_1.2.2 R6_2.3.0
[121] acepack_1.4.1 ShortRead_1.40.0
[123] curl_3.2 gdata_2.18.0
[125] robustbase_0.93-4 assertive.data_0.0-3
[127] stringr_1.3.1 gower_0.1.2
[129] htmlwidgets_1.3 purrr_0.2.5
[131] rvest_0.3.2 ComplexHeatmap_1.20.0
[133] mgcv_1.8-25 openssl_1.1
[135] htmlTable_1.12 robust_0.4-18
[137] codetools_0.2-15 lubridate_1.7.4
[139] randomForest_4.6-14 gtools_3.8.1
[141] prettyunits_1.0.2 R.methodsS3_1.7.1
[143] gtable_0.2.0 DBI_1.0.0
[145] aroma.light_3.12.0 httr_1.4.0
[147] stringi_1.2.4 progress_1.2.0
[149] ggthemes_4.1.0 timeDate_3043.102
[151] xml2_1.2.0 assertive_0.3-5
[153] assertive.datetimes_0.0-2 rmeta_3.0
[155] additivityTests_1.1-4 readr_1.3.1
[157] geneplotter_1.60.0 DEoptimR_1.0-8
[159] bit_1.1-14 pkgconfig_2.0.2
[161] bootstrap_2017.2 bindr_0.1.1
[163] knitr_1.21

ChristopherEeles commented 2 years ago

Hi @martinguerrero89,

If this issue persists please open a new issue using the most recent release of genefu.

Best, Christopher Eeles Software Developer BHK Lab | PM-Research | UHN