# Encountering unknown error in ancombc

**URL:** <https://forum.qiime2.org/t/encountering-unknown-error-in-ancombc/27892>\
**Category:** Technical Support\
**Tags:** ancom-bc\
**Created:** [October 9, 2023, 4:35pm UTC](https://forum.qiime2.org/t/encountering-unknown-error-in-ancombc/27892 "2023-10-09T16:35:00Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Infection\_Biology](https://forum.qiime2.org/user_avatar/forum.qiime2.org/infection_biology/32/16829_2.png) [@Infection\_Biology](https://forum.qiime2.org/u/Infection_Biology)\
**Post date:** [October 9, 2023, 4:35pm UTC](https://forum.qiime2.org/t/encountering-unknown-error-in-ancombc/27892/1 "2023-10-09T16:35:00Z")

</div>

Hello fellow qiime2 users,  
I've been trying to figure out differentially abundant microbial population in diabetic patients but facing so many obstacles that I can't figure out alone as a novice metagenomic analyst, so I need your help and I'm attaching all the files I used and errors I got below. For the analysis, I merged my feature and metadata tables, filtered out mitochondrial and chloroplast sequence and now trying to use the final FeatureTable [Frequency] for the qiime composition ancombc to generate a barplot. And somehow I was successful before using the following code:

> qiime composition ancombc   
> --i-table filtered\_final\_table\_old.qza   
> --m-metadata-file metadata\_final.tsv   
> --p-formula Diabetes\_typ   
> --o-differentials differentials.qza  
> --verbose
> 
> qiime composition da-barplot   
> --i-data differentials.qza   
> --o-visualization DA\_diffbar.qzv

files:  
[final\_filtered\_table(old).qza](https://forum.qiime2.org/uploads/short-url/5YFLKfrztXf39Qck8DC9PxbY0hU.qza) (3.1 MB)  
[DA\_diffbar.qzv](https://forum.qiime2.org/uploads/short-url/bGKqTLalzgPw978by8vSlPHUYv0.qzv) (850.4 KB)  
[differentials.qza](https://forum.qiime2.org/uploads/short-url/gXGdLc4CWbX8ygdtkEx2PlAZDZs.qza) (736.5 KB)  
[metadata\_final.tsv](https://forum.qiime2.org/uploads/short-url/eyZwRjO90m4MikO31hNvFQq6EP8.tsv) (708.0 KB)

However, the barplot that I prepared didn't have taxa name and was too large for any good use. so I was trying to resolve how to get past that. I collapsed my table down to phylum and genus level but the tables were now in FeatureTable [composition] format so they couln't be used in the plugin/code I used before.  
[merged\_table\_genus.qza](https://forum.qiime2.org/uploads/short-url/pBVKUTrMQ2RimBQNOJNl4AeXJsz.qza) (673.9 KB)  
[merged\_table\_phylum.qza](https://forum.qiime2.org/uploads/short-url/AdYlvLdesOaEQm15gR3bLd2iJEO.qza) (372.5 KB)

However, now that I'm trying to run the same code I ran before (after a while), I'm 'getting errors no matter what file I use, filtered or unfiltered feature tables also with different metadata.

 ![da_ ancom error 2](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/7/e/7e9fb56cfef5eba85cf3cf401fc6d0abeb0ff9d6.png)  
 ![da_ancom error 3](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/9/29c6738b09b546b3e332d329dcbc66290dc4357a.png)  
 ![da_ANCOM error](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/8/6/869c164437d72a81ebe7bce670045bd3ffe73f36.png)

I've also tried using other codes that I saw in the forum, such as:  
[filtered\_combo\_table.qza](https://forum.qiime2.org/uploads/short-url/gmINL2l2hzoy6lC6s8B9FkiafLF.qza) (3.1 MB)  
[combined\_deblur\_table.qza](https://forum.qiime2.org/uploads/short-url/7TPmzLuaa9xEWwIwxLIjb7rZa1S.qza) (2.9 MB)

> qiime ancombc ancombc --i-table filtered\_combo\_table.qza --m-metadata-file metadata\_final.tsv --p-formula "Diabetes\_typ" --o-differentials da\_test.qza --verbose

And also checked conda list as one post asks, and found something unusual maybe:

 ![da_ancom error 4](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/3/3/333e4c379f5436cca9c9e976e0dfc41432e45ed7.png)

With my deadlines approaching I'm a bit lost so I'd be very grateful if someone could help me solve this mess. I searched for a proper step-by-step tutorial for the analysis but couln't find it anywhere on the documentation or forum, so proper documentation or tutorial would also help.  
Thanks in Advance.

---

<div class="post-metadata">

**Author:** ![Infection\_Biology](https://forum.qiime2.org/user_avatar/forum.qiime2.org/infection_biology/32/16829_2.png) [@Infection\_Biology](https://forum.qiime2.org/u/Infection_Biology)\
**Post date:** [October 10, 2023, 4:57pm UTC](https://forum.qiime2.org/t/encountering-unknown-error-in-ancombc/27892/2 "2023-10-10T16:57:40Z")

</div>

UPDATE:  
I updated my qiime2 environment and was able to resolve the whole error above by using collapsed table for DA test, however,  
[DA\_gen.qzv](https://forum.qiime2.org/uploads/short-url/1hvcilBW4fRtSSaYNsgsV128mC.qzv) (720.1 KB)

there were too many samples to I tried filtering the table using the following code:

> qiime feature-table filter-features-conditionally   
> --i-table filtered\_combo\_table.qza   
> --p-abundance 0.01   
> --p-prevalence 0.30   
> --o-filtered-table filtered\_table\_30.qza

and then collapsed this table:

> qiime taxa collapse   
> --i-table filtered\_table\_30.qza   
> --i-taxonomy combo\_taxonomy.qza   
> --p-level 6   
> --o-collapsed-table col\_tab\_genus\_30.qza

However now that I'm trying to use this table, there's another error-

 ![ancom_new_error](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/7/d/7df5b550ca9b7629b9df2424eccfca0ae424dc6e.png)

I tried to check documentation and added parameter to filter missing value if there was any,

> qiime composition ancombc   
> --i-table col\_tab\_genus\_30.qza   
> --m-metadata-file metadata\_final.tsv   
> --p-formula Diabetes\_typ   
> --p-no-filter-missing TRUE   
> --o-differentials gen\_diff\_30.qza   
> --verbose  
> but the parameter wasn't accepted for some reason.  
> ![para_error](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/a/8/a8c291728c8fc4b559e513d693b41661ecd52aeb.png)

Can someone help me with how to shorten the list of features, or why my filtered table isn't working?

---

<div class="post-metadata">

**Author:** ![lizgehret](https://forum.qiime2.org/user_avatar/forum.qiime2.org/lizgehret/32/17128_2.png) [@lizgehret](https://forum.qiime2.org/u/lizgehret)\
**Post date:** [October 10, 2023, 5:08pm UTC](https://forum.qiime2.org/t/encountering-unknown-error-in-ancombc/27892/3 "2023-10-10T17:08:47Z")

</div>



---

<div class="post-metadata">

**Author:** ![cherman2](https://forum.qiime2.org/user_avatar/forum.qiime2.org/cherman2/32/17129_2.png) [@cherman2](https://forum.qiime2.org/u/cherman2)\
**Post date:** [October 11, 2023, 8:20pm UTC](https://forum.qiime2.org/t/encountering-unknown-error-in-ancombc/27892/4 "2023-10-11T20:20:16Z")

</div>

Hi @Infection_Biology,

> [@Infection\_Biology](#):
>
> However now that I'm trying to use this table, there's another error-
> 
> ![ancom_new_error](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/7/d/7df5b550ca9b7629b9df2424eccfca0ae424dc6e.png)

This looks like you filtered all the samples out. Can you summarize col\_tab\_genus\_30.qza and see if it is empty like I am hypothesizing

---

<div class="post-metadata">

**Author:** ![cherman2](https://forum.qiime2.org/user_avatar/forum.qiime2.org/cherman2/32/17129_2.png) [@cherman2](https://forum.qiime2.org/u/cherman2)\
**Post date:** [October 11, 2023, 8:41pm UTC](https://forum.qiime2.org/t/encountering-unknown-error-in-ancombc/27892/5 "2023-10-11T20:41:37Z")

</div>



---

<div class="post-metadata">

**Author:** ![Infection\_Biology](https://forum.qiime2.org/user_avatar/forum.qiime2.org/infection_biology/32/16829_2.png) [@Infection\_Biology](https://forum.qiime2.org/u/Infection_Biology)\
**Post date:** [October 13, 2023, 2:41pm UTC](https://forum.qiime2.org/t/encountering-unknown-error-in-ancombc/27892/6 "2023-10-13T14:41:15Z")

</div>

Yes, you're absolutely correct.

 ![da_ERROR](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/6/a/6acc28faca7b5a08f3f58a8f6888ddf08bf0733e.png)

Does that mean I don't have any samples with a minimum 30% prevalence?

However when I run this code instead, with manually computed 30% number of my samples it does show a viable feature table.

```auto
qiime feature-table filter-features \
  --i-table filtered_combo_table.qza \
  --p-min-samples 204 \
  --p-min-frequency 50 \
  --o-filtered-table filtered_table_30.qza

qiime feature-table summarize \
      --i-table col_tab_genus_30_freq50.qza \
      --m-sample-metadata-file metadata_final.tsv \
      --o-visualization col_tab_genus_30_freq50.qzv

```

 ![da_Error2](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/3/5/3579acb143e388006c8578d860363f696481873d.png)

Pardon my lack of knowledge, Could you kindly point out the differences here?

---

<div class="post-metadata">

**Author:** ![cherman2](https://forum.qiime2.org/user_avatar/forum.qiime2.org/cherman2/32/17129_2.png) [@cherman2](https://forum.qiime2.org/u/cherman2)\
**Post date:** [October 13, 2023, 2:42pm UTC](https://forum.qiime2.org/t/encountering-unknown-error-in-ancombc/27892/7 "2023-10-13T14:42:41Z")

</div>



---

<div class="post-metadata">

**Author:** ![cherman2](https://forum.qiime2.org/user_avatar/forum.qiime2.org/cherman2/32/17129_2.png) [@cherman2](https://forum.qiime2.org/u/cherman2)\
**Post date:** [October 13, 2023, 4:27pm UTC](https://forum.qiime2.org/t/encountering-unknown-error-in-ancombc/27892/8 "2023-10-13T16:27:10Z")

</div>

Hi @Infection_Biology,

> [@Infection\_Biology](#):
>
> Does that mean I don't have any samples with a minimum 30% prevalence?

I would think that that means that you dont have any features (ASVs/OTUs) that are present in 30% or more of your samples/you dont have any features that are above 1% abundance.

I would try re-running this command

> [@Infection\_Biology](#):
>
> qiime feature-table filter-features-conditionally  
> --i-table filtered\_combo\_table.qza  
> --p-abundance 0.01  
> --p-prevalence 0.30  
> --o-filtered-table filtered\_table\_30.qza

without the --p-abundance parameter. Lets see if that result is more similar to your manual attempt at filtering to 30% prevalence.

---

<div class="post-metadata">

**Author:** ![cherman2](https://forum.qiime2.org/user_avatar/forum.qiime2.org/cherman2/32/17129_2.png) [@cherman2](https://forum.qiime2.org/u/cherman2)\
**Post date:** [October 13, 2023, 4:27pm UTC](https://forum.qiime2.org/t/encountering-unknown-error-in-ancombc/27892/9 "2023-10-13T16:27:19Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)\
**Post date:** [November 13, 2023, 10:27pm UTC](https://forum.qiime2.org/t/encountering-unknown-error-in-ancombc/27892/10 "2023-11-13T22:27:36Z")

</div>

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