sneumann / xcms

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

About exporting feature definition. #549

Closed gmhhope closed 3 years ago

gmhhope commented 3 years ago

Dear XCMS developer,

Thanks very much for the excellent tutorial of XCMS.

I am looking through the tutorial but I cannot find a best practice to export the feature definition and feature table. I can easily export the matrix using write.csv(featureValues(xdata, value = "into"), path2output). But using write.csv on feature Definitions create some strange organization of the column peakidx featureDefinitions_top_rows.csv.zip

Could you help to answer this! I greatly appreciate your input.

Thanks, Minghao Gong

jorainer commented 3 years ago

Actually, I would rather exclude the "peakidx" column before exporting:

fts <- featureDefinitions(xdata)
write.csv(fts[, colnames(fts) != "peakidx"], ...)

The reason for the export problems are that the "peakidx" column is a list with the indices of the assigned chromatographic peaks and the as.character call on that during export is not formatting it correctly.

gmhhope commented 3 years ago

Thanks very much for the reply!

jorainer commented 3 years ago

I'm closing the issue now - feel free to re-open if necessary