I am testing the mzR
package with some mzIdentML data following the instructions in section 3.2 of the vignette. When trying to extract the scores of each psm R crashes (see the relevant code below). When using the sample data used in the vignette (Tandem.mzid.gz
in the msdata
package) everything works as expected. My mzIdentML data was exported using Scaffold 4.4.5 (linux version).
> library(mzR) Loading required package: Rcpp > sessionInfo() R version 3.2.1 (2015-06-18) Platform: x86_64-apple-darwin13.4.0 (64-bit) Running under: OS X 10.10.4 (Yosemite) locale: [1] C/UTF-8/C/C/C/C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] mzR_2.2.1 Rcpp_0.11.6 loaded via a namespace (and not attached): [1] ProtGenerics_1.0.0 parallel_3.2.1 Biobase_2.28.0 [4] codetools_0.2-11 BiocGenerics_0.14.0 > x <- openIDfile("150602Nakai_mus.mzid.gz") > x Identification file handle. Filename: foo.mzid.gz Number of psms: 1150 > scr <- score(x) *** caught segfault *** address 0xf1000013, cause 'memory not mapped' Traceback: 1: .External(list(name = "CppMethod__invoke_notvoid", address = , dll = list(name = "Rcpp", path = "/Library/Frameworks/R.framework/Versions/3.2_R/Resources/library/Rcpp/libs/Rcpp.so", dynamicLookup = TRUE, handle = , info = ), numParameters = -1L), , , .pointer) 2: x@backend$getScore() 3: .local(x, ...) 4: score(x) 5: score(x) Possible actions: 1: abort (with core dump, if enabled) 2: normal R exit 3: exit R without saving workspace 4: exit R saving workspace
Dear Laurent,
Thank you for your quick reply. I only have that single Scaffold file and no prospect of getting more soon. I checked the mzIdentML version looking at the header of the file and it seems to be 1.1.0. Also tried yesterday with the
mzID
package and it loaded fine, but I cannot run thescore
method on the obtained object (not that I really need to). Just to clarify, the file loaded fine withmzR
, and could apply all the methods described in the vignette (section 3.2) up toscore
, which was the one causing the segfault. Unfortunately I am not sure if I can share the file with you at this moment. At any rate, I was just testing the packages with the data I had. I will most likely ask for the raw data to the core facility, and hopefully things will work better.Hi Thomas. That sounds great. I did not see in the vignette or can figure out from the methods listed in the
mzID
package which command should be used to obtain the scores. It is not critical but if I knew then I could test whether it also crashes R or not. Do you know how to obtain the scores withmzID
?OK, one guess for the scores is to run
flatten()
on themzID
object and then access the "mascot:score" column in the resulting data.frame. If that is the proper way then it works just fine. Thank you.I think that's the right way.
> Thank you for your quick reply. I only have that single Scaffold file and no prospect
> of getting more soon.I checked the mzIdentML version looking at the header of the
> file and it seems to be 1.1.0.
That's the correct version (although I think 1.0 should be supported too).
> Also tried yesterday with the
mzID
package and it loaded fine, but I cannot run thescore
> method on the obtained object (not that I really need to).
Unfortunately,
mzID
andmzR
do not have a consistent interface. I suppose the main reason is that they are very different under the hood, but it would be great to try to harmonise them, somehow.> Just to clarify, the file loaded fine with
mzR
, and could apply all the methods described in the> vignette (section 3.2) up to
score
, which was the one causing the segfault.That could indicate that something is a bit fishy in the way Scaffold exports to
mzid
scores, some subtle difference in the syntax that make it incompatible with the underlying proteowizard C++ code frommzR
.> Unfortunately I am not sure if I can share the file with you at this moment. At any rate, I
> was just testing the packages with the data I had. I will most likely ask for the raw data to
> the core facility, and hopefully things will work better.
Don't hesitate to get back if you have any other questions.