core-metrics-phylogenetic analyses

Hello! I would like to have some help with some doubts about this analysis.
In the first step, I filtered my samples according to my question. To input the metadata in the core-metrics-analyses I need to rearrange my table metadata leaving just the filtered samples or can I use the sample metadata that I used in the phyloseq step, for example? The other one is about the p-sampling-dept. I saw the minimum feature count in the previous doc from my filter sample and then I put it as my sampling depth and I stayed with all my samples but I don't know if it is the right way. How should I set my sampling depth?

Thank you for helping me!

Hi @Patricia_Azevedo ,

I will try to help you separating my recommendations in topics:

  1. You don't need to alter your metadata. Your filtered-table.qza will work with your metadata, the samples that were discarded will not be afected by their presence in metadata.

  2. I usually set my sampling depth using qiime diversity alpha-rarefaction you can found here the code. I choose my p-max-depth according in what I can see in my feature-table.qzv at the Interactive Sample detail, use the Sampling Depth at the Plot controls, to see when you start to lost a significant number of samples as the sampling depth increases.

  3. After run the qiime diversity alpha-rarefaction , use .qzv output file to see your rarefaction curves, and look if your curves achieved a plateau, if not try to improve your sampling depth, but be careful to not lose too many samples.


Hi João, thank you for your answer!
I did that with the alpha-rarefaction. I choose 1182, which was the minimum found in my filtered table. Apparently, it is ok to use the 1181 parameter for the next step core-metrics phylogenetic. I just don't understand why I can not put this parameter directly in the next step and why I need to do the alpha-rarefaction.

First I did that:

qiime feature-table filter-samples
--i-table table_NoMitClo_Melipona11-2.qza
--m-metadata-file sample-metadata_Melipona11.tsv
--p-where "[LC50] IN ('T0', 'CONTROL') AND [TIME] IN ('0', '24')"
--o-filtered-table table_Melipona11-2_DifT0Con.qza

qiime feature-table summarize
--i-table table_Melipona11-2_DifT0Con.qza
--o-visualization table_Melipona11-2_DifT0Con.qzv

Than I run that commands:

qiime diversity core-metrics-phylogenetic
--i-table table_Melipona11-2_DifT0Con.qza
--i-phylogeny sepptree_Melipona11-2.qza
--p-sampling-depth 1181 \
--m-metadata-file Core-metrics-phylo_metadata_Melipona11-2.tsv
--output-dir CMP_DifT0Cont

And my doubts are about how to choose the p-sampling-deph (I put the minimum count features found in the table before.

Then I did what you said and run the commands:

qiime diversity alpha-rarefaction
--i-table table_Melipona11-2_DifT0Con.qza
--i-phylogeny sepptree_Melipona11-2.qza
--p-max-depth 1182
--m-metadata-file sample-metadata_Melipona11.tsv
--o-visualization alpha-rarefaction_Melipona11-2.qzv

And I had that file:

So can I run directly the core-metrics-phylogenetic and assume the minimum feature count found in the feature table with the samples filtered?

Thanks so much!

Hello again!

Apparently you have a low number of samples (18 if I counted right), so you chose the sampling depth according with the number of features of your sample that had the smaller Feature count, and did not lost any sample, this is good.

We utilize the qiime diversity alpha-rarefaction to visualize the rarefaction curves and observes if there are a curve exponential growth occurring up to the chosen max depth. In your analysis we can see a curve reaching in a plateau, so 1181 have a great coverage of the diversity sampling of your bacterial communities, and it's a reliable sampling depth to set for your qiime diversity core-metrics-phylogenetic.

Thanks for your help João, now I understand.
I have only 18 samples because I filtered a spcific group according with my scientific question.
The best.

1 Like

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