MassBank / RMassBank

Playground for experiments on the official http://bioconductor.org/packages/devel/bioc/html/RMassBank.html
Other
12 stars 15 forks source link

msmsRead fails #172

Open stanstrup opened 7 years ago

stanstrup commented 7 years ago

Hi,

I am trying to process some old MS/MS runs but running into an error I cant seem to pin down. It seems to come down to it looking for a RT at some point, not finding it, returning an empty object and failing.

I have attached the raw file and the script to reproduce the error.

> library(RMassBank)
> 
> file <- "2012-07-11-033.mzData"
> 
> loadRmbSettings("RMB_options.ini")
> w <- newMsmsWorkspace(file)
> loadList("Compoundlist.csv")
Loaded compoundlist successfully
> 
> 
> w <- msmsRead(w, mode="pH", files=file, cpdids = 6, readMethod="xcms") # mzR errors too
  |                                                                                                                                                     |                                                                                                                                             |   0%Error in if (.listEnvEnv$listEnv$compoundList[match(cpdID, .listEnvEnv$listEnv$compoundList$ID),  : 
  missing value where TRUE/FALSE needed
R version 3.3.1 (2016-06-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

locale:
[1] LC_COLLATE=Danish_Denmark.1252  LC_CTYPE=Danish_Denmark.1252    LC_MONETARY=Danish_Denmark.1252 LC_NUMERIC=C                   
[5] LC_TIME=Danish_Denmark.1252    

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

other attached packages:
[1] RMassBank_2.2.0     Rcpp_0.12.5         RevoUtilsMath_8.0.3

loaded via a namespace (and not attached):
 [1] lattice_0.20-33        png_0.1-7              digest_0.6.9           foreach_1.4.3          chron_2.3-47           plyr_1.8.4            
 [7] acepack_1.3-3.3        mzID_1.12.0            stats4_3.3.1           ggplot2_2.1.0          BiocInstaller_1.24.0   itertools_0.1-3       
[13] zlibbioc_1.20.0        data.table_1.9.6       S4Vectors_0.12.0       rpart_4.1-10           Matrix_1.2-6           preprocessCore_1.36.0 
[19] mzR_2.8.0              xcms_1.50.0            splines_3.3.1          RevoUtils_10.0.1       BiocParallel_1.8.1     stringr_1.0.0         
[25] foreign_0.8-66         ProtGenerics_1.6.0     igraph_1.0.1           RCurl_1.95-4.8         munsell_0.4.3          fingerprint_3.5.2     
[31] BiocGenerics_0.20.0    multtest_2.30.0        pcaMethods_1.66.0      nnet_7.3-12            gridExtra_2.2.1        RANN_2.5              
[37] Hmisc_3.17-4           IRanges_2.8.0          codetools_0.2-14       XML_3.98-1.4           MASS_7.3-45            bitops_1.0-6          
[43] grid_3.3.1             MassSpecWavelet_1.40.0 RBGL_1.50.0            CAMERA_1.30.0          gtable_0.2.0           affy_1.52.0           
[49] magrittr_1.5           rcdk_3.3.7             scales_0.4.0           graph_1.52.0           stringi_1.1.1          impute_1.48.0         
[55] reshape2_1.4.1         affyio_1.44.0          doParallel_1.0.10      limma_3.30.2           latticeExtra_0.6-28    Formula_1.2-1         
[61] rjson_0.2.15           RColorBrewer_1.1-2     iterators_1.0.8        tools_3.3.1            Biobase_2.34.0         MSnbase_2.0.0         
[67] rcdklibs_1.5.13        parallel_3.3.1         survival_2.39-5        yaml_2.1.13            colorspace_1.2-6       cluster_2.0.4         
[73] vsn_3.42.3             MALDIquant_1.15        rJava_0.9-8           

error_hunt.zip

meowcat commented 7 years ago

Hi,

I just checked. While I don't know yet what the error is, two things

library(mzR)
d <- openMSfile(file)
h <- header(d)
h[110:130,]

So my first suggestion would be to see if converting to mzML or mzXML helps at all (i.e. gives you collision energies in the file). It could work with the XCMS option then.

@ermueller: Does the xcms option still require an exact retention time? Because one could also build a pseudo-EIC from the MS2 TIC (per collision energy) and pick the RT from there, if the user is confident that this will be enough to pick the standard.

stanstrup commented 7 years ago

Hi,

thanks for looking into it. I did notice the collision energy thing but when I tried to bug-hunt it seemed irrelevant since the collision energy was just set to 0. In this case there was only 1 energy used so it didn't seem to make a difference. I now reconverted to mzML and it has the collision energy but the result is the same. I have attached the new file.

2012-07-11-033_lockmass_rem.zip

meowcat commented 7 years ago

Hi,

sorry for the low responsiveness; I tend to be busy with other stuff currently...

Multiple things here: