-
Notifications
You must be signed in to change notification settings - Fork 46
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
adding mzidentml data to MSexp object fails #42
Comments
Which version of MSnbase do you use? What is the output of |
Yes, indeed. The MGF file is very metadata poor, and the matching However, using files that store metadata in a well defined standard will In the future, please also provide the output of Hope this helps, Laurent |
Thanks a lot for the swift response! sessionInfo()
The MGF and both msgf and peptideshaker mzid files are in this dropbox folder: greets |
Hi Laurent I didn't see your comment when I posted my previous answer. I did'nt make the MGF myself. I'll try to get a hold on the original files. Thanks for the suggestion! Thanks anyway for your clarification! |
Our issue is different than using the It is perfectly possible to do the matching using the header in the
and the matching element in the
In the > xx <- readMgfData("~/Downloads/3_2.mgf")
> head(fData(xx)$TITLE)
X1
Orbi2_study6b_W080321_6QC1_sigma48_ft8_pc_01.2.2.2
X10
Orbi2_study6b_W080321_6QC1_sigma48_ft8_pc_01.16.16.2
X100
Orbi2_study6b_W080321_6QC1_sigma48_ft8_pc_01.311.311.2
X1000
Orbi2_study6b_W080321_6QC1_sigma48_ft8_pc_01.1663.1663.2
X10000
Orbi2_study6b_W080321_6QC1_sigma48_ft8_pc_01.13140.13140.3
X10001
Orbi2_study6b_W080321_6QC1_sigma48_ft8_pc_01.13141.13141.3
13998 Levels: Orbi2_study6b_W080321_6QC1_sigma48_ft8_pc_01.10001.10001.2 ... It's not too much work, I think, but I will not have time to implement this now. Maybe @sgibb has some time. |
@sgibb Ideally, we should make it possible to defined what is matched in the |
Such a feature would indeed be great and very useful. |
I am going to look into it. Can we assume that all mgf files need the combination |
It seems so: > library("rols")
> term("MS:1000796", "MS")
[1] "spectrum title"
> termMetadata("MS:1000796", "MS")
definition: A free-form text title describing a spectrum. comment: This is the preferred storage place for the spectrum TITLE from an MGF peak list. But it would still be great to be general and not only support the acquisition number and spectrum title. |
Seems to work by simply replacing the merging columns fDataCol <- ifelse (is.null(fDataCol) && grepl("mgf", fileNames(msexp), "TITLE", "acquisition.number") |
Thanks a lot for the effort. If I can test something on my files, just let me know :) |
Basically, What about the following:
The default would be I think it is very similar than your original suggestion but keeps things a bit more general and does not rely on a convention. What do you think? We could also have a helper function
Instead of |
I am not quite sure how to realize the We could have multiple files in an MSnExp with the same number or less corresponding identification files. In this case we have to accept a list of vectors, e.g. (BTW |
Indeed, we need to support multiple files, which makes my idea a bit too convoluted. I guess it is better to drop the vector example altogether. Let's go for your original suggestion. The default would be to match |
Should I add a new argument to I would suggest: setMethod("addIdentificationData", "MSnExp",
function(object, filenames, df, fcol, icol, verbose = TRUE) { ... }) |
I think methods are appropriate here. The signature would be c("MSnExp", "character")
c("MSnExp", "mzID")
c("MSnExp", "data.frame")
c("MSnSet", "character")
c("MSnSet", "mzID")
c("MSnSet", "data.frame") where "character" would be an (At some stage, it would be good to add |
You are right, that would be the cleanest way. But it may breaks the current API. |
fix mzIdentML import for MGF based identification files; see issue #42
Hi
I try to add a .mzid file to my MSexp object but when I look at fData I only see NA's. There are for sure identification in the file (it's 50 mb and when I open it in an editor I see lots of entries). The .mzid is generated by msgf+ on a search perfomed on a MGF file. The MSexp object is generated with the same MGF file. I also loaded the results in Peptideshaker and tried to create an .mzid file with the peptideshaker export. Same result.
When I try adding identification files in MSnbase with the files provided with the MSnbase package, it works.
Is it something to do with the MGF file?
Greetz
The text was updated successfully, but these errors were encountered: