lgatto / pRoloc

A unifying bioinformatics framework for organelle proteomics
http://lgatto.github.io/pRoloc/
15 stars 14 forks source link

svmClassification enters debugging mode #114

Closed kbarylyuk closed 6 years ago

kbarylyuk commented 6 years ago

Hi @lgatto,

I have recently updated R and all the packages that I use, including pRoloc (used the development version from GitHub). Now, whenever I call the svmClassification function it enters into some kind of a debugging mode:

> svmres <- svmClassification(object = TL, params, class.weights = w, fcol = "markers")
Called from: .method@converter(ans, data, trainInd)
Browse[1]> 

In the Editor window in RStudio, the following read-only chunk of code pops up with the window header saying "Function: .method@converter (namespace:MLInterfaces)":

function (obj, data, trainInd) 
{
  browser()
  teData = data[-trainInd, ]
  trData = data[trainInd, ]
  tepr = predict(obj, teData, decision.values = TRUE, probability = TRUE)
  trpr = predict(obj, trData, decision.values = TRUE, probability = TRUE)
  new("classifierOutput", testPredictions = factor(tepr[seq_len(length(tepr))]), 
    trainPredictions = factor(trpr[seq_len(length(trpr))]), 
    testScores = attr(tepr, "probabilities"), trainScores = attr(trpr, 
      "probabilities"), RObject = obj)
}

As far as I understand, that browser() line suspends the code. Can it be removed somehow? Thank you.

Session info:

R version 3.5.0 (2018-04-23)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.5

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/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] stats4    parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] RColorBrewer_1.1-2   dbscan_1.1-2         shiny_1.1.0          pRolocGUI_1.14.0     ggplot2_2.2.1        pRoloc_1.21.5       
 [7] MLInterfaces_1.60.0  cluster_2.0.7-1      annotate_1.58.0      XML_3.98-1.11        AnnotationDbi_1.42.1 IRanges_2.14.10     
[13] S4Vectors_0.18.3     MSnbase_2.6.1        ProtGenerics_1.12.0  BiocParallel_1.14.1  mzR_2.14.0           Rcpp_0.12.17        
[19] Biobase_2.40.0       BiocGenerics_0.26.0 

loaded via a namespace (and not attached):
  [1] plyr_1.8.4            igraph_1.2.1          lazyeval_0.2.1        splines_3.5.0         ggvis_0.4.3           crosstalk_1.0.0      
  [7] digest_0.6.15         foreach_1.4.4         BiocInstaller_1.30.0  htmltools_0.3.6       viridis_0.5.1         gdata_2.18.0         
 [13] magrittr_1.5          memoise_1.1.0         doParallel_1.0.11     mixtools_1.1.0        sfsmisc_1.1-2         limma_3.36.1         
 [19] recipes_0.1.3         gower_0.1.2           rda_1.0.2-2           dimRed_0.1.0          lpSolve_5.6.13        prettyunits_1.0.2    
 [25] colorspace_1.3-2      blob_1.1.1            dplyr_0.7.5           jsonlite_1.5          crayon_1.3.4          RCurl_1.95-4.10      
 [31] hexbin_1.27.2         genefilter_1.62.0     bindr_0.1.1           impute_1.54.0         DRR_0.0.3             survival_2.42-3      
 [37] iterators_1.0.9       glue_1.2.0            gtable_0.2.0          ipred_0.9-6           zlibbioc_1.26.0       kernlab_0.9-26       
 [43] ddalpha_1.3.3         prabclus_2.2-6        DEoptimR_1.0-8        abind_1.4-5           scales_0.5.0          vsn_3.48.1           
 [49] mvtnorm_1.0-8         DBI_1.0.0             viridisLite_0.3.0     xtable_1.8-2          progress_1.2.0        magic_1.5-8          
 [55] foreign_0.8-70        bit_1.1-14            proxy_0.4-22          mclust_5.4            preprocessCore_1.42.0 DT_0.4               
 [61] lava_1.6.1            prodlim_2018.04.18    sampling_2.8          htmlwidgets_1.2       httr_1.3.1            threejs_0.3.1        
 [67] FNN_1.1               fpc_2.1-11            modeltools_0.2-21     pkgconfig_2.0.1       flexmix_2.3-14        nnet_7.3-12          
 [73] caret_6.0-80          labeling_0.3          tidyselect_0.2.4      rlang_0.2.1           reshape2_1.4.3        later_0.7.3          
 [79] munsell_0.5.0         mlbench_2.1-1         tools_3.5.0           LaplacesDemon_16.1.0  RSQLite_2.1.1         pls_2.6-0            
 [85] broom_0.4.4           geometry_0.3-6        stringr_1.3.1         yaml_2.1.19           mzID_1.18.0           ModelMetrics_1.1.0   
 [91] knitr_1.20            bit64_0.9-7           robustbase_0.93-0     randomForest_4.6-14   purrr_0.2.5           dendextend_1.8.0     
 [97] bindrcpp_0.2.2        nlme_3.1-137          whisker_0.3-2         mime_0.5              RcppRoll_0.3.0        biomaRt_2.36.1       
[103] compiler_3.5.0        rstudioapi_0.7        e1071_1.6-8           affyio_1.50.0         tibble_1.4.2          stringi_1.2.3        
[109] lattice_0.20-35       trimcluster_0.1-2     Matrix_1.2-14         psych_1.8.4           gbm_2.1.3             pillar_1.2.3         
[115] MALDIquant_1.17       bitops_1.0-6          httpuv_1.4.4.1        R6_2.2.2              pcaMethods_1.72.0     affy_1.58.0          
[121] hwriter_1.3.2         promises_1.0.1        gridExtra_2.3         codetools_0.2-15      MASS_7.3-50           gtools_3.5.0         
[127] assertthat_0.2.0      CVST_0.2-2            withr_2.1.2           mnormt_1.5-5          diptest_0.75-7        hms_0.4.2            
[133] grid_3.5.0            rpart_4.1-13          timeDate_3043.102     tidyr_0.8.1           coda_0.19-1           class_7.3-14         
[139] segmented_0.5-3.0     lubridate_1.7.4       base64enc_0.1-3 
lgatto commented 6 years ago

This call to browser shoudn't be there; it has somehow slipped there - I'll remove it but I will need to investigate where it comes from. For now, you can just type c to continue.

lgatto commented 6 years ago

In 24 hours or so, could you reinstall MLInterfaces (version 1.60.1) with

BiocInstaller::biocLite("MLInterfaces")