problems to interpret beta-group-significance

Good Morning:
I'm having some problems interpreting the results of my study. I have studied the colonization of microorganisms on different substrates at the exit of two treatment plants. The whole process has gone well, until I have come to analyze beta diversity. For this I have obtained the distance_bray_curtis_matrix by:
qiime diversity core-metrics-phylogenetic
--i-phylogeny Cantoblanco/tree/cantoblancorooted-tree.qza
--i-table Cantoblanco/dada2/cantoblancotable-dada2.qza
--p-sampling-depth 70940
--m-metadata-file Cantoblanco2019-sample-metadata.tsv
--output-dir Cantoblanco/core-metrics-results3
Obtaining this graphic representation:
bray_curtis_emperor.qzv (798.0 KB)

Looking at the data, I have seen that two large groups can be distinguished depending on the place of sampling ("Place" in metadata). Taking this into account, I have resorted to making a PERMANOVA having the place as reference, by means of the following command:

qiime diversity beta-group-significance
--i-distance-matrix Cantoblanco/core-metrics-results3/bray_curtis_distance_matrix.qza
--m-metadata-file Cantoblanco2019-sample-metadata.tsv
--m-metadata-column Place
--p-method permanova
--p-pairwise
--p-permutations 9999
--o-visualization Cantoblanco/betabray/betabraypairwise

Obtaining this output:
betabraypairwisePlace.qzv (323.7 KB)

That shows that yes, the place is a significant factor. Then, I wanted to check for pairs if the same substrate, being of different place, is statistically different (logical seeing the previously obtained). Each substrate had three replicas per place to be statistically significant (I attached the command and the file):

qiime diversity beta-group-significance

--i-distance-matrix Cantoblanco/core-metrics-results3/bray_curtis_distance_matrix.qza

--m-metadata-file Cantoblanco2019-sample-metadata.tsv

--m-metadata-column Sample1

--p-method permanova

--p-pairwise --p-permutations 9999

--o-visualization Cantoblanco/betabray/betabraypairwisesample1.qzv

And I obtained that output:
betabraypairwisesample1.qzv (1.5 MB)

But I get it, although the upper graphs indicate otherwise. With everything explained I have several questions. First of all, if I am using this command correctly and correctly understanding the results, or there is a better statistical method. Also, what exactly represent the graphics? What does the value of N means and why does it oscillate between samples if the groups always consist of three replicas? Why, if I compare the groups in pairs, there are no differences and if I compare them by place if, when the graphs, those big differences are appreciated?
Thanks in advance:
Sergio

1 Like

Hello Sergio!

Sorry for the delay in getting back to you. You have a lot of good questions! I'm not sure I can answer them all, but I wanted to start the conversation.


Cool study! :potable_water: :microbe: :petri_dish:

By looking at the Emperor plot, I agree that 'Place' is a huge factor for PC1, which accounts for 63.35% of variation in bray-curtis dissimilarities. I think your use of PERMANOVA is good, and I agree with your interpretation of the results. :+1:


Now for the hard bit:

This might be a bit tricky to test with PERMANOVA (or the results will be hard to interpret). I would suggest trying this plugin:
https://docs.qiime2.org/2019.1/plugins/available/longitudinal/pairwise-differences/
From the documentation:

Sample pairs may represent a typical intervention study, e.g., ... identical
samples receiving different two different treatments.

That sounds like what you have; identical substrates placed into different places.

Let me know how the longitudinal plugin works for you.

Colin

2 Likes

Thank you so much for the idea. The main problem is that when executing the script in the following way I get this error:
qiime longitudinal pairwise-differences
–m-metadata-file microplasticossinfg-sample-metadata.tsv
–m-metadata-file bray_curtis_distance_matrix.qza
–p-metric bray_curtis
–p-group-column Place
–p-state-column Polymer
–p-state-1 PLA
–p-state-2 PHB
–p-no-parametric
–p-replicate-handling random
–o-visualization PLAPHBpairwise-differences.qzv
There was an issue with viewing the artifact microplasticsall/core-metrics-results3/bray_curtis_distance_matrix.qza as QIIME 2 Metadata:

Artifact <artifact: DistanceMatrix uuid: fea70641-b54b-4624-91bf-aa680ec2132e> cannot be viewed as QIIME 2 Metadata.

What can I do? or maybe i have to use Pairwise distance comparisons?
One question more, Is there any option to include the replicas in this result?
Thank you:
Sergio

1 Like

also the problem is that I want to evaluate several substrates (polymers) belonging to the same place (place) to be able to compare them. I'll copy the simplified mapping file to see if it helps explain.microplasticos2 - sample-metadata.tsv (17.6 KB)

1 Like

