Skip to content
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

Polarity cannot be extracted #686

Open
crestre opened this issue Sep 3, 2023 · 3 comments
Open

Polarity cannot be extracted #686

crestre opened this issue Sep 3, 2023 · 3 comments

Comments

@crestre
Copy link

crestre commented Sep 3, 2023

Please I need some help. I am learning xcms through your vignette (LCMS data preprocessing and analysis with xcms) using version 3.22. When I run the readMSData I get a message "Polarity cannot be extracted from netCDF files, please set manually the 'polarity method. Please could you indiate 1) how to do so and 2) what is the polarity of the data?

Thanks

@crestre
Copy link
Author

crestre commented Sep 3, 2023

I am curious about something. You use the faahko data (.cdf). What would you use to convert it mzXML to use with your tutorials?

@jorainer
Copy link
Collaborator

jorainer commented Sep 5, 2023

Regarding the message "Polarity cannot be extracted ..." - that is not an error but a simple information message. In fact polarity is not stored in CDF files, but usually, this information is also not required for xcms-based data analysis.

@jorainer
Copy link
Collaborator

jorainer commented Sep 5, 2023

to convert CDF to mzML files - you could do that directly in R: the code below converts the CDF files from the faahKO package to files in mzML format (same file name, but with mzML file ending):

library(Spectra)
library(faahKO)
cdf <- dir(system.file("cdf", package = "faahKO"), recursive = TRUE, full.names = TRUE)
s <- Spectra(cdf)
## Define new file names
newf <- basename(dataOrigin(s))
newf <- sub("CDF", "mzML", newf)
export(s, backend = MsBackendMzR(), file = newf)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants