Procrustes error

Hey there @turtleonaleash! :turtle:

The problem here is that the sample IDs need to be the same in both bray_curtis_pcoa_results_initial.qza and bray_curtis_pcoa_results_final.qza in order for this viz to work. One way to do that is to relabel the sample ids in your filtered feature tables.

# Example QIIME 2 Sample Metadata
sample-id	time		pairingid
a		initial		sample1
b		final		sample1
c		initial		sample2
d		final		sample2
e		initial		sample3
f		final		sample3
# create "initial" feature table
qiime feature-table filter-samples \
    --i-table table.qza \
    --m-metadata-file md.tsv \
    --p-where "time='initial'" \
    --o-filtered-table initial-table.qza
# this file should have samples a, c, e

# create "final" feature table
qiime feature-table filter-samples \
    --i-table table.qza \
    --m-metadata-file md.tsv \
    --p-where "time='final'" \
    --o-filtered-table final-table.qza
# this file should have samples b, d, f

# relabel sample ids in initial table
qiime feature-table group \
    --i-table initial-table.qza \
    --p-axis sample \
    --m-metadata-file md.tsv \
    --m-metadata-column pairingid \
    --p-mode sum \
    --o-grouped-table initial-table-relabeled.qza
# this file should have samples sample1, sample2, sample3 (corresponding to a, c, e)

# relabel sample ids in final table
qiime feature-table group \
    --i-table final-table.qza \
    --p-axis sample \
    --m-metadata-file md.tsv \
    --m-metadata-column pairingid \
    --p-mode sum \
    --o-grouped-table final-table-relabeled.qza
# this file should have samples sample1, sample2, sample3 (corresponding to b, d, f)

Now, use the newly relabeled tables to run your core-metrics (x2) (don't forget to choose the same even sampling depth). Also, you will need to create a new metadata file for this step, one with the new "pairingid" as your main "id" column.

Keep us posted! :qiime2: :t_rex:

2 Likes