ANCOMBC icon indicating copy to clipboard operation
ANCOMBC copied to clipboard

"longer object length is not a multiple of shorter object length" when running ancombc2

Open fpusan opened this issue 6 months ago • 3 comments

First, thanks for developing and maintaining this amazing tool!

I got warnings while running ancombc2 with the following command. These happened with my dataset, but not with the example datasets in https://bioconductor.org/packages/release/bioc/vignettes/ANCOMBC/inst/doc/ANCOMBC2.html.

ancombc2_out = ancombc2(data = tse,
                        assay.type = 'counts',
                        fix_formula = 'disease',
                        p_adj_method = 'fdr',
                        tax_level = NULL,
                        prv_cut = 0.10,
                        group = 'disease',
                        struc_zero = FALSE,
                        neg_lb = FALSE,
                        global = FALSE)

Warnings look like the following:

1: The group variable has < 3 categories 
The multi-group comparisons (global/pairwise/dunnet/trend) will be deactivated
2: In r0i * beta/nu0 :
  longer object length is not a multiple of shorter object length
3: In r1i * (beta - l1)/(nu0 + kappa1) :
  longer object length is not a multiple of shorter object length
4: In r2i * (beta - l2)/(nu0 + kappa2) :
  longer object length is not a multiple of shorter object length
5: In r0i/nu0 : longer object length is not a multiple of shorter object length
6: In r1i/(nu0 + kappa1) :
  longer object length is not a multiple of shorter object length
7: In r2i/(nu0 + kappa2) :
  longer object length is not a multiple of shorter object length
8: In r1i * (beta - delta)/(nu0 + kappa1) :
  longer object length is not a multiple of shorter object length
9: In r1i/(nu0 + kappa1) :
  longer object length is not a multiple of shorter object length
10: In r2i * (beta - delta)/(nu0 + kappa2) :
  longer object length is not a multiple of shorter object length
11: In r2i/(nu0 + kappa2) :
  longer object length is not a multiple of shorter object length

As far as I can tell there is nothing wrong with my data, and other methods (e.g. NMDS, DESeq2...) are working fine. A summary of my data would be:

class: TreeSummarizedExperiment 
dim: 2661 55 
metadata(0):
assays(1): counts
rownames(2661): Otu0002 Otu0005 ... Otu3034 Otu3035
rowData names(0):
colnames(55): www xxx ... yyy zzz
colData names(221): disease jjj ...
  kkk lll
reducedDimNames(0):
mainExpName: NULL
altExpNames(0):
rowLinks: NULL
rowTree: NULL
colLinks: NULL
colTree: NULL

This happens regardless of whether I input my data as a TreeSummarizedExperiment or a phyloseq object.

fpusan avatar Dec 18 '23 10:12 fpusan