# From qiime2 to R : how to transform a .qza to .tre

**URL:** https://forum.qiime2.org/t/from-qiime2-to-r-how-to-transform-a-qza-to-tre/2670
**Category:** User Support
**Tags:** tree, export
**Created:** [January 22, 2018, 4:18pm UTC](https://forum.qiime2.org/t/from-qiime2-to-r-how-to-transform-a-qza-to-tre/2670 "2018-01-22T16:18:07Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![leila](https://forum.qiime2.org/user_avatar/forum.qiime2.org/leila/32/6544_2.png) [@leila](https://forum.qiime2.org/u/leila)
#### Post date: [January 22, 2018, 4:18pm UTC](https://forum.qiime2.org/t/from-qiime2-to-r-how-to-transform-a-qza-to-tre/2670/1 "2018-01-22T16:18:07Z")

</div>

Hi,

I would like to export my rooted-tree.qza in R and work with phyloseq. For this I would need .tre format for the three.  
How can you export your .qza in .tre?

Thank you very much,

Leila

---

<div class="post-metadata">

### Author: ![Mehrbod\_Estaki](https://forum.qiime2.org/user_avatar/forum.qiime2.org/mehrbod_estaki/32/4001_2.png) [@Mehrbod\_Estaki](https://forum.qiime2.org/u/Mehrbod_Estaki)
#### Post date: [January 22, 2018, 5:01pm UTC](https://forum.qiime2.org/t/from-qiime2-to-r-how-to-transform-a-qza-to-tre/2670/3 "2018-01-22T17:01:26Z")

</div>

Hi @leila,

You can use the [export](https://docs.qiime2.org/2017.12/tutorials/exporting/#exporting-a-phylogenetic-tree) command to get your tree file. The file will be in newick format (.nwk) though and not .tree, but I do believe this should still be fine with phyloseq.

---

<div class="post-metadata">

### Author: ![jairideout](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jairideout/32/9_2.png) [@jairideout](https://forum.qiime2.org/u/jairideout)
#### Post date: [January 22, 2018, 9:24pm UTC](https://forum.qiime2.org/t/from-qiime2-to-r-how-to-transform-a-qza-to-tre/2670/4 "2018-01-22T21:24:27Z")

</div>

Thanks @Mehrbod_Estaki!

> [@Mehrbod\_Estaki](#):
>
> The file will be in newick format (.nwk) though and not .tree, but I do believe this should still be fine with phyloseq.

I've seen the file extensions `.nwk`, `.tre`, and `.tree` all used interchangeably with Newick files (I don't think there's much of a standard there). QIIME 2 generally doesn't care about file extensions, though I'm unsure about phyloseq. @leila, if phyloseq isn't able to import the file with `.nwk` extension, you could try renaming the file to use `.tre` extension.

---

<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: [February 23, 2018, 3:24am UTC](https://forum.qiime2.org/t/from-qiime2-to-r-how-to-transform-a-qza-to-tre/2670/6 "2018-02-23T03:24:41Z")

</div>

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