Entering edit mode
                    Hi
I am trying to use DEP to identify differentially expressed proteins in treated and untreated samples. I have created a SummarizedExperiment out of my data, however, at the filtering step I am getting an error that I cannot understand. Even if I am setting a filtering threshold in the proposed range, the function returns an error ...
less_stringent_filter <- filter_missval(data_se, thr = 0)
Error in filter_missval(data_se, thr = 0) : 
  invalid filter threshold applied
Run filter_missval() with a threshold ranging from 0 to  3
I went into the source code to see how the thresholds are calculated and they are based on replicates. I run the source code separately and indeed the function should not return an error. I would appreciate any kind of tips on how to solve this.
> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.2 LTS
Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0
locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=nb_NO.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=nb_NO.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=nb_NO.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=nb_NO.UTF-8 LC_IDENTIFICATION=C       
attached base packages:
 [1] stats4    parallel  grid      stats     graphics  grDevices utils     datasets 
 [9] methods   base     
other attached packages:
 [1] SummarizedExperiment_1.20.0 GenomicRanges_1.42.0        GenomeInfoDb_1.26.2        
 [4] IRanges_2.24.1              S4Vectors_0.28.1            MatrixGenerics_1.2.1       
 [7] matrixStats_0.58.0          vsn_3.58.0                  Biobase_2.50.0             
[10] BiocGenerics_0.36.0         ggpubr_0.4.0                RColorBrewer_1.1-2         
[13] VennDiagram_1.6.20          futile.logger_1.4.3         proBatch_1.3.0             
[16] forcats_0.5.1               stringr_1.4.0               dplyr_1.0.4                
[19] purrr_0.3.4                 readr_1.4.0                 tidyr_1.1.3                
[22] tibble_3.1.0                ggplot2_3.3.3               tidyverse_1.3.0            
[25] DEP_1.12.0                 
loaded via a namespace (and not attached):
  [1] utf8_1.1.4             shinydashboard_0.7.1   gmm_1.6-6             
  [4] tidyselect_1.1.0       lme4_1.1-26            RSQLite_2.2.3         
  [7] AnnotationDbi_1.52.0   htmlwidgets_1.5.3      BiocParallel_1.24.1   
 [10] norm_1.0-9.5           munsell_0.5.0          codetools_0.2-16      
 [13] preprocessCore_1.52.1  statmod_1.4.35         DT_0.17               
 [16] withr_2.4.1            colorspace_2.0-0       ggfortify_0.4.11      
 [19] knitr_1.31             rstudioapi_0.13        ggsignif_0.6.1        
 [22] mzID_1.28.0            labeling_0.4.2         GenomeInfoDbData_1.2.4
 [25] farver_2.1.0           bit64_4.0.5            pheatmap_1.0.12       
 [28] rprojroot_2.0.2        vctrs_0.3.6            generics_0.1.0        
 [31] lambda.r_1.2.4         xfun_0.21              fastcluster_1.1.25    
 [34] R6_2.5.0               doParallel_1.0.16      clue_0.3-58           
 [37] locfit_1.5-9.4         bitops_1.0-6           cachem_1.0.4          
 [40] DelayedArray_0.16.2    assertthat_0.2.1       promises_1.2.0.1      
 [43] scales_1.1.1           nnet_7.3-14            gtable_0.3.0          
 [46] sva_3.38.0             Cairo_1.5-12.2         affy_1.68.0           
 [49] WGCNA_1.70-3           sandwich_3.0-0         rlang_0.4.10          
 [52] genefilter_1.72.1      mzR_2.24.1             GlobalOptions_0.1.2   
 [55] splines_4.0.3          rstatix_0.7.0          lazyeval_0.2.2        
 [58] impute_1.64.0          broom_0.7.5            checkmate_2.0.0       
 [61] abind_1.4-5            BiocManager_1.30.10    reshape2_1.4.4        
 [64] modelr_0.1.8           backports_1.2.1        httpuv_1.5.5          
 [67] Hmisc_4.5-0            tools_4.0.3            affyio_1.60.0         
 [70] ellipsis_0.3.1         dynamicTreeCut_1.63-1  MSnbase_2.16.1        
 [73] Rcpp_1.0.6             plyr_1.8.6             base64enc_0.1-3       
 [76] zlibbioc_1.36.0        RCurl_1.98-1.2         rpart_4.1-15          
 [79] viridis_0.5.1          GetoptLong_1.0.5       cowplot_1.1.1         
 [82] zoo_1.8-8              haven_2.3.1            cluster_2.1.0         
 [85] fs_1.5.0               tinytex_0.30           magrittr_2.0.1        
 [88] futile.options_1.0.1   data.table_1.14.0      openxlsx_4.2.3        
 [91] circlize_0.4.12        reprex_1.0.0           pcaMethods_1.82.0     
 [94] mvtnorm_1.1-1          ProtGenerics_1.22.0    pkgload_1.2.0         
 [97] hms_1.0.0              mime_0.10              xtable_1.8-4          
[100] XML_3.99-0.5           rio_0.5.26             jpeg_0.1-8.1          
[103] readxl_1.3.1           gridExtra_2.3          shape_1.4.5           
[106] testthat_3.0.2         compiler_4.0.3         ncdf4_1.17            
[109] crayon_1.4.1           minqa_1.2.4            htmltools_0.5.1.1     
[112] mgcv_1.8-33            later_1.1.0.1          Formula_1.2-4         
[115] lubridate_1.7.10       pvca_1.30.0            DBI_1.1.1             
[118] formatR_1.7            corrplot_0.84          dbplyr_2.1.0          
[121] ComplexHeatmap_2.7.1   MASS_7.3-53            tmvtnorm_1.4-10       
[124] boot_1.3-25            car_3.0-10             wesanderson_0.3.6     
[127] Matrix_1.2-18          cli_2.3.1              imputeLCMD_2.0        
[130] pkgconfig_2.0.3        foreign_0.8-79         MALDIquant_1.19.3     
[133] xml2_1.3.2             foreach_1.5.1          annotate_1.68.0       
[136] XVector_0.30.0         rvest_0.3.6            digest_0.6.27         
[139] cellranger_1.1.0       htmlTable_2.1.0        edgeR_3.32.1          
[142] curl_4.3               shiny_1.6.0            rjson_0.2.20          
[145] nloptr_1.2.2.2         lifecycle_1.0.0        nlme_3.1-149          
[148] jsonlite_1.7.2         carData_3.0-4          desc_1.2.0            
[151] viridisLite_0.3.0      limma_3.46.0           fansi_0.4.2           
[154] pillar_1.5.0           lattice_0.20-41        fastmap_1.1.0         
[157] httr_1.4.2             survival_3.2-7         GO.db_3.12.1          
[160] glue_1.4.2             zip_2.1.1              png_0.1-7             
[163] iterators_1.0.13       bit_4.0.4              stringi_1.5.3         
[166] blob_1.2.1             latticeExtra_0.6-29    memoise_2.0.0
                    
                
                
Hi, can we have a look at your data_se object ?
Hi, would that be enough? Not sure what I should show exactly.
Yes thanks. And what is the result of
max(colData(data_se)$replicate)? You said you ran the source code separately and did it work ?It returns 3. I did not work with the source code, but I run the code chunk that returned the error in order to confirm that the range of threshold was the correct one.