You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm able to run the ancombc() function and get the results data frame, but I'm still having difficulty interpreting the data. I have two groups in a column entitled "dam". The groups are WT and AD. I think that because AD is alphabetically first, a positive lfc would mean that WT > AD? If this is true, how can I change this? I'd like to plot the volcano plot as how the AD look relative to the WT. My code for the ancom, data frame and volcano plot are below (ps = phyloseq object).
ggplot(results_ancom_bc, aes(x = as.numeric(lfc), y = -log10(as.numeric(q_value)))) +
geom_point() +
labs(x = "Log2 Fold Change", y = "-log10(p-value)",
title = "Volcano Plot") +
geom_vline(xintercept = 0, linetype = "dashed", color = "gray") +
theme_bw()`
NOTE: I am very novice at R, so I apologize if the answer is obvious. I did try searching for similar questions and I saw one answer showing how to potentially manually change it, but I can't understand their solution (I don't know at what point I would include their code or how to change it to what I need it to be) and they had 3 groups, so I didn't see how to apply it to mine (with only 2 groups).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm able to run the ancombc() function and get the results data frame, but I'm still having difficulty interpreting the data. I have two groups in a column entitled "dam". The groups are WT and AD. I think that because AD is alphabetically first, a positive lfc would mean that WT > AD? If this is true, how can I change this? I'd like to plot the volcano plot as how the AD look relative to the WT. My code for the ancom, data frame and volcano plot are below (ps = phyloseq object).
`out = ancombc(ps, formula = "dam", p_adj_method = "fdr")
results_ancom_bc = data.frame(ASV = rownames(out$res$beta),
lfc = out$res$beta$damWT,
W = out$res$W$damWT,
p_val = out$res$p_val$damWT,
q_value = out$res$q_val$damWT,
Diff_ab = out$res$diff_abn$damWT)
ggplot(results_ancom_bc, aes(x = as.numeric(lfc), y = -log10(as.numeric(q_value)))) +
geom_point() +
labs(x = "Log2 Fold Change", y = "-log10(p-value)",
title = "Volcano Plot") +
geom_vline(xintercept = 0, linetype = "dashed", color = "gray") +
theme_bw()`
NOTE: I am very novice at R, so I apologize if the answer is obvious. I did try searching for similar questions and I saw one answer showing how to potentially manually change it, but I can't understand their solution (I don't know at what point I would include their code or how to change it to what I need it to be) and they had 3 groups, so I didn't see how to apply it to mine (with only 2 groups).
Beta Was this translation helpful? Give feedback.
All reactions