Closed ococrook closed 2 years ago
Indeed - pretty cryptic. Could you please disable parallel processing first by setting register(SerialParam())
and then try again. That way we can hopefully see the real error message (I guess something fails in mzR
- we never tested writing ion mobility data).
Unfortunatly no less crytic...
register(SerialParam())
registered()
$SerialParam
class: SerialParam
bpisup: FALSE; bpnworkers: 1; bptasks: 0; bpjobname: BPJOB
bplog: FALSE; bpthreshold: INFO; bpstopOnError: TRUE
bpRNGseed: ; bptimeout: 2592000; bpprogressbar: FALSE
bpexportglobals: TRUE
bplogdir: NA
bpresultdir: NA
$SnowParam
class: SnowParam
bpisup: FALSE; bpnworkers: 6; bptasks: 0; bpjobname: BPJOB
bplog: FALSE; bpthreshold: INFO; bpstopOnError: TRUE
bpRNGseed: ; bptimeout: 2592000; bpprogressbar: FALSE
bpexportglobals: TRUE
bplogdir: NA
bpresultdir: NA
cluster type: SOCK
fl <- tempfile()
export(exampleIonMob1, MsBackendMzR(), file = fl, BPPARAM = SerialParam())
19.
stop(e)
18.
value[[3L]](cond)
17.
tryCatchOne(expr, names, parentenv, handlers[[1L]])
16.
tryCatchList(expr, classes, parentenv, handlers)
15.
tryCatch({ FUN(...) }, error = handle_error)
14.
withCallingHandlers({ tryCatch({ FUN(...) }, error = handle_error) ...
13.
FUN(...)
12.
FUN(X[[i]], ...)
11.
lapply(X, FUN_, ...)
10.
bplapply(X = seq_along(ddd[[1L]]), wrap, .FUN = FUN, .ddd = ddd, .MoreArgs = MoreArgs, BPREDO = BPREDO, BPPARAM = BPPARAM)
9.
bplapply(X = seq_along(ddd[[1L]]), wrap, .FUN = FUN, .ddd = ddd, .MoreArgs = MoreArgs, BPREDO = BPREDO, BPPARAM = BPPARAM)
8.
bpmapply(.write_ms_data_mzR, split(x, f), levels(f), MoreArgs = list(format = format, copy = copy), BPPARAM = BPPARAM)
7.
bpmapply(.write_ms_data_mzR, split(x, f), levels(f), MoreArgs = list(format = format, copy = copy), BPPARAM = BPPARAM)
6.
.local(object, ...)
5.
export(backend, object, ...)
4.
export(backend, object, ...)
3.
.local(object, ...)
2.
export(exampleIonMob1, MsBackendMzR(), file = fl, BPPARAM = SerialParam())
1.
export(exampleIonMob1, MsBackendMzR(), file = fl, BPPARAM = SerialParam())
OK, indeed not very helpful - could you eventually provide an example file so that I can reproduce locally?
I sent an email to johannes.rainer@eurac.edu with a google drive link with 2 ion mobility datasets. Let me know if you got it?
Did not get any email yet...
Nothing with the subject line "ion mobility package"?
Sorry, yes, sure - I found the mail now. And export
fails with any of the two files you shared, right?
No worries, yes neither of them work.
I finally had time to look into the files. I checked the file "2017121001.mzML". The problem with that is that I've got spectra in there without any peaks. Could you please check this also for your files from above?
sum(lengths(exampleIonMob1) == 0)
If that's the case I have to think how we're going to handle that.
Note: I've fixed the empty spectra bug in both the BioC 3.12 release branch and the current development (master/main) branch. Could you please install any of the two to see if it fixes your problem @ococrook (e.g. with devtools::install_github("RforMassSpectrometry/Spectra", ref = "RELEASE_3_12")
)?
Great, thank you so much. I'll have a check later
Hi @jorainer, managed to get around to check and looks good to me! My local versions exported correctly. Indeed, there are empty spectra - about 6025/25000 were empty.
Just to confirm, if we have Hdf5 backend, we first convert to mzR backend to export.
Happy to close the issue.
If you have a Hdf5 backend you can call export(sps, backend = MsBackendMzR())
, so there is no need to change the backend first. With backend
you can specify which backend should be used for the export - which will also define the output format.
I'm trying to export a spectra object with backend MsBackendMzR() to a mzML file as given by the example in the vignette. However, I get an error which is a bit cryptic. Sorry Johannes I'm no trying to break everying on purpose ....