Can you use your bray curtis PCoA results here, instead? Those are viewable as metadata, but I am not quite sure if that is really what you want.

no, the command does not give an error, but the display is empty

if you want to look at paired-sample distances (i.e. same type of test but using a distance matrix as input) you should use pairwise-distances instead.

would you mind sharing the QZV?

Yes of course.
pairwise-distances.qzv (271.9 KB)
The problem is that I think I misread how to use the script.
Taking into account the metadata that I have spent you can see that there are two "place" Cantoblanco and Guadalajara. Taking this into account, in each place there are 9 different samples (PLA, PHB, PCL, POM, PS, LDPE, PET, Glass, water) in the metadata would be Sample 3. What would interest me is to compare in pairs those same samples in each place to see if the microbial communities are significantly different.
How can I do?

Correct. No samples are being plotted because there are no paired replicates appearing in each "state" (since you used "polymer" as the state).

It sounds like what you really want is to make "polymer" the group and "place" the state. state_1= Cantoblanco and state_2= Guadalajara

You can use that with either pairwise-differences or pairwise-distances.

I am not sure how to handle the technical replicates, since the sample pairs you want to make are not true pairs (such as in a longitudinal study where the same physical object is sampled at 2 different times); so maybe just group the replicates (qiime feature-table group) prior to this test.

But I have a better proposal. Again, your samples are not actually really paired samples so this is a slightly unusual use of this test. A better test for this exists: multi-way PERMANOVA (adonis). Something like this:

qiime diversity adonis \
  --i-distance-matrix Cantoblanco/core-metrics-results3/bray_curtis_distance_matrix.qza \
  --m-metadata-file Cantoblanco2019-sample-metadata.tsv \
  --p-formula 'Place*polymer' \
  --o-visualization Cantoblanco/core-metrics-results3/adonis-results.qzv

That will tell you whether beta diversity is impacted by place, polymer, and the interaction of the two, i.e., do different polymers behave differently in different places?

You can also find lots of information online about interpreting the results of adonis tests, but use the R vegan-adonis documentation as a starting point.

Good luck!

2 Likes

Thank you very much for your help
But, what would be the difference between making a PERMANOVA from an adonis?
And then it is impossible to know if within the same place there are significant differences between polymers? or for that, should I consider each place separately and perform a permanova?

PERMANOVA and adonis are the same test. The difference here is that beta-group-significance performs a one-way PERMANOVA only, while adonis supports multiple effects through the use of a formula.

You have many polymers you are testing, so I would recommend going in a stepwise fashion.

  1. Run adonis
  2. If polymer:place interaction is not significant, stop there
  3. If it is, look at your PCoA to figure out which place has significant polymer effects (maybe both)
  4. filter your feature table to contain only that place
  5. run beta-group-significance with the pairwise option and polymer as the metadata-column. This will run pairwise tests between each polymer to see which differ in that place.

Good luck!

1 Like

thank you very much for everything but I have an error with the script that you give me of Adonis and I don´t understand this.
Plugin error from diversity:

Command ‘[‘run_adonis.R’, ‘/tmp/tmpwfl147hm/dm.tsv’, ‘/tmp/tmpwfl147hm/md.tsv’, ‘Place*Polymer’, ‘999’, ‘1’, ‘/tmp/qiime2-temp-7gq6fz5r/adonis.tsv’]’ returned non-zero exit status 1.

Can you please run:

qiime tools inspect-metadata Cantoblanco2019-sample-metadata.tsv

This will help us verify that you have formatted your formula string appropriately. Thanks!

Yeah the correct name of the metadata file that I finally use is this:
microplasticossinfg-sample-metadata.tsv (22.5 KB)

And this is the script that you said:

COLUMN NAME TYPE
===================================== ===========
BarcodeSequence categorical
LinkerPrimerSequence categorical
Mergedereplicados categorical
Sample categorical
Polymer categorical
PLAPHB categorical
Mergeagua categorical
Mergewater categorical
Sample1 categorical
Sample2 categorical
Sample3 categorical
Place categorical
Material categorical
Materialplace categorical
Material2 categorical
Material3 categorical
Material4 categorical
Degradability categorical
Contact angle numeric
Form categorical
Density (grames per cubic centimetre) numeric
Bouyancy categorical
Color categorical
Average size (mm) numeric
Aditives categorical
Principal Use categorical
Monomer categorical
Origin categorical
General categorical
Filtrado categorical
Description categorical
===================================== ===========
IDS: 58
COLUMNS: 31

If you are not already using version 2019.4, please install the latest version of QIIME 2. That release contains some minor bug fixes for the adonis action.

If you are still receiving this error with 2019.4, please share the complete error message (run the command using the --verbose flag).

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