R: Format and Normalize Top Taxa and Bac Load for Plotting.

topAbsAbundDataFrame {patPRO} | R Documentation

## Format and Normalize Top Taxa and Bac Load for Plotting.

### Description

Calcualte the top taxa relative abundance normalized to the overall bacterial load. Prepare the data frame for graphing.

### Usage

    topAbsAbundDataFrame(rel.abund,
    	bac.load,
    	bac.load.id="bac_load",
    	abund.id.col="Abundance",
    	subject.id.col="SubjectID",
    	tmpt.id.col="Time_point",
    	bacteria.id.col="Bacteria")

### Arguments

`rel.abund` | The transposed relative abundance `data.frame` to be used for graphing of microbial relative abundances.
`bac.load` | The `data.frame` containing the bacterial load information, as well as the subject IDs and time points associated with those load data points.
`bac.load.id` | Name of the bacterial load value column. Default is "bac_load".
`abund.id.col` | Name of the column containing the relative abundance values for the top taxa relative abundance. Default is "Abundance".
`subject.id.col` | Name of the subject ID column. Default is "SubjectID".
`tmpt.id.col` | Name of the time point column. Default is "Time_point".
`bacteria.id.col` | Name of the column to contain the bacterial load values. Default is "Bacteria".

### Details

Package: | patPRO
Type: | Package
Version: | 1.0.0
Date: | 2015-09-18
License: | GPLv3

An overview of how to use the package, including the most important functions, is included in the supplemental R notebook patPROExampleWorkflow.html.

### Author(s)

Geoffrey Hannigan <ghanni@upenn.edu>, Loesche MA, Hodkinson BP, Mehta S, Elizabeth Grice <egrice@upenn.edu>

### References

patPRO: An R package for the visualization of longitudinal microbiome data. Hannigan GD, Loesche MA, Hodkinson BP, Mehta S, Grice EA.

### Examples

    data("PatProOTU",package="patPRO")
    data("PatProMap",package="patPRO")
    data("PatProBacLoad",package="patPRO")
    transTestRelAbund <- transposeRelAbund(PatProOTU)
    mergedMapTransRA <- mergeMapMetaData(map.file=PatProMap,
    	merging.file=transTestRelAbund,
    	map.sub.id="SubjectID",
    	map.tmpt="Time_point",
    	map.smpl.id="SampleID",
    	sample.id.col="SampleID")
    top5RelAbund <- topRelAbundDataFrame(x=mergedMapTransRA, top.taxa.num=5)
    mergedMapBacLoad <- mergeMapMetaData(map.file=PatProMap,
    	merging.file=PatProBacLoad,
    	map.sub.id="SubjectID",
    	map.tmpt="Time_point",
    	map.smpl.id="SampleID",
    	sample.id.col="SampleID")
    absAbundOutDf <- topAbsAbundDataFrame(top5RelAbund, mergedMapBacLoad, bac.load.id="Num_Bacteria")

[Package patPRO version 1.1.0 Index]