# Exporting DADA2 (R package) results to work with qiime2

**URL:** https://forum.qiime2.org/t/exporting-dada2-r-package-results-to-work-with-qiime2/2573
**Category:** User Support
**Tags:** dada2
**Created:** [January 15, 2018, 12:34pm UTC](https://forum.qiime2.org/t/exporting-dada2-r-package-results-to-work-with-qiime2/2573 "2018-01-15T12:34:32Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![Jaroslaw\_Grzadziel](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/j/8dc957/32.png) [@Jaroslaw\_Grzadziel](https://forum.qiime2.org/u/Jaroslaw_Grzadziel)
#### Post date: [January 17, 2018, 8:29pm UTC](https://forum.qiime2.org/t/exporting-dada2-r-package-results-to-work-with-qiime2/2573/5 "2018-01-17T20:29:20Z")

</div>

Thank you @thermokarst **again**!! I have no idea why I couldn't find this topic.

**Summing up the resolution \* (thanks to @ebolyen):**

- \*assuming that we want to start with **dada2 in R** and move to taxonomy assignments and different analysis in qiime2 (e.g following q2 tutorials like Moving Pictures etc.)

1. **in R**  
`write.table(t(seqtab.nochim), "dada2-analysis/seqtab-nochim.txt", sep="\t", row.names=TRUE, col.names=NA, quote=FALSE)`

2. **in R**  
`uniquesToFasta(seqtab.nochim, fout='dada2-analysis/rep-seqs.fna', ids=colnames(seqtab.nochim))`

3. **in q2**  
`qiime tools import \`  
` --input-path dada2-analysis/rep-seqs.fna \`  
` --type 'FeatureData[Sequence]' \`  
`--output-path rep-seqs.qza`

4. **in q2**  
`echo -n "#OTU Table" | cat - dada2-analysis/seqtab-nochim.txt > dada2-analysis/biom-table.txt`

5. **in q2**  
`biom convert -i dada2-analysis/biom-table.txt -o dada2-analysis/table.biom --table-type="OTU table" --to-hdf5`

6. **in q2**  
`qiime tools import \`  
` --input-path dada2-analysis/table.biom \`  
` --type 'FeatureTable[Frequency]' \`  
` --source-format BIOMV210Format \`  
` --output-path table.qza`

Once again, thank you @thermokarst and @ebolyen !!

---

_[View the full topic](https://forum.qiime2.org/t/exporting-dada2-r-package-results-to-work-with-qiime2/2573)._
