Save data

saveAbundanceData(
  x,
  path_file = NULL,
  file_type = c("delim", "csv", "csv2", "tsv", "excel_csv", "excel_csv2"),
  ...
)

saveTaxonomyData(
  x,
  path_file = NULL,
  file_type = c("delim", "csv", "csv2", "tsv", "excel_csv", "excel_csv2"),
  ...
)

saveSampleData(
  x,
  path_file = NULL,
  file_type = c("delim", "csv", "csv2", "tsv", "excel_csv", "excel_csv2"),
  ...
)

Arguments

x

phyloseq object

path_file

path to save the file along with name. Default is NULL. E.g. "data/output/otu_table.csv"

file_type

One of "delim","csv","csv2","tsv","excel_csv","excel_csv2" supported by readr package

...

Arguments to pass to readr functions

Value

Store file locally specified by user.

Details

Basic utilities for saving data in phyloseq.

saveAbundanceData save the otu_table.

saveTaxonomyData save the taxa_table.

saveSampleData save the sample_data.

References

Shetty SA (2020). Utilities for microbiome analytics. https://github.com/RIVM-IIV-Microbiome/biomeUtils

Author

Sudarshan A. Shetty

Examples

if (FALSE) {
library(biomeUtils)
data("FuentesIliGutData")
saveAbundanceData(FuentesIliGutData, path_file = "otu.tsv", file_type = "tsv")
saveTaxonomyData(FuentesIliGutData, path_file = "taxa.tsv", file_type = "tsv")
saveSampleData(FuentesIliGutData, path_file = "sample.tsv", file_type = "tsv")
}