ChiLiubio / microeco_tutorial

Documentation for microeco package
Creative Commons Zero v1.0 Universal
4 stars 3 forks source link

Problem with UpSet analysis #15

Open leocruz29 opened 1 month ago

leocruz29 commented 1 month ago

Dear authors, Thank you for developing the microeco package. This is amazing!

I'm encountering a problem with Venn analysis using UpSet. My dataset contains 36 groups of samples and I am trying to identify a core microbiome. However, the large number of possible combinations (68,719,476,735) seems to be causing problems when creating the object.

The analysis works well with a smaller data set, for example, 18 groups. Do you know how to solve this problem? or indicate a solution that can solve it?

Attached is the error message I receive.

Yours sincerely, Leonardo Couto upset

ChiLiubio commented 1 month ago

Hi. Yes. The combination number is too large to calculate. It may be also hard to see the result with the upset plot. If you want to identify a core microbiome, it is very easy to do with the filter_taxa function in your microtable object.

library(microeco)
data(dataset)
# better to clone one
tmp <- clone(dataset)
tmp$filter_taxa(rel_abund = 0.001, freq = 0.9)

The parameter rel_abund = 0.001 means removing the features with mean relative abundance < 0.001; freq = 0.9 means removing the features with occurrence frequency < 0.9 * sample_number. Then you can analyze the tmp (microtable object) with other methods.

leocruz29 commented 1 week ago

Hello, sorry for the delay in responding, and thank you very much for your reply! I tried other methods, and they worked! Now I have another question: I looked in the tutorial but couldn't find the answer. For example, I have the genus Pseudomonas in high abundance in some treatments but not in others. I would like to compare the abundance of this taxon (or any other) between treatments by applying a statistical test (such as t-test, Wilcoxon, etc.). Is that possible?

ChiLiubio commented 1 week ago

Yes. Please refer to the trans_diff class part in the tutorial. It is easy to do these at genus level.