zellerlab / siamcat

R package for Statistical Inference of Associations between Microbial Communities And host phenoType
https://siamcat.embl.de/
51 stars 16 forks source link

How do you determine which features are the top one? #43

Closed fernando-aq closed 1 year ago

fernando-aq commented 1 year ago

Hi, I want to manually plot the result from your association.plot() function using GGPLOT2.

I managed to extract the data from the siamcat object, but confused about which feature represents the top 20 of the test. Is it sorted based on the highest absolute fold change? or the p adj value? or taking into account both?

Say I ran the code below code: association.plot(siamcat_object, sort.by = 'fc', fn.plot = NULL, max.show = 20, panels = c('fc', 'auroc'))

When I sort the data obtained by extracting from the siamcat object, the result did not give the same order as what is plotted using the function association.plot()

fernando-aq commented 1 year ago

Hello there?

jakob-wirbel commented 1 year ago

which order did you get when you sort it outside of SIAMCAT? Usually the top 20 features are taken based on the p-value, and then sorted by fold change

fernando-aq commented 1 year ago

I ordered the features with padj value below the 0.05 or 0.01 depending on the association.test function.