I have some 16s data from 20 patients with the following samples types:
- Swab sample before treatment
- Swab sample after treatment
- Dressing sample before treatment
- Dressing sample after treatment
I have these samples for all 20 patients. What I want to do is run anosim analysis to check if there are significant differences in the diversity between swab and dressing samples both pre and post treatment.
Swab pre treatment vs dressing pre treatment
Swab post treatment vs dressing post treatment
But, I want to do this for each patient individually rather than all swabs pre vs all dressings pre. Is that possible to do? If so, what is the best way to do it?
For a test like anosim you'll need more than one sample per treatment group, otherwise you'll wind up with divide-by-zero errors. If you do have multiple samples per group, then I think this analysis would be possible by splitting you feature table into sub-tables based on the different patients (so one table per patient), computing individual distance matrices using the metric of your choice, and then finally running
diversity beta-group-significance once for each distance matrix (specifying
anosim for the
@jwdebelius might have some additional thoughts on this, I am probably missing something (and I am not a stats person, so please take my advice and suggested workflow with a grain of salt).
I agree with @thermokarst that you cannot run the analysis you'd like to run with ANOSIM because of the error.
I also dont think bulk ANOSIM is the best way to test this. You have this structure that already exists in your data: 4 samples from 20 people. I would assume that people's skin and wounds have individual signatures. So, my skin microbiome is specialized to my location, genetics, diet, etc... and yours is too. I worry that if you use a test that doesn't account for that underlying structure in the data, you're going to re-discover that people's microbiomes look more similar and miss other potentially intreesting things.
So, then, the problem becomes how to deal with nesting. My suggestion would be to look at the paired samples: is the distance between the pre treatment swab and dressing smaller or larger than the post treatment pair. That way, you're controlling for the individual effect, at least on a broader scale. I think you might be able to do something with q2-longitudinal to get there. You might need to re-code your metadata, so person1-pre is both your pre treatment samples, and person1-post are your post treatment, and then making a numeric column that matches swab and dressing (like swab=0, dressing=1, or something.)
There might be better ways, but that would be a first guess for me.
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.