metfile_init: metfile_init

View source: R/metfile_init.R

metfile_initR Documentation

metfile_init

Description

Initiate a metadata file that is compatible with OCMSlooksy from OCMS 16S database file or from a tab-delimited file of a count table.

Usage

metfile_init(
  db_file,
  out_dir = NULL,
  ref_table = NULL,
  id_orient = "col",
  dummy = NULL
)

Arguments

db_file

rsqlite database file. Set to NULL to use a count table in a tab-delimited file

out_dir

output directory. default NULL means output not written to file

ref_table

name of table in database from which sampleID are generated. default NULL. when NULL assumes table is merged_abundance_id which is the count table produced from the ocms_16s dada2 pipeline. When initiating the metadata file from a count table, set db_file to FALSE and count table is supplied in ref_table as tab-delimited file

id_orient

indicates orientation of sample IDs. default 'col' indicates samples are in columns. 'row' indicates samples are in rows and sample IDs are in the first column

dummy

default NULL. when string supplied, adds a dummy column of NAs with the string as the column name.

Details

When initiating the metadata file from a count table, set db_file to FALSE and count table is supplied in ref_table as tab-delimited file. If samples are in columns, set id_orient to 'col'. If samples are in rows, the sample IDs should be in the first column.

Value

function returns a dataframe . if out_dir is set, writes the initiated metadata to file as a tab-delimited file named "metadata.tsv"


schyen/OCMSExplorer documentation built on Feb. 15, 2023, 4:39 p.m.