Entering edit mode
bhgyu
▴
30
@bhgyu-13069
Last seen 6.4 years ago
x <- findChromPeaks(raw, param = cwp) Error in names(res) <- nms : 'names' attribute [12] must be the same length as the vector [6]
I don't understand the error above. I can't seem to figure out what this refers to or how to fix it? Happens on xcms. Strange though, this same code worked fine on a different data set. Any ideas to check or fix it? Many thanks!
sessionInfo() R version 3.4.0 (2017-04-21) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows >= 8 x64 (build 9200) Matrix products: default locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C LC_TIME=English_United States.1252 attached base packages: [1] parallel stats graphics grDevices utils datasets methods base other attached packages: [1] RColorBrewer_1.1-2 xcms_2.99.10 MSnbase_2.3.14 ProtGenerics_1.9.1 mzR_2.11.11 [6] Rcpp_0.12.13 BiocParallel_1.11.13 Biobase_2.37.2 BiocGenerics_0.23.4 loaded via a namespace (and not attached): [1] compiler_3.4.0 BiocInstaller_1.27.6 plyr_1.8.4 iterators_1.0.8 tools_3.4.0 [6] zlibbioc_1.23.0 MALDIquant_1.16.4 digest_0.6.12 preprocessCore_1.39.3 tibble_1.3.4 [11] gtable_0.2.0 lattice_0.20-35 rlang_0.1.2 Matrix_1.2-9 foreach_1.4.3 [16] S4Vectors_0.15.14 IRanges_2.11.19 stats4_3.4.0 multtest_2.33.0 grid_3.4.0 [21] impute_1.51.0 snow_0.4-2 survival_2.41-3 XML_3.98-1.9 RANN_2.5.1 [26] limma_3.33.14 ggplot2_2.2.1 MASS_7.3-47 splines_3.4.0 scales_0.5.0 [31] pcaMethods_1.69.0 codetools_0.2-15 MassSpecWavelet_1.43.0 mzID_1.15.0 colorspace_1.3-2 [36] affy_1.55.0 lazyeval_0.2.0 munsell_0.4.3 doParallel_1.0.11 vsn_3.45.2 [41] affyio_1.47.1
From another thread, I think it may be an issue with the "processing" data in processingData, but how do I change it to a character since it's part of a S4 class object? Thanks!
..@ processingData :Formal class 'MSnProcess' [package "MSnbase"] with 10 slots .. .. ..@ files : chr [1:12] "SJ55.CDF" "SJ56.CDF" "SJ57.CDF" "SJ58.CDF" ... .. .. ..@ processing : chr "Data loaded [Wed Oct 25 17:59:52 2017]" .. .. ..@ merged : logi(0) .. .. ..@ cleaned : logi(0) .. .. ..@ removedPeaks : chr(0) .. .. ..@ smoothed : logi NA .. .. ..@ trimmed : num(0) .. .. ..@ normalised : logi(0) .. .. ..@ MSnbaseVersion : chr "2.3.14" .. .. ..@ .__classVersion__:Formal class 'Versions' [package "Biobase"] with 1 slot .. .. .. .. ..@ .Data:List of 1 .. .. .. .. .. ..$ : int [1:3] 0 1 3
What type of object is
raw
? I'm puzzled by this error, becausenames(res) <- nms
is never called in xcms, but it is called in thecommonFeatureNames
function forMSnSet
objects inMSnbase
-raw
should however be anOnDiskMSnExp
object.It's this. It's an odd error especially cause I've run this with a similar dataset without these issues before...
class(raw)
[1] "OnDiskMSnExp"
attr(,"package")
[1] "MSnbase"
And you've got a data set consisting of 12 files, right? Are these all distinct files, i.e. have different file names?
Hi yes correct - 12 data files and 12 distinct names
Without getting hands on the data it is pretty hard to say what's going on and where the problem is.