Discrepency in data analysis

Hi Xia Lab members,

I am currently working on an analysis using the MetaboAnalyst package Version 3.3.0 in R.
I am currently performing an enrichment analysis with the following code:

with KEGG-Pathway

tmp.vec ← df$Match
mSet ← InitDataObjects(“pktable”, “msetora”, FALSE)
mSet ← Setup.MapData(mSet, tmp.vec)
mSet ← CrossReferencing(mSet, “name”)
mSet ← CreateMappingResultTable(mSet)
mSet ← SetMetabolomeFilter(mSet, F)
mSet ← SetCurrentMsetLib(mSet, “kegg_pathway”, 1)
mSet ← CalculateHyperScore(mSet)
mSet ← PlotORA(mSet, “test1”, “bar”, “png”, 400, width=NA)

here the stats look like

**Purine metabolism**	65	0.296	3	0.00224	0.188	0.188

with SMPDB-Pathway
tmp.vec ← df$Match
mSet ← InitDataObjects(“pktable”, “msetora”, FALSE)
mSet ← Setup.MapData(mSet, tmp.vec)
mSet ← CrossReferencing(mSet, “name”)
mSet ← CreateMappingResultTable(mSet)
mSet ← SetMetabolomeFilter(mSet, F)
mSet ← SetCurrentMsetLib(mSet, “kegg_pathway”, 1)
mSet ← SetCurrentMsetLib(mSet, “smpdb_pathway”, 1)
mSet ← CalculateHyperScore(mSet)
mSet ← PlotORA(mSet, “test1”, “bar”, “png”, 400, width=NA)
Here the stats look like

**Purine Metabolism**	74	0.505	3	0.0102	1	1

When I attempted the same in webserver the results for KEGG is same as in R but for SMPDB the total background metabolites changed from 74 to 63 for the same input. May I know any specific reason?
I am trying to see the difference of metabolites.

**Purine Metabolism**	3/63	0.0040572	2.3918	0.40167	0.40167	0.047291

Also When we try to see how many are common metabolites in this case we found only 20 metabolites are common for Purine Metabolism.
Can you please elaborate the same.

Regards,
Devender

May be related to R session overload (i.e. some values overwrite each other). You try a clean R session to test .

Hello Xia,
I just tried again with the same code in new terminal. I am getting the same results as earlier.

mSet$analSet$ora.mat
                                      total expected hits  Raw p Holm p FDR
Purine Metabolism                        74   0.5050    3 0.0102      1   1

with SMPDB I am seeing this variation and I am not able to set SMPDB without first using KEGG can you share some information on this as well.

mSet ← SetCurrentMsetLib(mSet, “kegg_pathway”, 1)
mSet ← SetCurrentMsetLib(mSet, “smpdb_pathway”, 1)