Hello,
I tried to run maaslin3() with plots as TRUE, but didn’t get any plots at all, nor did I get the all_results.tsv file, even though the maaslin3() function ran and finished.
When I checked the results for abundance and prevalence, everything was fine with the abundance, but the qval_individual column were filled with only NA in the prevalence results.
Then when I tried to run maaslin_write_results(), I have the *Error in order(fit_data$qval_individual) :
the argument 1 is not a vector
*
Here’s my code:
ps.B<-subset_taxa(ps, Domain %in% c(“Bacteria”,“Archaea”) & Phylum != “Cyanobacteria”)
meta<-as.data.frame(sample_data(ps.B))
meta$Station<-factor(meta$Station)
meta$State<-factor(meta$State)
Depth<-as.data.frame(apply(t(matrixA), 1, sum))
Depth$ID_After<-rownames(Depth)
colnames(Depth)[1]<-“reads”
meta<-dplyr::left_join(Depth,meta, by=‘ID_After’)
rownames(meta)<-meta$ID_After
ASV_tab<-as.data.frame(t(otu_table(ps.B)))
fit_out ← maaslin3(input_data = ASV_tab,
input_metadata = meta,
output = “DNA/QIIME2-2025.10/MaAsLin3”,
formula = ‘~ Station*State +reads’,
plot_summary_plot = T,
plot_associations = T)
MaAsLin_res_ab<-fit_out$fit_data_abundance$results
MaAsLin_res_pre<-fit_out$fit_data_prevalence$results
formula_MaAsLin3<-maaslin_check_formula(data = ASV_tab, metadata = meta, input_formula = ‘~ Station*State +reads’)
maaslin_write_results(“DNA/QIIME2-2025.10/MaAsLin3/station7_state”,
fit_data_abundance=MaAsLin_res_ab,
fit_data_prevalence=MaAsLin_res_pre,
random_effects_formula = formula_MaAsLin3,
max_significance = 0.05)