FrederickHuangLin / ANCOMBC

Differential abundance (DA) and correlation analyses for microbial absolute abundance data
https://www.nature.com/articles/s41467-020-17041-7
104 stars 28 forks source link

Visualization the output of ancombc2 #254

Open J5886 opened 6 months ago

J5886 commented 6 months ago

Hi @FrederickHuangLin,

thanks for this wonderful differential tool, I've tried a lot to visualize the output of ancombc2 as a volcano plot but got an error

the command used is with(pp, plot("lfc_Statuscontrol", -log10("q_Statuscontrol"), pch=20, main="Volcano plot"))

Error in eval(substitute(expr), data, enclos = parent.frame()) : invalid 'envir' argument of type 'character

the output of ancombc2 (pp) Taxon lfc_Statuscontrol q_Statuscontrol gLachnospira 1.842487 0.0240705 gDorea 1.662488 0.0184713 gBifidobacterium -2.125457 0.0350155 gRuminococcus 2.184326 0.0225421 gClostridium -2.305637 0.0415318 gRothia -3.303175 0.0134374

I've followed the tutorial "ANCOM-BC Tutorial" part of Visualization for age df_age = res_prim %>% dplyr::select(taxon, ends_with("age")) df_fig_age = df_age %>% dplyr::filter(diff_age == 1) %>% dplyr::arrange(desc(lfc_age)) %>% dplyr::mutate(direct = ifelse(lfc_age > 0, "Positive LFC", "Negative LFC"), color = ifelse(passed_ss_age == 1, "aquamarine3", "black")) but, some data included in that command are not available in my output (the column passed_ss)

any suggestions are highly appreciated

Regards

<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

Maggie8888 commented 5 days ago

Could you please provide the information for your res_prim object ?