statOmics / msqrob2

Implementation of the MSqRob analysis of differentially expressed proteins using the Features infrastructure
9 stars 10 forks source link

Issues with vignette example #32

Closed patruong closed 2 years ago

patruong commented 2 years ago

I'm can not get the msqrob2 example "cptac spike-in study" to run properly. The normalize code snippet:

pe <- normalize(pe, i = "peptideLog", method = "quantiles", name = "peptideNorm")

Gives me the following error:

Error in .checkLinksInHits(al@hits, object[[al@name]], direction = "to") : @hits contains links that point to missing features

Can you help me with this error?

lgatto commented 2 years ago

The error indicates an issue with the links between assays.

  1. How have you created your pe QFeatures object?
  2. What is your sessionInfo(). Are you using the latest versions of the packages?
patruong commented 2 years ago

I am following the vignette example from https://statomics.github.io/msqrob2Examples/cptac.html.

I created the pe QFeatures object with:

peptidesFile <- msdata::quant(pattern = "cptac_a_b_peptides", full.names = TRUE) ecols <- MSnbase::grepEcols(peptidesFile, "Intensity ", split = "\t")

pe <- readQFeatures( table = peptidesFile, fnames = 1, ecol = ecols, name = "peptideRaw", sep = "\t" )

My packages should be latest version as I run update.packages() before running the example.

My sessionInfo() is:

` R version 4.1.2 (2021-11-01) Platform: x86_64-conda-linux-gnu (64-bit) Running under: Ubuntu 20.04.3 LTS

Matrix products: default BLAS: /home/ptruong/anaconda3/envs/ppa11/lib/libblas.so.3.9.0 LAPACK: /home/ptruong/anaconda3/envs/ppa11/lib/liblapack.so.3.9.0

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

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

other attached packages: [1] gridExtra_2.3 plotly_4.10.0 msqrob2_1.2.0 limma_3.50.0
[5] forcats_0.5.1 stringr_1.4.0 dplyr_1.0.7 purrr_0.3.4
[9] readr_2.1.1 tidyr_1.1.4 tibble_3.1.6 ggplot2_3.3.5
[13] tidyverse_1.3.1 QFeatures_1.4.0 MultiAssayExperiment_1.20.0 SummarizedExperiment_1.24.0 [17] Biobase_2.54.0 GenomicRanges_1.46.0 GenomeInfoDb_1.30.0 IRanges_2.28.0
[21] S4Vectors_0.32.0 BiocGenerics_0.40.0 MatrixGenerics_1.6.0 matrixStats_0.61.0

loaded via a namespace (and not attached): [1] minqa_1.2.4 colorspace_2.0-2 ellipsis_0.3.2 XVector_0.34.0 fs_1.5.2
[6] clue_0.3-60 rstudioapi_0.13 farver_2.1.0 mzR_2.28.0 affyio_1.64.0
[11] fansi_1.0.2 lubridate_1.8.0 xml2_1.3.3 codetools_0.2-18 splines_4.1.2
[16] doParallel_1.0.16 ncdf4_1.19 impute_1.68.0 jsonlite_1.7.3 nloptr_1.2.2.3
[21] broom_0.7.11 cluster_2.1.2 vsn_3.62.0 dbplyr_2.1.1 BiocManager_1.30.16
[26] compiler_4.1.2 httr_1.4.2 backports_1.4.1 assertthat_0.2.1 Matrix_1.4-0
[31] fastmap_1.1.0 lazyeval_0.2.2 cli_3.1.0 htmltools_0.5.2 tools_4.1.2
[36] igraph_1.2.11 gtable_0.3.0 glue_1.6.0 GenomeInfoDbData_1.2.7 affy_1.72.0
[41] Rcpp_1.0.8 MALDIquant_1.21 cellranger_1.1.0 vctrs_0.3.8 preprocessCore_1.56.0
[46] nlme_3.1-155 iterators_1.0.13 lme4_1.1-27.1 rvest_1.0.2 lifecycle_1.0.1
[51] XML_3.99-0.8 zlibbioc_1.40.0 MASS_7.3-55 scales_1.1.1 MSnbase_2.20.0
[56] pcaMethods_1.86.0 hms_1.1.1 ProtGenerics_1.26.0 parallel_4.1.2 AnnotationFilter_1.18.0 [61] stringi_1.7.6 foreach_1.5.1 boot_1.3-28 BiocParallel_1.28.0 rlang_0.4.12
[66] pkgconfig_2.0.3 bitops_1.0-7 mzID_1.32.0 lattice_0.20-45 labeling_0.4.2
[71] htmlwidgets_1.5.4 tidyselect_1.1.1 plyr_1.8.6 magrittr_2.0.1 R6_2.5.1
[76] generics_0.1.1 DelayedArray_0.20.0 DBI_1.1.2 pillar_1.6.4 haven_2.4.3
[81] withr_2.4.3 MsCoreUtils_1.6.0 RCurl_1.98-1.5 msdata_0.34.0 modelr_0.1.8
[86] crayon_1.4.2 utf8_1.2.2 tzdb_0.2.0 grid_4.1.2 readxl_1.3.1
[91] data.table_1.14.2 reprex_2.0.1 digest_0.6.29 munsell_0.5.0 viridisLite_0.4.0
`

Thanks for the quick response, is there anything I'm missing for this to work?

milanmlft commented 2 years ago

This is likely due to an outdated version of the vignette. Please refer to the up-to-date version on the Bioconductor website: https://bioconductor.org/packages/release/bioc/vignettes/msqrob2/inst/doc/cptac.html

I will update the msqrob2Examples website so it refers to the Bioconductor vignette.

milanmlft commented 2 years ago

Essentially what you should do is use the filterFeatures() function from QFeatures to filter the pe object.

patruong commented 2 years ago

Thank you! The new vignette examples worked. The example vignette on your github repo: https://github.com/statOmics/msqrob2 refers to the old examples and should probably be updated!