sneumann / xcms

This is the git repository matching the Bioconductor package xcms: LC/MS and GC/MS Data Analysis
Other
183 stars 80 forks source link

Write multiple files to mzML #477

Closed BaylorSci closed 3 years ago

BaylorSci commented 4 years ago

This may be similiar to issue #294 but slightly different. I want to export my XCMSnExp to mzml, however while i can give individual names to each file using c function. what i would like to do is use the original file names and specify an output directory.

Currently i have been specifying the following: names=fileNames(xdata1) but short of changing the directory manually, i cannot output it to a separate output directory. What would be nice is if i could use specify the file names to automatically output original file names and then just specify separate directory so that i do not get error on file name already exists. I've been playing around with the following but not sure i am heading in the correct direction

writeMSData( object=xdata1, file=paste0("Pre-processed/",names), outformat ="mzml", copy = FALSE))

Also, when i managed to get one file working, i got correspondence results (features) removed. Am i missing something in my code to have these kept?

jorainer commented 4 years ago

Currently the writeMSData function only allows to export the raw spectra data to mzML files, this means no xcms preprocessing results (identified chromatographic peaks, adjusted retention times or correspondence results). I'm actually not even sure that that could be exported to mzML?

BaylorSci commented 4 years ago

Many thanks (and apologies for the delay). I was super excited when i stumbled across this package and the recent addition to handle MSe data. I was able to successfully use it in combination with IPO derived parameters for a number of MSe datasets but i was unable to export with the modifications. Ideally, i would like to use it for proteomics (not metabolomics) and the exportation of this to use with various search engines would have been amazing. At least in the future, i know how to do this if i get involved in a metabolomics project.

jorainer commented 4 years ago

Note that if you want to export MS2 spectra you could do that with writeMgfData.

BaylorSci commented 4 years ago

I was unaware of this. Many thanks!

jorainer commented 3 years ago

Closing the issue now. Feel free to re-open if needed.