I have used Maaslin3 before but I found this error, I already checked several times the dimensions of the data and the sample names match between the objects.
Let me know if I can provide more details
Thanks
Andrés
I run the test with this
fit_data ← maaslin3(
input_data = df_data,
input_metadata = df_meta,
output = “maaslin3_X0X0”,
fixed_effects = “treatment”
)
2026-04-23 18:01:56.72 INFO::Writing function arguments to log file 2026-04-23 18:01:56.75 INFO::Verifying options selected are valid 2026-04-23 18:01:56.75 INFO::Determining format of input files 2026-04-23 18:01:56.75 INFO::Input format is data samples as rows and metadata samples as rows 2026-04-23 18:01:56.76 INFO::Running selected normalization method: TSS 2026-04-23 18:01:56.92 INFO::Writing normalized data to file XX0000/features/data_norm.tsv 2026-04-23 18:01:56.93 INFO::Filter data based on min abundance, min prevalence, and max prevalence 2026-04-23 18:01:56.93 INFO::Total samples in data: 18 2026-04-23 18:01:56.93 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000 2026-04-23 18:01:56.93 INFO::Max samples allowed with min abundance for a feature not to be filtered: 18.180000 2026-04-23 18:01:56.95 INFO::Total filtered features: 0 2026-04-23 18:01:56.95 INFO::Filtered feature names from abundance, min prevalence, and max prevalence filtering: 2026-04-23 18:01:56.96 INFO::Total features filtered by non-zero variance filtering: 14 2026-04-23 18:01:56.96 INFO::Filtered feature names from variance filtering: Enterobacteriaceae, Bacteroides, Bacteroidetes, Proteobacteria, Lactobacillus, Prevotella corporis, Rikenella, Erysipelotrichaceae, Bacteroidales, Peptostreptococcaceae, Peptococcaceae, Desulfovibrionaceae, Alistipes, Limosilactobacillus 2026-04-23 18:01:56.96 INFO::Writing filtered data to file XX0000/features/filtered_data.tsv 2026-04-23 18:01:56.97 INFO::Running selected transform method: LOG 2026-04-23 18:01:56.97 INFO::Writing normalized, filtered, transformed data to file XX0000/features/data_transformed.tsv 2026-04-23 18:01:56.97 INFO::Applying z-score to standardize continuous metadata Error in `get_vars_ind<-`(x, .Call(C_vtypes, x, 1L), value) : NROW(value) must match nrow(x)
Please find attached the data and metadata files in case you can take a look at them
df_meta ← vroom(“meta.tsv”) %>% column_to_rownames(“D”)
df_data ← vroom(“data.tsv”) %>% column_to_rownames(“D”)
data.tsv (15.4 KB)
meta.tsv (183 Bytes)
`` > fit_data ← maaslin3(
- input_data = df_data,
- input_metadata = df_meta,
- output = “maaslin3_AB0”,
- fixed_effects = “treatment”, # Look at both simultaneously!
- )
2026-04-23 17:49:37.98 INFO::Writing function arguments to log file
2026-04-23 17:49:38.04 INFO::Verifying options selected are valid
2026-04-23 17:49:38.05 INFO::Determining format of input files
2026-04-23 17:49:38.05 INFO::Input format is data samples as rows and metadata samples as rows
2026-04-23 17:49:38.05 INFO::Formula for fixed effects: expr ~ treatment
2026-04-23 17:49:38.05 INFO::Running selected normalization method: TSS
2026-04-23 17:49:38.06 INFO::Creating output feature tables folder
2026-04-23 17:49:38.06 INFO::Writing normalized data to file maaslin3_AB0/features/data_norm.tsv
2026-04-23 17:49:38.06 INFO::Filter data based on min abundance, min prevalence, and max prevalence
2026-04-23 17:49:38.06 INFO::Total samples in data: 18
2026-04-23 17:49:38.06 INFO::Min samples required with min abundance for a feature not to be filtered: 0.000000
2026-04-23 17:49:38.06 INFO::Max samples allowed with min abundance for a feature not to be filtered: 18.180000
2026-04-23 17:49:38.09 INFO::Total filtered features: 0
2026-04-23 17:49:38.09 INFO::Filtered feature names from abundance, min prevalence, and max prevalence filtering:
2026-04-23 17:49:38.10 INFO::Total features filtered by non-zero variance filtering: 14
2026-04-23 17:49:38.10 INFO::Filtered feature names from variance filtering: Enterobacteriaceae, Bacteroides, Bacteroidetes, Proteobacteria, Lactobacillus, Prevotella corporis, Rikenella, Erysipelotrichaceae, Bacteroidales, Peptostreptococcaceae, Peptococcaceae, Desulfovibrionaceae, Alistipes, Limosilactobacillus
2026-04-23 17:49:38.10 INFO::Writing filtered data to file maaslin3_AB0/features/filtered_data.tsv
2026-04-23 17:49:38.10 INFO::Running selected transform method: LOG
2026-04-23 17:49:38.10 INFO::Writing normalized, filtered, transformed data to file maaslin3_AB0/features/data_transformed.tsv
2026-04-23 17:49:38.11 INFO::Factor detected for categorial metadata ‘treatment’. Using as-is.
2026-04-23 17:49:38.11 INFO::Applying z-score to standardize continuous metadata
Error inget_vars_ind<-(x, .Call(C_vtypes, x, 1L), value) :
NROW(value) must match nrow(x) ``
I am using R 4.5.2 and these version of packages
other attached packages:
`[1] maaslin3_1.1.2 pheatmap_1.0.13 microbiome_1.32.0 vegan_2.7-3 permute_0.9-10 phyloseq_1.54.2
[7] lubridate_1.9.5 forcats_1.0.1 stringr_1.6.0 dplyr_1.2.1 purrr_1.2.2 readr_2.2.0
[13] tidyr_1.3.2 tibble_3.3.1 ggplot2_4.0.2 tidyverse_2.0.0loaded via a namespace (and not attached):
[1] gtable_0.3.6 collapse_2.1.6 Biobase_2.70.0 lattice_0.22-9 tzdb_0.5.0 vctrs_0.7.3
[7] tools_4.5.2 generics_0.1.4 getopt_1.20.4 biomformat_1.38.3 stats4_4.5.2 parallel_4.5.2
[13] cluster_2.1.8.2 logging_0.10-108 pkgconfig_2.0.3 Matrix_1.7-5 mirai_2.6.1 data.table_1.18.2.1
[19] RColorBrewer_1.1-3 S7_0.2.1 S4Vectors_0.48.1 lifecycle_1.0.5 compiler_4.5.2 farver_2.1.2
[25] Biostrings_2.78.0 Seqinfo_1.0.0 codetools_0.2-20 pillar_1.11.1 crayon_1.5.3 MASS_7.3-65
[31] iterators_1.0.14 foreach_1.5.2 nlme_3.1-169 tidyselect_1.2.1 digest_0.6.39 Rtsne_0.17
[37] stringi_1.8.7 reshape2_1.4.5 splines_4.5.2 ade4_1.7-24 grid_4.5.2 cli_3.6.6
[43] magrittr_2.0.5 survival_3.8-6 ape_5.8-1 withr_3.0.2 scales_1.4.0 bit64_4.6.0-1
[49] timechange_0.4.0 XVector_0.50.0 otel_0.2.0 bit_4.6.0 igraph_2.2.3 multtest_2.66.0
[55] hms_1.1.4 IRanges_2.44.0 mgcv_1.9-4 rlang_1.2.0 nanonext_1.8.2 Rcpp_1.1.1
[61] optparse_1.7.5 glue_1.8.0 BiocGenerics_0.56.0 vroom_1.7.1 rstudioapi_0.18.0 jsonlite_2.0.0
[67] R6_2.6.1 plyr_1.8.9`