corrFeature: Scatterplot of two features

Description Usage Arguments Value Examples

View source: R/correlation_functions.R

Description

This function plots a scatterplot of two features along with sample correlation statistics.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
corrFeature(
  aggdat,
  feat1,
  feat2,
  log = TRUE,
  method = c("spearman", "pearson", "kendall"),
  addRegression = TRUE,
  col_by = NULL,
  facet1 = NULL,
  facet2 = NULL,
  plotTitle = "",
  xlab = NULL,
  ylab = NULL,
  allowWebGL = TRUE,
  pwidth = 550,
  pheight = 200
)

Arguments

aggdat

aggregated MRExperiment

feat1

Feature 1.

feat2

Feature 2.

log

Log2 transform data. Default is TRUE.

method

Correlation coefficient. One of "spearman" (default), "pearson", or "kendall".

addRegression

boolean parameter indicating whether linear regression line should be drawn; default: TRUE

col_by

Phenotype for coloring.

facet1

Phenotype for facet 1.

facet2

Phenotype for facet 2.

plotTitle

Plot title. Default is no title.

xlab

X-axis label. Default is feat1.

ylab

Y-axis label. Default is feat2.

allowWebGL

boolean indicating if WebGL should be used for large data

pwidth

overall plot width; default is 550

pheight

overall plot height; default is 200

Value

list holding plotly plot and lm fit

Examples

1
2
3
data("mouseData", package = "metagenomeSeq")
aggdat <- aggFeatures(mouseData, level = "genus")
corrFeature(aggdat, feat1 = "Bacteroides", feat2 = "Prevotella")

microbiomeExplorer documentation built on Nov. 8, 2020, 8:16 p.m.