xia-lab / MetaboAnalystR

R package for MetaboAnalyst
Other
307 stars 154 forks source link

Different Fold-change analysis results with the example data #312

Open rocilia opened 2 months ago

rocilia commented 2 months ago

Thank you for developing this useful platform. I'm confused about the fold-change analysis using the example data "human_cachexia.csv", as it shows a totally different results with the tutoria.

Here is my code: library(MetaboAnalystR) mSet<-InitDataObjects("conc", "stat", FALSE) mSet<-Read.TextData(mSet, "https://rest.xialab.ca/api/download/metaboanalyst/human_cachexia.csv", "rowu", "disc") mSet<-SanityCheckData(mSet) mSet<-FC.Anal(mSet, 2.0, 0, FALSE) mSet<-PlotFC(mSet, "fc_0_", "png", 72, width=NA) mSet$analSet$fc$fc.log My results: (Only the first few metabolites are shown because the original result was too long)

mSet$analSet$fc$fc.log 1,6-Anhydro-beta-D-glucose 1-Methylnicotinamide 2-Aminobutyrate -0.1954100 -0.3896700 0.1474700 2-Hydroxyisobutyrate 2-Oxoglutarate 3-Aminoisobutyrate -0.1284500 0.5224200 -0.1579600 3-Hydroxybutyrate 3-Hydroxyisovalerate 3-Indoxylsulfate 0.4698100 0.5433300 -0.0894080 4-Hydroxyphenylacetate Acetate Acetone -0.4816000 0.5679200 -1.0406000

The tutorial:

1,6-Anhydro-beta-D-glucose 1-Methylnicotinamide 0.888690 -0.052019 2-Aminobutyrate 2-Hydroxyisobutyrate 1.312700 0.633520 2-Oxoglutarate 3-Aminoisobutyrate 1.098400 1.329100 3-Hydroxybutyrate 3-Hydroxyisovalerate 1.563700 1.164900 3-Indoxylsulfate 4-Hydroxyphenylacetate 0.857170 0.263810

Thank you so much for your kind help!

rocilia commented 2 months ago

It shows the same result as the tutorial after column-wise normalization. However, as the tutorial recommends, FC is calculated as the ratio between two group means using the data before column-wise normalization was applied. So which method should I choose?