-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refining precursorMz #336
Comments
Thanks Corey for the suggestion! I've added the Maybe you are already aware, but we have now also in |
feat: add precursorMz<- replacement method (issue #336)
Thanks! I did NOT know you had the estimatePrecursorMz function. thanks for pointing it out! i have a hard time keeping up with your progress!! |
I am processing Waters DDA data with the Spectra package. I want to refine the precursor mass, since in the waters data i have, the precursor mass mass not been lockmass corrected. I am able to map the uncorrected precursorMz to the feature mz values, and want to replace, in the Spectra object, the uncorrected precursorMz values with the 'corrected' accurate mass feature values, so i can use all the great filtering and write tools you have created for Spectra objects. However, i am getting an error when i try to replace the precusorMz values in the Spectra object of the raw data. A (trivial) reproducible example:
this 'sciex' data contains no precursorMz value at all, but in either case, i generate the same error message on my Waters data:
Error: unable to find an inherited method for function ‘precursorMz<-’ for signature ‘object = "Spectra"’
this function is apparently being called from the ProtGenerics package, which does not support the Spectra object format. I noticed in the help section ?Spectra::
precursorMz,Spectra-method
that there is no setter method for this spectrum header. Any chance i could request one to be added? I did see in the help that this could be done by first moving to a data.frame and then returning to a Spectra object, but that seems pretty inefficient.the same issue holds for
R version 4.4.1 (2024-06-14 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 22631)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8 LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C LC_TIME=English_United States.utf8
time zone: America/Denver
tzcode source: internal
attached base packages:
[1] stats4 stats graphics grDevices utils datasets methods base
other attached packages:
[1] Spectra_1.14.1 ProtGenerics_1.36.0 S4Vectors_0.42.0 BiocGenerics_0.50.0 xcms_4.2.2 BiocParallel_1.38.0
loaded via a namespace (and not attached):
[1] DBI_1.2.3 rlang_1.1.4 magrittr_2.0.3 clue_0.3-65 MassSpecWavelet_1.70.0
[6] matrixStats_1.3.0 compiler_4.4.1 vctrs_0.6.5 reshape2_1.4.4 stringr_1.5.1
[11] pkgconfig_2.0.3 MetaboCoreUtils_1.12.0 crayon_1.5.3 XVector_0.44.0 utf8_1.2.4
[16] UCSC.utils_1.0.0 preprocessCore_1.66.0 purrr_1.0.2 MultiAssayExperiment_1.30.2 zlibbioc_1.50.0
[21] GenomeInfoDb_1.40.1 jsonlite_1.8.8 progress_1.2.3 DelayedArray_0.30.1 parallel_4.4.1
[26] prettyunits_1.2.0 cluster_2.1.6 R6_2.5.1 stringi_1.8.4 RColorBrewer_1.1-3
[31] limma_3.60.3 pkgload_1.3.4 GenomicRanges_1.56.1 Rcpp_1.0.12 SummarizedExperiment_1.34.0
[36] iterators_1.0.14 snow_0.4-4 IRanges_2.38.0 Matrix_1.7-0 igraph_2.0.3
[41] tidyselect_1.2.1 rstudioapi_0.16.0 abind_1.4-5 doParallel_1.0.17 codetools_0.2-20
[46] affy_1.82.0 lattice_0.22-6 tibble_3.2.1 plyr_1.8.9 Biobase_2.64.0
[51] pillar_1.9.0 affyio_1.74.0 BiocManager_1.30.23 MatrixGenerics_1.16.0 foreach_1.5.2
[56] MSnbase_2.30.1 MALDIquant_1.22.2 ncdf4_1.22 generics_0.1.3 hms_1.1.3
[61] ggplot2_3.5.1 munsell_0.5.1 scales_1.3.0 MsExperiment_1.6.0 glue_1.7.0
[66] MsFeatures_1.12.0 lazyeval_0.2.2 tools_4.4.1 mzID_1.42.0 QFeatures_1.14.1
[71] vsn_3.72.0 mzR_2.38.0 fs_1.6.4 XML_3.99-0.16.1 grid_4.4.1
[76] impute_1.78.0 tidyr_1.3.1 MsCoreUtils_1.16.0 colorspace_2.1-0 GenomeInfoDbData_1.2.12
[81] PSMatch_1.8.0 cli_3.6.2 fansi_1.0.6 S4Arrays_1.4.1 dplyr_1.1.4
[86] AnnotationFilter_1.28.0 pcaMethods_1.96.0 gtable_0.3.5 digest_0.6.35 SparseArray_1.4.8
[91] lifecycle_1.0.4 httr_1.4.7 statmod_1.5.0 MASS_7.3-60.2
The text was updated successfully, but these errors were encountered: