# Retaining mantel test output data

**URL:** https://forum.qiime2.org/t/retaining-mantel-test-output-data/7995
**Category:** User Support
**Created:** [January 24, 2019, 8:30pm UTC](https://forum.qiime2.org/t/retaining-mantel-test-output-data/7995 "2019-01-24T20:30:34Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![devonorourke](https://forum.qiime2.org/user_avatar/forum.qiime2.org/devonorourke/32/3110_2.png) [@devonorourke](https://forum.qiime2.org/u/devonorourke)
#### Post date: [January 24, 2019, 8:30pm UTC](https://forum.qiime2.org/t/retaining-mantel-test-output-data/7995/1 "2019-01-24T20:30:34Z")

</div>

Is there a way to export the underlying data points presented in the output of `qiime diversity mantel`?  
It looks like the .qzv only retains the image file, whereas other visualization files often contain the underlying data structure used to generate the plots.

Thanks!

---

<div class="post-metadata">

### Author: ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)
#### Post date: [January 28, 2019, 2:20pm UTC](https://forum.qiime2.org/t/retaining-mantel-test-output-data/7995/2 "2019-01-28T14:20:13Z")

</div>

Hi @devonorourke,  
No, it looks like there is no way to download those values. I would raise an issue for this, but I think there are two reasons why the data aren't available in that visualization: 1) this would be a lot of data to store in that visualization, as there would be many, many points, and 2) those data would just be redundant, since they are the exact same data that you have in your distance matrices.

You should be able to replicate this easily enough in R (or python): load both matrices and flatten them to 1D arrays, merge into a 2D array based on the index, and rock and roll. 🎸

---

<div class="post-metadata">

### Author: ![devonorourke](https://forum.qiime2.org/user_avatar/forum.qiime2.org/devonorourke/32/3110_2.png) [@devonorourke](https://forum.qiime2.org/u/devonorourke)
#### Post date: [January 28, 2019, 7:38pm UTC](https://forum.qiime2.org/t/retaining-mantel-test-output-data/7995/3 "2019-01-28T19:38:27Z")

</div>

Hi @Nicholas_Bokulich,  
I ended up wanting to just pull the rho and p-values, rather than all the data points this time (for an ill-advised correlogram plot in this instance 🙂).  
I ended up just using a combination of `grep` and `sed` in a loop to get the data directly from the .html file after exporting each `.qzv`.  
I'm guessing the exact same setup would work fine to pull the points from too.  
Thanks!

---

<div class="post-metadata">

### Author: ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)
#### Post date: [March 1, 2019, 1:38am UTC](https://forum.qiime2.org/t/retaining-mantel-test-output-data/7995/4 "2019-03-01T01:38:29Z")

</div>

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