Problem with 'taxa collapse'

Hi @allebiotech,
Sounds like the problem may be that your sample IDs are all numbers? While this is not forbidden in QIIME 2 metadata formats, it is discouraged since it can cause cryptic bugs like this to emerge when some of the underlying packages that QIIME 2 uses cannot handle numeric sample IDs.

If I am wrong, and your sample IDs are not numbers, please ignore what I have to say below and instead do the following:

  1. please report the full error message
  2. please run qiime feature-table summarize on that feature table and share the result here.

If your sample IDs really are all numbers, I recommend changing these to "strings" (i.e., include non-numeric characters in your sample IDs). For example, if your sample IDs are 1, 2, 3, change them to something like s1, s2, s3. You will need to change these both in your feature table and in your metadata. One way to do this (instead of starting over!) is to use group to relabel your sample IDs. Do the following:

  1. Add a new column to your sample metadata file so that it looks like this:
sample-id ... new-id
1 ... s1
2 ... s2
3 ... s3
  1. Use the following command to relabel your feature table samples:
qiime feature-table group \
    --i-table filtered_samples_otu_table.qza \
    --p-axis sample \
    --m-metadata-file sample-metadata.tsv \
    --m-metadata-column new-id \
    --p-mode sum \
    --o-grouped-table new-table.qza
  1. rearrange your metadata file so that the new IDs are at the start of each row. You do not need to save the old ID if you don't want, but I recommend keeping it just in case:
sample-id ... old-id
s1 ... 1
s2 ... 2
s3 ... 3

Good luck!

2 Likes