Skip to content

Why correlation test of microeco showed different results from the same test using package microbiome? #194

Answered by ChiLiubio
MPNguyen2022 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi. correlation test for relative abundance at Genus level can be done like this easily.

library(microeco)
t1 <- trans_env$new(dataset = dataset, add_data = env_data_16S[, 4:11])
t1$cal_cor(use_data = "Genus", p_adjust_method = "fdr", cor_method = "spearman", p_adjust_type = "Type")
View(t1$res_cor)

The cal_cor function has no matter with the abundance transformation. It just invoke the Genus table in dataset$taxa_abund list. Actually, all the analysis referred to the abundance comes from the dataset$taxa_abund.

If you do not want to use relative abundance, you can recalculate the abundance with the parameter rel. It means the results in each table of dataset$taxa_abund is only the sum …

Replies: 4 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@ChiLiubio
Comment options

Comment options

You must be logged in to vote
3 replies
@ChiLiubio
Comment options

@MPNguyen2022
Comment options

@ChiLiubio
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by MPNguyen2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants