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

High resolution data and findMsMsHR.mass #104

Open
dwalke04 opened this Issue Dec 16, 2014 · 9 comments

Comments

Projects
None yet
5 participants
@dwalke04
Copy link

dwalke04 commented Dec 16, 2014

Attempting to extract data from mzXML file containing ms1 and ms2 scan (two total).
Read file in using mzR:
ms_file<- openMSfile("141208-GG-01.mzXML")
Completed successfully

Attempted to extract spectra for the given precursor mass:
l1<- findMsMsHR.mass(ms_file, mz= 180.8937, limit.coarse= 50, limit.fine=5, rtLimits= NA, maxCount= NA, headerCache= header(ms_file), fillPrecursorScan= TRUE, deprofile= getOption("RMassBank", noise = NA, method ="deprofile.fwhm", colnames = TRUE )$deprofile)

However, I keep receiving the following error message:
Error in colnames<-(*tmp*, value = c("mz", "int")) :
'names' attribute [2] must be the same length as the vector [0]
In addition: Warning message:
In is.na(headerCache) :
is.na() applied to non-(list or vector) of type 'NULL'

Thanks!

@schymane

This comment has been minimized.

Copy link
Member

schymane commented Dec 17, 2014

So, a few things here:
Re: the warning, this was fixed in #98, which version of RMassBank are you using? Bioconductor or github (and if so, which branch?). There's a new version around which also contains an additional bug fix but is not yet in this repo, you can get the source tar.gz from here:
www.eawag.ch/about/personen/homepages/schymaem/RMassBank_1.9.2.1.tar.gz
Secondly, we prefer to work off mzML, as some features were upgraded from the mzXML. How did you convert these and (if proteowizard), did you use vendor peak-picking?
Thirdly, we have quite a few wrapper functions that should be easier for you to use than the code above, unless you are trying to do something special. Try vignette("RMassBank") to get the full workflow explanation and find these other functions, you can also find some demo scripts here:
http://www.eawag.ch/about/personen/homepages/schymaem/rmassbank
or contact us for more info if you need.

@meowcat

This comment has been minimized.

Copy link

meowcat commented Dec 17, 2014

Hi,

you probably want to change your limit.fine and limit.coarse parameters - both are in mass units (not in ppm). So basically here you are building the EIC with a mass window from 175.8937 to 185.8937, and accepting MS/MS precursor ions in a range of 100 mass units (50 above and 50 below your mass).

For the limit.coarse (the acceptance limit for the precursor in an MS2 scan), a reasonable number might be 0.3 or so (i.e. you accept MS2 with a precursor from 180.6 to 181.2) and for the limit.fine, depending on your instrument, some 5 or 10 ppm? (which you can calculate with ppm(180.8937, 5, p=TRUE) )

As Emma said, we haven't used the mzXML format in ages. It might even work but it's untested and using mzML instead might work.

Your deprofile argument looks mangled, what are you trying to do? Are your data profile mode and need to be centroided (in which case you can use e.g. deprofile = "deprofile.fwhm")? You might alternatively want to deprofile during conversion to mz(X)ML (in ProteoWizard: the "peak picking" option), since the RMassBank deprofiler is comparatively slow. If your data is already centroid mode, use deprofile = NA.

What instrument are you using?

If the error persists (and it might), would you give us the raw files and a complete script to check?

@schymane

This comment has been minimized.

Copy link
Member

schymane commented Dec 17, 2014

Depending what instrument, could this error could be resolved with the fillPrecursorScan=TRUE in the settings.ini file?

Define raw MS retrieval settings.

findMsMsRawSettings:
ppmFine: 10
mzCoarse: 0.5
# fillPrecursorScan is FALSE for "good" mzML files which have all the info needed.
# However, for example AB Sciex files will have missing precursor scan information,
# in which case fillPrecursorScan = TRUE is needed. Try it out.
fillPrecursorScan: FALSE

@dwalke04

This comment has been minimized.

Copy link
Author

dwalke04 commented Dec 17, 2014

Thank you for the comments.
The version I was using originally I installed by:

source("http://bioconductor.org/biocLite.R")
biocLite("RMassBank")

