Reference Metabolome for MetaboAnalystR

I am seeking clarification about the process of using a reference metabolome for quantitative enrichment analysis in MetaboAnalystR. Do we still need to upload a reference metabolome, or is the R package already only comparing the known/mapped targeted metabolites in the mSet? In this case, should the metabolome filter (“SetMetabolomeFilter”) be set to F or T? What is setting that to T/F doing exactly? In summary, what do we need to do in MetaboAnalystR to make sure we are correctly using an assay-specific reference metabolome?

By default, the reference metabolome will be all the metabolites in the metabolite set library. For instance, if you choose KEGG pathways, the reference metabolome will be all compounds involved in the pathways (usually larger than the metabolome that your platform can cover). When you provide a reference metabolome AND set this to be TRUE, the background will be filtered by your platform.

How to do that in MetaboAnalystR? See the excerpt below copied from the R command history using the web:

6.	mSet<-Setup.HMDBReferenceMetabolome(mSet, "hmdb_list.txt");
7.	mSet<-SetMetabolomeFilter(mSet, T);
8.	mSet<-SetCurrentMsetLib(mSet, "smpdb_pathway", 2);
9.	mSet<-CalculateHyperScore(mSet)

Thank you for your response!

Solved my own follow-up problem for anyone else who is having an issue with the Setup.HMDBReferenceMetabolome code. I didn’t realize it needed to be compound names and not HMDB names, so it kept breaking, but it works fine when I used the already matched compound names instead.