Learn R Programming

propr (version 3.1.8)

visualize: Visualize Proportionality

Description

smear: Plots log-ratio transformed abundances pairwise. Index-aware, meaning that it only plots pairs indexed in @pairs, unless no pairs are indexed.

dendrogram: Plots a clustering of proportionality matrix. Index-aware, meaning that it only plots pairs indexed in @pairs, unless no pairs are indexed. Heatmap intensity is not scaled.

slate: Builds a table of VLR, VLS, and proportionality for each feature pair in a propr object. If the argument k is provided, the table will also include co-cluster membership.

prism: Plots the variance of the ratio of the log-ratio transformed feature pair (VLR) versus the sum of the individual variances of each log-ratio transformed feature (VLS). The ratio of the VLR to the VLS equals 1 - rho. As such, we use here seven rainbow colored lines to indicate where rho equals [.01, .05, .50, 0, 1.50, 1.95, 1.99], going from red to violet.

bokeh: Plots the feature variances for each log-ratio transformed feature pair in the propr object. Highly proportional pairs will aggregate near the y = x diagonal. Clusters that appear toward the top-right of the figure contain features with highly variable abundance across all samples. Clusters that appear toward the bottom-left of the figure contain features with fixed abundance across all samples. Uses a log scale.

bucket: Plots an estimation of the degree to which a feature pair differentiates the experimental groups versus the measure of the proportionality between that feature pair. The discrimination score is defined as the negative log of the p-values for each feature in the pair, computed independently using kruskal.test. "It's pronounced, 'bouquet'." - Hyacinth Bucket

pca: Plots the first two principal components as calculated using the log-ratio transformed feature vectors. This provides a statistically valid alternative to conventional principal components analysis (PCA). For more information, see <DOI:10.1139/cjm-2015-0821>.

snapshot: Plots the log-ratio transformed feature abundance as a heatmap, along with the respective dendrograms. Heatmap intensity is not scaled.

cytescape: Builds a table of indexed pairs and their proportionality. In doing so, this function displays a preview of the interaction network, built using igraph. We recommend using the result as input to a network visualization tool like Cytoscape.

Usage

smear(rho, prompt = TRUE, plotly = FALSE)

dendrogram(rho, prompt = TRUE, plotly = FALSE)

slate(rho, k, prompt = TRUE, plotly = FALSE)

bucket(rho, group, k, prompt = TRUE, plotly = FALSE)

prism(rho, k, prompt = TRUE, plotly = FALSE)

bokeh(rho, k, prompt = TRUE, plotly = FALSE)

pca(rho, group, prompt = TRUE, plotly = FALSE)

snapshot(rho, prompt = TRUE, plotly = FALSE)

cytescape(object, col1, col2, prompt = TRUE, d3 = FALSE)

Arguments

prompt

A logical scalar. Set to FALSE to disable the courtesy prompt when working with big data.

plotly

A logical scalar. Set to TRUE to produce a dynamic plot using the plotly package.

k

A numeric scalar. The number of clusters. Optional parameter for bucket, prism, and bokeh. Providing the argument k will color feature pairs by co-cluster membership. In other words, a feature pair will receive a color if and only if both features belong to same the cluster (calculated using hclust).

group

A character vector. Group or sub-group memberships, ordered according to the row names in @counts and @logratio. Required parameter for bucket and optional parameter for pca.

object, rho

A propr object created from perb. However, smear, dendrogram, and cytescape will also accommodate results from phit and phis.

col1, col2

A character vector. Specifies which nodes to color red or blue, respectively.

d3

A boolean. Use rgl to plot 3D network.

Value

smear, pca: Returns a ggplot object.

dendrogram, snapshot: Returns a dendrogram object.

slate: Returns a data.frame of all pairwise relationships. If the argument k is provided, returns a list of the data.frame of pairwise relationships and the cluster membership.

prism, bokeh, bucket: Returns cluster membership if k is provided. Otherwise, returns a ggplot object.

cytescape: Returns a data.frame of indexed pairs.