MaAsLin3 for metagenomic counts - appropriate normalization settings?

I want to look for differentially abundant functions across metagenomes. I got counts from Salmon where I mapped reads to a non-redundant set of annotated bacterial genes and I summed the counts by functional category (here, pfam as a starting point). This count data does not have any zeros.

So my input matrix has the counts for 89 samples and 7771 pfams. MaAsLin3 fails at the linear model step. The error message I get is “Error in l[[1L]] : subscript out of bounds”. Looking at the full log output, I see two things happening: all the features (pfams) are being removed: “Total features filtered by non-zero variance filtering: 7771”. I also see that the normalized data (data_norm.tsv) has the same value repeated for every sample down the columns for each pfam - so the normalization step is causing the issue.

Here is the command I used:

fit_out ← maaslin3(input_data = pfam,
input_metadata = metadata,
output = ‘DA_pfam_SCTLDbeforeoratsampling’,
formula = ‘~ SCTLD_before_or_at_sampling’,
zero_threshold = 0,
min_variance = 0,
normalization = ‘TSS’,
transform = ‘LOG’,
standardize = TRUE,
max_significance = 0.1,
median_comparison_abundance = TRUE,
median_comparison_prevalence = TRUE)

What would be the appropriate normalization and transformation steps for functional (metagenomic) counts where there are no zeros in the original count data?

Hi,

For some reason it thinks that all of your 89 samples have the same value for each of the 7771 pfams, so there’s no sample-to-sample variance in each pfam’s abundance. Would you be able to post or send (willnickols@g.harvard.edu) a chunk of the raw data so I can check if something’s wrong?

Will

I had to go back one more step — the issue is in the original data, so not a MaAsLin3 issue. Back to the drawing board! Sorry for initiating a non-issue.