# Convert beta matrix from Qiita so can be used in QIIME2 for longitudinal first-distances

**URL:** https://forum.qiime2.org/t/convert-beta-matrix-from-qiita-so-can-be-used-in-qiime2-for-longitudinal-first-distances/3374
**Category:** User Support
**Tags:** distance-matrix, import
**Created:** [March 9, 2018, 6:52pm UTC](https://forum.qiime2.org/t/convert-beta-matrix-from-qiita-so-can-be-used-in-qiime2-for-longitudinal-first-distances/3374 "2018-03-09T18:52:21Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Stephanieorch](https://forum.qiime2.org/user_avatar/forum.qiime2.org/stephanieorch/32/4269_2.png) [@Stephanieorch](https://forum.qiime2.org/u/Stephanieorch)
#### Post date: [March 9, 2018, 6:52pm UTC](https://forum.qiime2.org/t/convert-beta-matrix-from-qiita-so-can-be-used-in-qiime2-for-longitudinal-first-distances/3374/1 "2018-03-09T18:52:21Z")

</div>

I ran my beta diversity command in Qiita and downloaded the .tsv matrix file so I could use it to run the longitudinal first-distances in QIIME2. However, when I try to run it, I get this error: distance-matrix\_unweighted\_skin.tsv is not a QIIME archive. So I attempted to convert the tsv file to a biom file but I get the error: column index exceeds matrix dimension. Then I converted the tsv to a txt file and tried to use that to create a biom table but I got the same error. Any ideas on what I can do to use this artifact to run this QIIME2 command? 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: [March 9, 2018, 8:46pm UTC](https://forum.qiime2.org/t/convert-beta-matrix-from-qiita-so-can-be-used-in-qiime2-for-longitudinal-first-distances/3374/2 "2018-03-09T20:46:30Z")

</div>

> [@Stephanieorch](#):
>
> So I attempted to convert the tsv file to a biom file but I get the error: column index exceeds matrix dimension.

Distance matrices are not biom tables. You need to import these as a `DistanceMatrix`.

Try this:

```auto
qiime tools import \
  --input-path distance-matrix.tsv \
  --type 'DistanceMatrix' \
  --output-path distance-matrix.qza

```

@antgonza may have further insight — I do not know the specific format of distance matrices that are output by QIITA.

---

<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: [April 10, 2018, 2:46am UTC](https://forum.qiime2.org/t/convert-beta-matrix-from-qiita-so-can-be-used-in-qiime2-for-longitudinal-first-distances/3374/3 "2018-04-10T02:46:32Z")

</div>

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