Using imported R table for analysis using ANCOM

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 linkhere, 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 (1.5 KB) silva_nochloronomito_otu_table.txt (4.1 MB)

Thanks in advance!

Hi @stephlei!

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

@thermokarst
silva_nochloronomito_taxa_table.tsv (3.4 MB)

Thanks @stephlei!

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 on the table, then re-running the ancom command. Let us know how it goes! :qiime2:

@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"' ...

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.

1 Like

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