error with "abims_xcms_retcor"

Hi,

I’m using the metabolomics tools following the tutorial “Mass spectrometry: GC-MS data processing (with XCMS, RAMClustR, RIAssigner, and matchms).” I encountered the following error while running xcms adjustRtime (retcor):

Error in colnames<-(tmp, value = basename(fileNames(object))[subs])

I suspected that the issue might be related to the metadata, so I modified my metadata to match the tutorial’s example and reran the tool. However, I still get the same error.

Could you please advise me on how to resolve this?

Best regards,

Hi @Jelo

This looks like a data problem with me. Meaning, the data inside the file or possibly the dataset name. If you want to share the history and the link to the tutorial step where this is happening, we can help to double check then correct what might be going wrong.

The tutorial data/workflow should all be working without problems and without any special adjustments. But if there is some issue, we can clarify it and fix the tutorial up and get your a workaround for right now.

How to share is in the banner of this forum. Thanks! :slight_smile:

1 Like

History shared directly. This is what we found for anyone else who later has the same message reported. :scientist:

This is the entire message

Error in `colnames<-`(`*tmp*`, value = basename(fileNames(object))[subs]) : 
  attempt to set 'colnames' on an object with less than two dimensions
Calls: adjustRtime ... adjustRtime -> .local -> adjustRtimePeakGroups -> colnames<-
Execution halted

This error means that the tool was expecting data with two dimensions, and it only got one or none for this step. That can be due to format or actual data problems or even content. R is trying to build a data structure and couldn’t for some reason.

If you run xcms process history does everything look as you would expect it to? This tool sort of parses out the content into text a person can read.

But then I ran a search with the tool name and the error message, and found this:

That is reaching the tool authors. They are saying that this can be an actual data result as well. The peaks are too sparse! Evidently the tool is performing a sort of filter, none of the data is passing through the filter, then there isn’t enough data passed through to provide those “two columns” of data to parse with the next step. Maybe try the processing adjustments they are suggesting? That HTML summary should still be useful.

I really do wish tool authors trapped this kind of situation better. Presumably they know all the ways real data will move through their tools, and could trap conditions with a more useful error instead of falling back on the tool technically unable to continue. But, here we are! :slight_smile:

Hope this helps!

1 Like