Learn R Programming

patPRO (version 1.1.0)

normalizeAlphaDiv: Normalize Alpha Diversity Values for Plotting.

Description

This function normalizes the alpha diversity values of a single patient's time course to the initial time point. The initial time point is used as 100 percent. This allows for plotting of multiple alpha diversity metrics on a single plot, despite differences in value magnitude.

Usage

normalizeAlphaDiv(alpha.div.input, alpha.div.metric, subject.id.range, subject.id.col="SubjectID", tmpt.id.col="Time_point")

Arguments

alpha.div.input
The data.frame from Qiime containing the alpha diversity information for the dataset. This should also include subject ID and time point information.
alpha.div.metric
The name(s) of the columns containing the alpha diversity metric information to be used for normalization.
subject.id.range

subject.id.col
Name of the subject ID column found in alpha.div.input. Default is "SubjectID".
tmpt.id.col
Name of the time point column found in alpha.div.input. Default is "Time_point".

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.

References

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

Examples

Run this code
data("PatProAlphaDiv",package="patPRO")
data("PatProMap",package="patPRO")
mergedMapAlpha <- mergeMapMetaData(map.file=PatProMap, 
	merging.file=PatProAlphaDiv, 
	map.sub.id="SubjectID", 
	map.tmpt="Time_point", 
	map.smpl.id="SampleID", 
	sample.id.col="SampleID")
testNormAlphaDiv <- normalizeAlphaDiv(mergedMapAlpha, c("chao1","shannon"), 1)

Run the code above in your browser using DataLab