Exporting DADA2 (R package) results to work with qiime2

According to the Dada2: qiime2 virtual machine vs RStudio performance topic, especially:

I want to ask if anybody know how exactly move from R to q2 ?
Dada2 workflow in R produces this kind of outputs:

errF and errR - the result of errors learning
derepFs and derep Rs - the result of dereplication
dadaFs and dada Rs - after sequences variants inference
mergers - merged paired reads

seqtab.nochim - the file where first column is samples list, next columns headers are sequences after chimera removal and below we can see counts, see below:


As I mentioned in previous topic I prefer using R for dada2, however I would like to taxonomy assignment in qiime2 (and other downstream analysis). Have anyone an idea how to deal with this problem ? Maybe someone is already working like this ?

Thanks :slight_smile:

1 Like

Hi @Jaroslaw_Grzadziel!

Have you had a chance to review this topic from a few months back?

Let us know if that gets you moving in the right direction! Thanks! :t_rex:


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 !!


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