Exporting DADA2 (R package) results to work with qiime2

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

13 Likes