Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mantel test and Pearson's correlation #393

Open
johagcoria opened this issue Aug 7, 2024 · 1 comment
Open

Mantel test and Pearson's correlation #393

johagcoria opened this issue Aug 7, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@johagcoria
Copy link

Hi,

I have a question about Mantel test and Pearson's correlation.

I have a taxonomic profile of soil samples, I have calculated the alpha and beta diversity using Microeco. Then I ran a differential abundance test to evaluate my factors. Now I have selected only those bacterial genera involved in biological nitrogen fixation that had statistical significance in the treatment factor. Now I want to know if there is a correlation between the physicochemical properties of the soils, but I think that Microeco only allows this analysis with the most abundant genera, so what I have done is to select the counts of the significant genera and recreate the microtable object. However, as these correlations are calculated based on beta diversity, I am not sure if this analysis can be done in this way. Can you help me understand if this is correct? Or in any case, tell me if there is a way to select only the taxa that were significant and not the most abundant ones to do the analysis.

Thank you very much.

@ChiLiubio
Copy link
Owner

Hi. For the pearson correlation, please follow this example in the tutorial:

library(microeco)
library(magrittr)
data(dataset)
data(env_data_16S)

t2 <- trans_diff$new(dataset = dataset, method = "rf", group = "Group", rf_taxa_level = "Genus")
t1 <- trans_env$new(dataset = dataset, add_data = env_data_16S[, 4:11])
# provide taxa names to other_taxa param
t1$cal_cor(use_data = "other", other_taxa = t2$res_diff$Taxa[1:20])
t1$plot_cor()

@ChiLiubio ChiLiubio added the documentation Improvements or additions to documentation label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants