Strange results with ANCOM

Hi,

First time using ANCOM and I'm trying to diagnose some funny results. In looking at the 'ancom.csv', I am seeing 0 for all the values in the 'W' column, and False for all the values in the 'Reject null hypothesis' column.

I am using the Python implementation and running it as such:

from qiime2.plugins import composition

pseudo_counts = composition.methods.add_pseudocount(table=q_table)

ancom_well = composition.actions.ancom(table=pseudo_counts.composition_table,
metadata=q_metadata)
ancom_well.visualization.save('grouped')

and then looking at the .../data/ancom.csv file to get the values out. The 'q_table' variable is created from a pandas DataFrame with samples by features as the values, which is then passed to the qiime2 Artifact import_data function. 'q_metadata' is created from passing the sample metadata DataFrame with one specific column to the MetadataCategory constructor.

If anyone could provide some insight into these results, that would be very helpful. Hopefully, I didn't introduce a bug somewhere!

Unfortunately I cannot share the actual data due to confidentiality.

Thanks in advance!

2 Likes

Hi @ppliu, to diagnose this problem a little further, could you run the following code

import qiime2
import pandas as pd

table = pseudo_counts.composition_table.view(pd.DataFrame)
res = ancom(table, q_metadata, multiple_comparisons_correction=None)

It is possible that the thresholds are too stringent for this particular dataset, and will need to use the original implementation in skbio to tune them.

Let me know how this works.

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.