# Questions regarding ANCOM input and output

Hello community, and thank you very much for this wonderful tools and discussion. I’m really learning a lot.
I have two questions regarding differential abundance analysis performed by ANCOM implemented in QIIME2.

1. I have a raw abundance table, and I just summarized this table for genus using tax_glom() implemented in phyloseq, so I have now genus-level absolute abundance table. Is it safe to use this summarized table as input to ANCOM or DESeq2? I think that we should input “raw” count table for these algorithm, but summarized table can also be regarded as “raw”?

2. I performed ANCOM analysis and got output as percentile table. Can I extract whole ANCOM-normalized table from the output? I also tried ANCOM implemented in Python library scikit-bio, but there also seems no function that can extract.

Sincerely,
heimer

2 Likes

Good question! I would like to know the answer too.

Hi @heimer. Concerning your first question, yes, the percentiles are calculated on the raw percentiles. However one should be careful about feeding in raw values, since ANCOM does not play nicely with zeros. Some filtering is necessary before running ANCOM to limit the number of low abundance features that are being fed in. But ANCOM is fairly robust to library-size differences (see this paper), so rarefaction generally isn’t necessary.

Concerning the second question.

Short answer: The ANCOM procedure doesn’t produce intermediate normalized features.

Long answer: The ANCOM inference procedure is tightly coupled with a form of data normalization. The main idea behind ANCOM that the log ratios automatically normalize for sequencing depth.

Think of it this way.

If there are D organisms, for a given organism i, ANCOM will perform D-1 hypothesis tests. An example of a hypothesis test is as follows

H_{0ij}: \mu_{ij,c_1} = \mu_{ij,c_2}

where c_1 and c_2 are different classes being tested for (i.e. treatment and control) and organism j is a different organism that is being compared to organism i. In addition, the means are calculated as follows.

\mu_{ij, c_1} = \frac{1}{|c_1|}\sum\limits_{x \in c_1} \ln \frac{x_i}{x_j}

where x are the samples from class c_1, x_i represents the microbial counts of organism i in sample x and x_j are the microbial counts of organism j in sample x.