Alpha and beta diversity problem

when i used this command;
qiime diversity beta-group-significance
–i-distance-matrix core-metrics-results/unweighted_unifrac_distance_matrix.qza
–m-metadata-file sample-metadata.tsv
–m-metadata-column Hygienic_level
–o-visualization core-metrics-results/unweighted-unifrac-Hygienic-level-significance.qzv
–p-pairwise
–verbose
this error appeared;
There was an issue with retrieving column ‘Hygienic_level’ from the metadata:

Metadata column ‘Hygienic_level’ is numeric. Option --m-metadata-column expects the column to be categorical.
Hygienic level column is numbered from 1 to 3, so what can i do??
Also when i ran the following command;
qiime diversity beta-group-significance
–i-distance-matrix core-metrics-results/unweighted_unifrac_distance_matrix.qza
–m-metadata-file sample-metadata.tsv
–m-metadata-column Sample_site
–o-visualization core-metrics-results/unweighted-unifrac-Sample-site-significance.qzv
–p-pairwise
–verbose
this error appeared;
Plugin error from diversity:

All values in the grouping vector are unique. This method cannot operate on a grouping vector with only unique values (e.g., there are no ‘within’ distances because each group of objects contains only a single object).
Sample_site column
Sample_site
Endoscopy_unit
Pretoneal_dialysis_unit
Clinics
Main_enterance
Endoscopy_unit
Endoscopy_unit
Clinics_Pharmacy
ICU
Intestinal_catarrhal_unit
Clinics
Surgical_care_unit
Intestinal_catarrhal_care_unit
Pretoneal_dialysis_unit
so, please i need help!!

Hello Soha,

Great questions! I think I can help you answer both of these.

You can tell Qiime to treat these numbers as categories. See this example:

#SampleID Subject BodySite DaysSinceExperimentStart
#q2:types categorical categorical numeric
sample-1 1 gut 20
sample-2 1 tongue 25
sample-3 2 gut 15
sample-4 2 tongue 42

Try adding in that row to your metadata file, and the script should run!


This one is pretty simple. All the values of the column Sample_site are unique. Should they be unique or should there be groups of values?

Let me know what you find!
Colin

2 Likes

@colinbrislawn, you rock - thanks!

One other thing to keep in mind @Soha, is if you have rarefied your table, it is possible that you are only working with a subset of your original samples --- you can double-check using the feature-table summarize command on your rarefied table to see exactly what samples you are working with at that point. Thanks! :t_rex:

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