nuriamw / micro4all

micro4all is a package designed to include functions we use in our workflow analysis for microbiome data.
Other
2 stars 0 forks source link

Problem performing loop #4

Closed Anaherasm closed 2 years ago

Anaherasm commented 2 years ago

Hello, I am Ana, a PhD student who has just started to do bioinformatics. I found this package quite interesant, since I want to performed analysis with 4 treatment groups with ANCOMBC and I have been told to do all possible combinations analysis for the matter. I've tried to run ancomloop, but it doesn't work and I do not understand why. This is the code and the error:

sows_rarefied <- subset_samples(ps_rarefied, group %in% c("Before", "After"))

genus_sows = aggregate_taxa(sows_rarefied, "Genus")

genus_sows_before <- subset_samples(genus_sows, group %in% "Before") genus_sows_after <- subset_samples(genus_sows, group %in% "After")

ANCOMBC_loop_after <- ancomloop(

  • genus_sows_after,
  • "treatment",
  • ancom.options=list(p_adj_method ="holm"),
  • out.unclassified = FALSE,
  • ) [1] "CT" "HT" "VE" "VE_HT" Error in colnames<-(*tmp*, value = paste0(comparison_name, "_beta")) : attempt to set 'colnames' on an object with less than two dimensions

If you need anymore information, please tell me. Thank you in advance, Ana

nuriamw commented 2 years ago

Hello Ana, Thank you for your message, I'm glad the package seems interesting for you! I have been checking the function but it works perfectly with some other data. Would you be so kind to send me your ps_rarefied so I can further test where the error is coming from? My email is nuria.martin@eez.csic.es

Nuria

nuriamw commented 2 years ago

ancomloop function has been updated to deal with new version of ANCOMBC (now the beta index is called lfc).