I get an error saying βThe following ID(s) are not present in the MetadataColumn: β1β, β2β, β3β, β4β, β5β, β6β, β7ββ These numbers are the only ages I have in my metadata. Iβm not sure what the issue is.
My goal is to create a heat map that looks at the average of samples at each age rather than at every sample individually. Thank you!
Ah - I think I know what is going on here! It looks like the feature table's IDs are being converted to strings ('1', '2', '3'..., this is because they are being "promoted" to sample identifiers in the new table), but in your metadata column (age) they are being coerced to numbers (1, 2, 3..., note there aren't quotes around each number). The easiest fix I can think of is to explicitly set the type of the age column in your metadata file to categorical - this will force QIIME 2 to interpret those values as strings, instead of numbers, which should get things moving along for you.
Yep - the recommendation I provided above just requires you to add one new line to your metadata file - this can be done without changing anything in your analysis.
No, just fix your metadata, then run the heatmap visualization - those should be the only things you would need to do to get moving again!
Thanks! I added the additional line to my metadata and made sure age was listed as categorical but am still receiving this error:
Plugin error from feature-table:
The following IDs are not present in the metadata: '1', '2', '3', '4', '5', '6', '7'
Debug info has been saved to /var/folders/n8/0xt_lgk564l03t70txcj45xc0000gn/T/qiime2-q2cli-err-sha_hw_u.log
Oh wait, I just re-read your post - you donβt need to provide metadata to your heatmap command, since you have already grouped your samples by age. You have two options:
a) group table:
qiime feature-table group \
--i-table "$BIOM.qza" \
--p-axis "sample" \
--m-metadata-file "merge.tsv" \
--m-metadata-column "age" \
--p-mode "mean-ceiling" \
--output-dir "$BIOM-mean.qza"
# no metadata provided to heatmap since your sample
# ids in your grouped table are your ages
qiime feature-table heatmap \
--i-table "$BIOM-mean.qza/grouped_table.qza" \
--output-dir "$BIOM-heatmap"
b) donβt group table:
# no grouping step - go straight from your original table to a heatmap
qiime feature-table heatmap \
--i-table "$BIOM.qza" \
--m-metadata-file "merge.tsv" \
--m-metadata-column "age" \
--output-dir "$BIOM-heatmap"