export {rbiom} | R Documentation |
Export data to QIIME 2 or mothur.
Description
Populates a directory with the following files, formatted according to QIIME 2 or mothur's specifications.
-
biom_counts.tsv
-
biom_metadata.tsv
-
biom_taxonomy.tsv
-
biom_tree.nwk
-
biom_seqs.fna
biom_counts.tsv
will always be created. The others are dependent on
whether the content is present in the biom
argument.
Usage
write_mothur(biom, dir = tempfile(), prefix = "biom_")
write_qiime2(biom, dir = tempfile(), prefix = "biom_")
Arguments
biom |
An rbiom object, such as from |
dir |
Where to save the files. If the directory doesn't exist, it will
be created. Default: |
prefix |
A string to prepend to each file name. Default: |
Value
The normalized directory path that was written to (invisibly).
Examples
library(rbiom)
tdir <- tempfile()
write_qiime2(hmp50, tdir, 'qiime2_')
write_mothur(hmp50, tdir, 'mothur_')
list.files(tdir)
readLines(file.path(tdir, 'qiime2_metadata.tsv'), n = 4)
readLines(file.path(tdir, 'mothur_taxonomy.tsv'), n = 3)
unlink(tdir, recursive = TRUE)
[Package rbiom version 2.2.1 Index]