This gave me versions 1.8.1. I updated to v1.9.1 that is also available on the Bioconductor website (I couldn't install your tar.gz package since I am working on a W7 computer, however if there are significant differences I will attempt to install with Rtools).

The files were acquired on a Q-Exactive MS. I re-converted the data to mzML, selecting levels 1- and peak picking to centroid the data prior to reading into r using the following:

msms_1<- openMSfile("DW-141208-GG-01.mzML", verbose= FALSE)

I then updated the function to the following (I switched fillPrecursorScan to both TRUE and FALSE with the same results):

l1<- findMsMsHR.mass(msms_1, mz= 180.8937, limit.coarse= 0.3, limit.fine= ppm(180.8937, 10, p=TRUE), rtLimits= NA, maxCount= NA,
headerCache= header(msms_1), fillPrecursorScan= FALSE, deprofile= NA)

Upon which I receive the following error:
Error in colnames<-(*tmp*, value = c("mz", "int")) :
'names' attribute [2] must be the same length as the vector [0]
In addition: Warning message:
In is.na(headerCache) :
is.na() applied to non-(list or vector) of type 'NULL'

Which was the same as before. We are hoping to incorporate the RMassBank package into our MSMS confirmation workflow from untargeted metabolomics. The data was acquired using 2 different scan events, an MS1 scan from 50-500 and MS2 scan for 180.8937 +/- 0.5. I have no problem sharing the data file with you.

Thanks again for all your help.

@schymane

This comment has been minimized.

Copy link
Member

schymane commented Dec 17, 2014

The Q-Exactive shouldn't need the fillPrecursorScan option (at least not so far).
I am not sure why the install shouldn't work with W7, did you include the source option?
install.packages("C:/DATA/RMassBank_Versions/RMassBank_1.5.2.5.tar.gz",
repos=NULL, type="source")

but with the path and file name adjusted to the latest version number and the actual location of the tar.gz file on your machine?
If you have picked peaks, you shouldn't need the deprofiler, so that should be fine now.
More questions:
(a) are you using proteowizard, or another converter? If the former, do you have the "makeTitle" option active and if you deactivate it, does the problem persist?
(b) if you still run into trouble, can you upload a file somewhere we can look into it?
(c) can you run the demo data without problems?
(d) Can you also paste a sessionInfo() output for us?

Thanks!


From: dwalke04 [notifications@github.com]
Sent: Wednesday, 17 December 2014 7:55 PM
To: meowcat/RMassBank
Cc: Schymanski, Emma
Subject: Re: [RMassBank] High resolution data and findMsMsHR.mass (#104)

Thank you for the comments.
The version I was using originally I installed by:

source("http://bioconductor.org/biocLite.R")
biocLite("RMassBank")

This gave me versions 1.8.1. I updated to v1.9.1 that is also available on the Bioconductor website (I couldn't install your tar.gz package since I am working on a W7 computer, however if there are significant differences I will attempt to install with Rtools).

The files were acquired on a Q-Exactive MS. I re-converted the data to mzML, selecting levels 1- and peak picking to centroid the data prior to reading into r using the following:

msms_1<- openMSfile("DW-141208-GG-01.mzML", verbose= FALSE)

I then updated the function to the following (I switched fillPrecursorScan to both TRUE and FALSE with the same results):

l1<- findMsMsHR.mass(msms_1, mz= 180.8937, limit.coarse= 0.3, limit.fine= ppm(180.8937, 10, p=TRUE), rtLimits= NA, maxCount= NA,
headerCache= header(msms_1), fillPrecursorScan= FALSE, deprofile= NA)

Upon which I receive the following error:
Error in colnames<-(tmp, value = c("mz", "int")) :
'names' attribute [2] must be the same length as the vector [0]
In addition: Warning message:
In is.na(headerCache) :
is.na() applied to non-(list or vector) of type 'NULL'

Which was the same as before. We are hoping to incorporate the RMassBank package into our MSMS confirmation workflow from untargeted metabolomics. The data was acquired using 2 different scan events, an MS1 scan from 50-500 and MS2 scan for 180.8937 +/- 0.5. I have no problem sharing the data file with you.

Thanks again for all your help.


Reply to this email directly or view it on GitHubhttps://github.com//issues/104#issuecomment-67372865.

@meowcat

This comment has been minimized.

Copy link

meowcat commented Dec 19, 2014

Hi again,

just by looking at your code I don't see anything wrong, so it's probably something that I could best look at with the actual data file. If you upload it somewhere I'll happily look into it...

@schymane

This comment has been minimized.

Copy link
Member

schymane commented Jan 21, 2015

This is on hold until we have a data file @dwalke04 it would be great if you could contact us directly!
New label suggest: on hold

@kg737

This comment has been minimized.

Copy link

kg737 commented Feb 15, 2019

Any update? I am having a same issue

@schymane

This comment has been minimized.

Copy link
Member

schymane commented Feb 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment