How can get same results after qiime diversity core-metrics-phylogenetic

Hi there,
I used qiime2 (qiime2-2019.4) in my research. By chance, I ran “qiime diversity core-metrics-phylogenetic” several times for the same dataset but can not get the same rarefied tables. I just wonder is it true that every time run “qiime diversity core-metrics-phylogenetic” will get slightly different rarefied tables because of the random permutation process in it? If so, is it possible to fix the random permutation and get reproducible results? Thank you!

The command I used as below:

qiime diversity core-metrics-phylogenetic
–i-phylogeny 3.filtered_DADA2_rep-seqs-rooted-tree.qza
–i-table 3.filtered_DADA2_table.qza
–p-sampling-depth 13000
–m-metadata-file 0.sample-metadata.txt
–output-dir 4.core-metrics-results

qiime tools export
–input-path 4.core-metrics-results/rarefied_table.qza
–output-path outputdir
mv outputdir/feature-table.biom 4.rarefied_table.biom
biom convert -i 4.rarefied_table.biom -o 4.rarefied_table.txt --to-tsv

1 Like

Good afternoon,

That’s right!

I’m not sure how to do that within Qiime 2, but it’s an interesting idea!
(I know you can do this in Phyloseq, or avoid this issue totally using jackknifed PCoA)

Colin

2 Likes

Not yet possible in QIIME 2. We have thrown around the idea of exposing a parameter for setting a random seed to make this reproducible, but I think it is a very low priority because, in general, if you are sampling at a reasonably high rarefaction depth then your results should converge fairly well at that sequencing depth so results should not vary too much. If you rarefy twice and get vastly different results it is a pretty good indication you need to sample at a higher depth!

Such as with qiime diversity beta-rarefaction

4 Likes

@colinbrislawn Thank you.

[quote=“Nicholas_Bokulich, post:3, topic:11831, full:true”]

Not yet possible in QIIME 2. We have thrown around the idea of exposing a parameter for setting a random seed to make this reproducible, but I think it is a very low priority because, in general, if you are sampling at a reasonably high rarefaction depth then your results should converge fairly well at that sequencing depth so results should not vary too much. If you rarefy twice and get vastly different results it is a pretty good indication you need to sample at a higher depth!

@Nicholas_Bokulich Thank you for you reply. I just wonder in some situation, we may need such reproducibility such as for workshop or compare the results from two students. Just a little suggestion for your consideration. Is it possible to add the seed parameter in next version?

2 Likes

No, it is not currently planned for the upcoming 2019.10 release. As @Nicholas_Bokulich said, this is very low priority for us at the moment. Regarding the “workshop” example — we teach QIIME 2 workshops very often, and don’t see this being an issue with the tutorial datasets we use. In fact, the small bit of variability between different runs is a useful talking point for emphasizing what rarefaction is!

1 Like