MSnbase icon indicating copy to clipboard operation
MSnbase copied to clipboard

recalibration

Open ricoderks opened this issue 4 years ago • 4 comments

Hi,

I would like to modify the m/z values in an OnDiskMSnExp for recalibration purposes, but I can not figure out how to modify the m/z values. Do I need to use ProcessingStep for this? Can you push me into the right direction?

Cheers, Rico

ricoderks avatar Sep 08 '21 10:09 ricoderks

The on-disk back-end is write only. You thus either load/convert the data into an in-memory object, or indeed, add the processing step to the processing queue and (I think) the processing will be applied after reading and before writing. But @jorainer would need to confirm.

More generally, I would suggest you move to the new Spectra infrastructure. You should be able to do everything you can do with MSnbase, as well as more.

lgatto avatar Sep 08 '21 12:09 lgatto

Ok, thanks. I'll have a look at Spectra.

ricoderks avatar Sep 08 '21 13:09 ricoderks

So, basically to read mzML files you would do:

sps <- Spectra(<mzML files>, MsBackendMzR())
## Then do something with the spectra data

## Export the data again to mzML files
export(MsBackendMzR(), sps, file = <new file name>)

Feel free to open issues in Spectra if something is not working or if you need help/new features.

jorainer avatar Sep 08 '21 13:09 jorainer

I just installed and will try it immediately :+1:

ricoderks avatar Sep 08 '21 13:09 ricoderks