Hello,
So I have a list of metabolites and peak intensities which I'm bring into R for analysis then I need to bring it out again. Unfortunately, R changes the names of my metabolites so that they are syntactically correct
eg. L-Leucine is changed to L.Leucine
this poses a significant hurdle as if I'm to compare to other resources for my analysis the metabolite won't be recognised because of the syntax. The problem is further amplified when the metabolite names get more complicated. I've tried looking for patterns to change the names using awk etc but theres no definitive pattern and I have LOTS of data.
Is there a way to stop R doing this or any method to undo the changes when I bring the data out of R?
(I've already tried check.names = F, and this does not work)
check.names=F
works for me. Also, this is probably better asked at stackoverflowI may try there, but thought I'd post on here just in case anyone has done this kind of analysis with metabolomics data specifically and may have advice.
Regarding there being no definitive pattern, the details are given at the make.names help page
I've tried this already but make.names does not like replicates. It will add ".1" on the end. This is still an issue as I'm comparing multiple sets which may have the same metabolites and comparing e.g L.Leucine.1 in one file to L.Leucine.1 in another does not necessarily mean they are identified as the same. To add another lovely layer of confusion to it all i can't just remove the ".1" as some of the metabolites have ".1" in their name
For completeness, could you please add your R code in your question?