# Using imported R table for analysis using ANCOM

**URL:** https://forum.qiime2.org/t/using-imported-r-table-for-analysis-using-ancom/12765
**Category:** User Support
**Created:** [December 5, 2019, 9:04pm UTC](https://forum.qiime2.org/t/using-imported-r-table-for-analysis-using-ancom/12765 "2019-12-05T21:04:58Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![stephlei](https://forum.qiime2.org/user_avatar/forum.qiime2.org/stephlei/32/7077_2.png) [@stephlei](https://forum.qiime2.org/u/stephlei)
#### Post date: [December 5, 2019, 9:04pm UTC](https://forum.qiime2.org/t/using-imported-r-table-for-analysis-using-ancom/12765/1 "2019-12-05T21:04:58Z")

</div>

First I just want to start off by saying that I am very new to qiime. I was recently sent an OTU table, Taxonomy Table, and metadata.txt file that were generated from Phyloseq in R. I have had success importing these files following this link[here](https://forum.qiime2.org/t/importing-dada2-and-phyloseq-objects-to-qiime-2/4683), so that now I have an FeatureTable[Frequency] from my OTU table, and a FeatureTable[Taxonomy] from my taxon table. Now I am trying to run an ANCOM analysis using these files. I have transformed the original OTU frequency table into a FeatureTable[Composition] as per the Moving Pictures tutorial. However when I actually try to run the ANCOM plugin I get an error saying that "  
The following IDs are not present in the metadata" and it lists a humongous list of sequences. However in both the OTU table and the metadata the sampleids are not classified as the sequence. I am confused as what steps to take and any help would be appreciated.

I am running the command

qiime composition ancom --i-table comp\_otu.qza --m-metadata-file metadata.txt --m-metadata-column Branch --o-visualization testViz.qzv

These are the files that I am using. This is the OTU table prior to importing to qiime.  
[metadata.txt](https://forum.qiime2.org/uploads/short-url/pv6oKaNHtmGWQKpMaDCai0rWOmr.txt) (1.5 KB) [silva\_nochloronomito\_otu\_table.txt](https://forum.qiime2.org/uploads/short-url/cxnEoPajmj943DS9OTRy0tUjtEK.txt) (4.1 MB)

Thanks in advance!

---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [December 5, 2019, 10:00pm UTC](https://forum.qiime2.org/t/using-imported-r-table-for-analysis-using-ancom/12765/2 "2019-12-05T22:00:09Z")

</div>



---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [December 5, 2019, 10:10pm UTC](https://forum.qiime2.org/t/using-imported-r-table-for-analysis-using-ancom/12765/3 "2019-12-05T22:10:11Z")

</div>

Hi @stephlei!

> [@stephlei](#):
>
> and a FeatureTable[Taxonomy] from my taxon table

Can you share that file, as well? All I see right now is the sample metadata and the OTU table. Thanks!

---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [December 5, 2019, 10:10pm UTC](https://forum.qiime2.org/t/using-imported-r-table-for-analysis-using-ancom/12765/4 "2019-12-05T22:10:13Z")

</div>



---

<div class="post-metadata">

### Author: ![stephlei](https://forum.qiime2.org/user_avatar/forum.qiime2.org/stephlei/32/7077_2.png) [@stephlei](https://forum.qiime2.org/u/stephlei)
#### Post date: [December 10, 2019, 3:22pm UTC](https://forum.qiime2.org/t/using-imported-r-table-for-analysis-using-ancom/12765/5 "2019-12-10T15:22:16Z")

</div>

@thermokarst  
[silva\_nochloronomito\_taxa\_table.tsv](https://forum.qiime2.org/uploads/short-url/b5gjNnMAPiWqtBI8Jc8r9g58RSq.tsv) (3.4 MB)

---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [December 10, 2019, 3:23pm UTC](https://forum.qiime2.org/t/using-imported-r-table-for-analysis-using-ancom/12765/6 "2019-12-10T15:23:17Z")

</div>



---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [December 10, 2019, 10:44pm UTC](https://forum.qiime2.org/t/using-imported-r-table-for-analysis-using-ancom/12765/7 "2019-12-10T22:44:54Z")

</div>

Thanks @stephlei!

> [@stephlei](#):
>
> The following IDs are not present in the metadata" and it lists a humongous list of sequences.

Judging by the data you shared, your feature IDs are sequence strings, right? In that case, it sounds to me like your `FeatureTable[Frequency]` is transposed on to the wrong axis, which is causing the feature IDs to be read as sample IDs. Try running [`feature-table transpose`](https://docs.qiime2.org/2019.10/plugins/available/feature-table/transpose/) on the table, then re-running the ancom command. Let us know how it goes! :qiime2:

---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [December 10, 2019, 10:44pm UTC](https://forum.qiime2.org/t/using-imported-r-table-for-analysis-using-ancom/12765/8 "2019-12-10T22:44:56Z")

</div>



---

<div class="post-metadata">

### Author: ![stephlei](https://forum.qiime2.org/user_avatar/forum.qiime2.org/stephlei/32/7077_2.png) [@stephlei](https://forum.qiime2.org/u/stephlei)
#### Post date: [December 11, 2019, 8:20pm UTC](https://forum.qiime2.org/t/using-imported-r-table-for-analysis-using-ancom/12765/9 "2019-12-11T20:20:05Z")

</div>

@thermokarst unfortunately it is still not recognizing the row names of my metadata.

> Plugin error from composition: The following IDs are not present in the metadata: '"D1P1"', '"D1P2"', '"D1P3"', '"D1S1"', '"D1S2"', '"D1S3"', '"D1T1"', '"D1T2"', '"D1T3"', '"D2P1"' ...

---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [December 12, 2019, 4:34pm UTC](https://forum.qiime2.org/t/using-imported-r-table-for-analysis-using-ancom/12765/10 "2019-12-12T16:34:26Z")

</div>

> [@stephlei](#):
>
> ‘“D1P1”’

Notice the extra quotes? Your `FeatureTable[Frequency]` has quotes around the Sample IDs, which means that your Sample Metadata will need quotes around the Sample IDs. Alternatively (and in my opinion, preferable), remove the quotes from your feature table's sample IDs.

---

<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: [January 12, 2020, 10:34pm UTC](https://forum.qiime2.org/t/using-imported-r-table-for-analysis-using-ancom/12765/11 "2020-01-12T22:34:30Z")

</div>

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