contrib_to_multitab {FuncDiv}R Documentation

Utility function to convert from contributional to multi-table input objects

Description

Converts from contributional-type table (i.e., a single, long table with joint taxa/function information) to separate taxa abundance and function copy number tables.

Usage

contrib_to_multitab(
  contrib_tab,
  samp_colname = "sample",
  func_colname = "function.",
  abun_colname = "taxon_abun",
  taxon_colname = "taxon",
  copy.num_colname = "genome_function_count"
)

Arguments

contrib_tab

data.frame object containing combined taxa abundances and function copy numbers across taxa. Must contain columns corresponding to the sample ids, function ids, taxa ids, and taxa abundances within samples. These column names are specified by the samp_colname, func_colname, taxon_colname, abun_colname, and copy.num_colname, respectively.

samp_colname

sample id column name of contrib_tab input data.frame.

func_colname

function id column name of contrib_tab input data.frame.

abun_colname

taxonomic abundance (within each sample) column name of contrib_tab input data.frame.

taxon_colname

taxon id column name of contrib_tab input data.frame.

copy.num_colname

function copy number column name of contrib_tab input data.frame.

Value

list with taxon abundance (taxon_abun) and function copy number (function_copy_num) data.frames as separate elements.


[Package FuncDiv version 1.0.0 Index]