Plugin error from diversity: The table does not appear to be completely represented by the phylogeny

Hi qiime folk,

I ran into this somewhat common error:

Plugin error from diversity:

The table does not appear to be completely represented by the phylogeny.

When I try to run the core-metric code.
But I believe I have an issue that doesn't apply to the normal root of the issue (at least from what I have seen on this forum so far). Obviously I suspected I needed to filter my rep seqs file and then make a new tree. However, that did not work. So I suspect I have feature IDs in my table that aren't present in my rep-seq files. I have merged both of these items from different studies.

If you think my hunch is correct...is there a way to filter table features by rep seq feature IDs? Basically the reverse of filtering your rep seq file by your table file if you catch my drift. I could not find anything on this.
Thank you!
Cheers,
Sam

Maybe qiime feature-table filter-features with --p-exclude-ids or --p-no-exclude-ids? How you get a list of features will be part of the chalange.
https://docs.qiime2.org/2022.8/plugins/available/feature-table/filter-features/

1 Like

Hi Colin,

So just to clarify... Are you saying to run --p-exclude-ids which would make a rep seq file with features NOT present in the otu table. Then I can use that file to make a list of features and then filter them out of table itself?

I would start here, by building a list of feature IDs found in the rep-seqs file. There are many ways to do this. My first thought is to extract the .qza file, then find the rep-seqs file, then use linux commands like cut to extract the IDs that are in this file.

With my 'good' IDs in hand, I would then removing all other IDs from my table like this:

qiime feature-table filter-features \
  --i-table original.table.qza \
  --m-metadata-file list-of-good-IDs-from-rep.seqs.txt \
  --p-no-exclude-ids \
  --o-filtered-table filtered.table.qza

Is this helpful? I'm not sure I totally understood your question.


Edit: Here's a better idea:

You could also use:

qiime fragment-insertion filter-features ...

This will remove any features from the table that are not in the tree.

This works like a charm. Just when you think you know all the qiime functions….

Thank you Colin. lifesaver as always

Edit: For people that have same issue I used the link colin added to filter features instead of the feature IDs method: filter-features: Filter fragments in tree from table. — QIIME 2 2022.8.3 documentation

1 Like

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