YosefLab/scone

ezbake error when fnr_maxiter = 0

allonw opened this issue · 0 comments

The following code generates the following error in simple_FNR_params. Slightly different configurations of the parameters (still with fnr_maxiter = 0 and no HK list given) give the error in the else clause of the same if statement ("User must provide at least 2 positive control genes.")

rm(list=ls())
set.seed(101)
mat <- matrix(rpois(1000, lambda = 5), ncol=10)
colnames(mat) <- paste("X", 1:ncol(mat), sep="")
qc = data.frame(NREADS = colSums(mat), RALIGN = 100 * colMeans(mat > 5),
                row.names = colnames(mat))

library(scone)
scone_easybake(expr = mat, qc = qc, fnr_maxiter = 0, negcon = NULL, eval_negcon = FALSE)

sessionInfo()



> scone_easybake(expr = mat, qc = qc, fnr_maxiter = 0, negcon = NULL, eval_negcon = FALSE)
Error in simple_FNR_params(expr = nexpr, pos_controls = pos_controls) : 
  If pos_controls is logical, it should have one element per gene.
> 
> sessionInfo()
R version 3.4.0 (2017-04-21)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.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.4/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  stats4    stats     graphics  grDevices utils     datasets  methods  
[9] base     

other attached packages:
 [1] scone_0.99.7               SummarizedExperiment_1.6.3 DelayedArray_0.2.7        
 [4] matrixStats_0.52.2         Biobase_2.36.2             GenomicRanges_1.28.3      
 [7] GenomeInfoDb_1.12.2        IRanges_2.10.2             S4Vectors_0.14.3          
[10] BiocGenerics_0.22.0       

loaded via a namespace (and not attached):
  [1] aroma.light_3.6.0        NMF_0.20.6               plyr_1.8.4              
  [4] igraph_1.0.1             lazyeval_0.2.0           shinydashboard_0.6.1    
  [7] splines_3.4.0            BiocParallel_1.10.1      ggplot2_2.2.1           
 [10] gridBase_0.4-7           scater_1.4.0             digest_0.6.12           
 [13] foreach_1.4.3            htmltools_0.3.6          viridis_0.4.0           
 [16] gdata_2.18.0             magrittr_1.5             memoise_1.1.0           
 [19] cluster_2.0.6            doParallel_1.0.10        mixtools_1.1.0          
 [22] limma_3.32.2             Biostrings_2.44.1        annotate_1.54.0         
 [25] bayesm_3.0-2             R.utils_2.5.0            rARPACK_0.11-0          
 [28] colorspace_1.3-2         dplyr_0.7.0              tximport_1.4.0          
 [31] RCurl_1.95-4.8           jsonlite_1.5             hexbin_1.27.1           
 [34] genefilter_1.58.1        survival_2.41-3          zoo_1.8-0               
 [37] iterators_1.0.8          glue_1.1.0               registry_0.3            
 [40] gtable_0.2.0             zlibbioc_1.22.0          XVector_0.16.0          
 [43] compositions_1.40-1      kernlab_0.9-25           prabclus_2.2-6          
 [46] DEoptimR_1.0-8           scales_0.4.1             DESeq_1.28.0            
 [49] mvtnorm_1.0-6            DBI_0.6-1                edgeR_3.18.1            
 [52] rngtools_1.2.4           miniUI_0.1.1             Rcpp_0.12.11            
 [55] viridisLite_0.2.0        xtable_1.8-2             mclust_5.3              
 [58] DT_0.2                   htmlwidgets_0.8          httr_1.2.1              
 [61] FNN_1.1                  gplots_3.0.1             RColorBrewer_1.1-2      
 [64] fpc_2.1-10               modeltools_0.2-21        XML_3.98-1.8            
 [67] R.methodsS3_1.7.1        flexmix_2.3-14           nnet_7.3-12             
 [70] locfit_1.5-9.1           dynamicTreeCut_1.63-1    rlang_0.1.1             
 [73] reshape2_1.4.2           AnnotationDbi_1.38.1     munsell_0.4.3           
 [76] tools_3.4.0              visNetwork_1.0.3         RSQLite_1.1-2           
 [79] stringr_1.2.0            robustbase_0.92-7        caTools_1.17.1          
 [82] purrr_0.2.2.2            EDASeq_2.10.0            mime_0.5                
 [85] scran_1.4.4              R.oo_1.21.0              biomaRt_2.32.1          
 [88] compiler_3.4.0           beeswarm_0.2.3           plotly_4.7.0            
 [91] tibble_1.3.3             statmod_1.4.29           geneplotter_1.54.0      
 [94] stringi_1.1.5            GenomicFeatures_1.28.3   RSpectra_0.12-0         
 [97] lattice_0.20-35          trimcluster_0.1-2        Matrix_1.2-10           
[100] tensorA_0.36             data.table_1.10.4        bitops_1.0-6            
[103] httpuv_1.3.3             rtracklayer_1.36.3       R6_2.2.1                
[106] latticeExtra_0.6-28      hwriter_1.3.2            ShortRead_1.34.0        
[109] KernSmooth_2.23-15       gridExtra_2.2.1          vipor_0.4.5             
[112] codetools_0.2-15         boot_1.3-19              energy_1.7-0            
[115] MASS_7.3-47              gtools_3.5.0             assertthat_0.2.0        
[118] rhdf5_2.20.0             rjson_0.2.15             pkgmaker_0.22           
[121] RUVSeq_1.10.0            GenomicAlignments_1.12.1 Rsamtools_1.28.0        
[124] GenomeInfoDbData_0.99.0  diptest_0.75-7           grid_3.4.0              
[127] tidyr_0.6.3              class_7.3-14             segmented_0.5-2.1       
[130] shiny_1.0.3              ggbeeswarm_0.5.3