multitab_to_contrib {FuncDiv}R Documentation

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

Description

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

Usage

multitab_to_contrib(
  func_tab,
  abun_tab,
  ncores = 1,
  samp_colname = "sample",
  func_colname = "function.",
  abun_colname = "taxon_abun",
  taxon_colname = "taxon",
  copy.num_colname = "genome_function_count"
)

Arguments

func_tab

data.frame object containing function copy numbers, with rows as functions and columns as taxa.

abun_tab

data.frame object containing taxonomic abundances across samples, with rows as taxa and columns as samples.

ncores

integer specifying number of cores to use for parallizable steps.

samp_colname

sample id column name of contrib_tab output data.frame.

func_colname

function id column name of contrib_tab output data.frame.

abun_colname

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

taxon_colname

taxon id column name of contrib_tab output data.frame.

copy.num_colname

function copy number (within each taxa) column name of contrib_tab output data.frame.

Value

data.frame in contributional format (i.e., single, long-format version of both input tables).


[Package FuncDiv version 1.0.0 Index]