# Importing .csv to .qza

**URL:** https://forum.qiime2.org/t/importing-csv-to-qza/3920
**Category:** User Support
**Tags:** biom, import, feature-table
**Created:** [April 25, 2018, 3:36pm UTC](https://forum.qiime2.org/t/importing-csv-to-qza/3920 "2018-04-25T15:36:54Z")
**Posts on this page:** 14
**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: [April 25, 2018, 3:36pm UTC](https://forum.qiime2.org/t/importing-csv-to-qza/3920/1 "2018-04-25T15:36:54Z")

</div>

I've downloaded my taxa barplot from Qiita and I can only download it as a .csv file. I'm trying to find how I can convert that to a .qza file but I cannot find it in the current documentation. Can someone send me to the correct import page or send me the correct command? Thank you!

---

<div class="post-metadata">

### Author: ![sejsong](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/s/b19c9b/32.png) [@sejsong](https://forum.qiime2.org/u/sejsong)
#### Post date: [April 25, 2018, 3:48pm UTC](https://forum.qiime2.org/t/importing-csv-to-qza/3920/2 "2018-04-25T15:48:04Z")

</div>



---

<div class="post-metadata">

### Author: ![sejsong](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/s/b19c9b/32.png) [@sejsong](https://forum.qiime2.org/u/sejsong)
#### Post date: [April 25, 2018, 6:20pm UTC](https://forum.qiime2.org/t/importing-csv-to-qza/3920/5 "2018-04-25T18:20:21Z")

</div>

Hi @Stephanieorch ,

This [thread](https://forum.qiime2.org/t/alpha-group-significance/3881) should be of help to you. Could you try `qiime tools import` using `--type 'SampleData[AlphaDiversity]'`?

---

<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: [April 25, 2018, 7:28pm UTC](https://forum.qiime2.org/t/importing-csv-to-qza/3920/6 "2018-04-25T19:28:01Z")

</div>

My .csv file is from running summarize taxa on Qiita. So the using alpha diversity as its semantic type gives me an error sayiing "is not a(n) AlphaDiversityFormat file".

---

<div class="post-metadata">

### Author: ![sejsong](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/s/b19c9b/32.png) [@sejsong](https://forum.qiime2.org/u/sejsong)
#### Post date: [April 25, 2018, 8:11pm UTC](https://forum.qiime2.org/t/importing-csv-to-qza/3920/7 "2018-04-25T20:11:13Z")

</div>

Ok, thanks for trying that out. Actually, it seems the .csv file is just the metadata file with taxa abundances added. So depending on what you want to do, it may not need importing, but rather just use like a metadata file (with conversion to a .tsv and renaming the first column from 'index' to 'sampleid' or equivalent). What are you wanting to do with the file in Qiime2?

---

<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: [April 25, 2018, 8:15pm UTC](https://forum.qiime2.org/t/importing-csv-to-qza/3920/8 "2018-04-25T20:15:29Z")

</div>

I was hoping to use it as the input for --i-taxonomy.

---

<div class="post-metadata">

### Author: ![sejsong](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/s/b19c9b/32.png) [@sejsong](https://forum.qiime2.org/u/sejsong)
#### Post date: [April 25, 2018, 8:48pm UTC](https://forum.qiime2.org/t/importing-csv-to-qza/3920/9 "2018-04-25T20:48:00Z")

</div>

Sorry, I missed the part in your original post that you downloaded the file from **QIITA**. And you're now wanting to use it in **QIIME2**.

First to clarify, the barplot output is not a taxonomy file. The `--i-taxonomy` file for `qiime taxa barplot` contains the taxonomies that have been assigned using some sort of taxonomic classifier on the representative sequences in your feature table (rep-seqs.qza).

To get back to your original problem, it may be avoided by just downloading the full taxa-bar-plots.qzv file. This can be done in qiime2 view by clicking on the download icon on the far right corner of the page (next to the link symbol).

---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [April 25, 2018, 9:03pm UTC](https://forum.qiime2.org/t/importing-csv-to-qza/3920/10 "2018-04-25T21:03:25Z")

</div>



---

<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: [April 26, 2018, 4:19am UTC](https://forum.qiime2.org/t/importing-csv-to-qza/3920/13 "2018-04-26T04:19:21Z")

</div>

Ok, I want to group the samples together so I'll have to do it all in Qiime2. A quick follow up question, how can I go from a biom table on Qiita to a FeatureTable[Sequences] file to be used as the rep-seqs? When I download the biom and import it, it's FeatureTable[Frequency]. How can I convert that to FeatureTable[Sequences]? I'm not sure if this matters, but I am doing this using closed reference data.

---

<div class="post-metadata">

### Author: ![antgonza](https://forum.qiime2.org/user_avatar/forum.qiime2.org/antgonza/32/1236_2.png) [@antgonza](https://forum.qiime2.org/u/antgonza)
#### Post date: [April 26, 2018, 5:01pm UTC](https://forum.qiime2.org/t/importing-csv-to-qza/3920/25 "2018-04-26T17:01:50Z")

</div>

Hi @Stephanieorch,

As your file is a close reference table there are a few things to consider:

- The names of the OTUs are not sequences but OTU ids based on your reference
- The representative sequences are not sequences from your study or studies but the centroids of the OTUs given by your reference
- The tree and taxonomies are "inherited" from the reference
- The close reference approach will normally yield a log/txt file with which sequences were grouped within which OTU id

Thus, depending on what you want to do with those sequences is what the next step will be.

Hope this helps.

---

<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: [April 26, 2018, 5:13pm UTC](https://forum.qiime2.org/t/importing-csv-to-qza/3920/27 "2018-04-26T17:13:13Z")

</div>

Since I am unable to use my taxa plot from Qiita in Qiime, I am trying to create one on Qiime to analyze. I wanted to convert my biom table to a FeatureData[Sequences] file so I will have the required rep-seqs.qza to input into the command on Qiime to create a taxa.qza file that I can further analyze. Thank you!

---

<div class="post-metadata">

### Author: ![antgonza](https://forum.qiime2.org/user_avatar/forum.qiime2.org/antgonza/32/1236_2.png) [@antgonza](https://forum.qiime2.org/u/antgonza)
#### Post date: [April 26, 2018, 6:52pm UTC](https://forum.qiime2.org/t/importing-csv-to-qza/3920/31 "2018-04-26T18:52:51Z")

</div>

@Stephanieorch, right, the csv that is available to download from a qzv taxa summary like [this](https://view.qiime2.org/visualization/?type=html&src=https%3A%2F%2Fdocs.qiime2.org%2F2018.4%2Fdata%2Ftutorials%2Fmoving-pictures%2Ftaxa-bar-plots.qzv) will not allow you to get qza's for `FeatureTable[Frequency]` and a `FeatureData[Taxonomy]`. However, a biom table with taxonomy (basically the input for that visualization in Qiita), could be converted to these two qza's via:

```auto
$ qiime tools import \
  --input-path hdf5.biom \
  --output-path feature-table.qza \
  --type "FeatureTable[Frequency]"
$ qiime tools import \
  --input-path hdf5.biom \
  --output-path taxonomy.qza \
  --source-format BIOMV210Format \
  --type "FeatureData[Taxonomy]"

```

Credit to @thermokarst who sent me these commands.

Hope this helps.

---

<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: [April 26, 2018, 8:02pm UTC](https://forum.qiime2.org/t/importing-csv-to-qza/3920/33 "2018-04-26T20:02:12Z")

</div>

Those should fix it! Thank you all for your help.

---

<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: [May 28, 2018, 2:02am UTC](https://forum.qiime2.org/t/importing-csv-to-qza/3920/34 "2018-05-28T02:02:13Z")

</div>

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