plotBubble: Basic plot of binned vectors.

View source: R/plotBubble.R

plotBubbleR Documentation

Basic plot of binned vectors.

Description

This function plots takes two vectors, calculates the contingency table and plots circles sized by the contingency table value. Optional significance vectors of the values significant will shade the circles by proportion of significance.

Usage

plotBubble(
  yvector,
  xvector,
  sigvector = NULL,
  nbreaks = 10,
  ybreak = quantile(yvector, p = seq(0, 1, length.out = nbreaks)),
  xbreak = quantile(xvector, p = seq(0, 1, length.out = nbreaks)),
  scale = 1,
  local = FALSE,
  ...
)

Arguments

yvector

A vector of values represented along y-axis.

xvector

A vector of values represented along x-axis.

sigvector

A vector of the names of significant features (names should match x/yvector).

nbreaks

Number of bins to break yvector and xvector into.

ybreak

The values to break the yvector at.

xbreak

The values to break the xvector at.

scale

Scaling of circle bin sizes.

local

Boolean to shade by signficant bin numbers (TRUE) or overall proportion (FALSE).

...

Additional plot arguments.

Value

A matrix of features along rows, and the group membership along columns.

See Also

plotMRheatmap

Examples


data(mouseData)
mouseData = mouseData[which(rowSums(mouseData)>139),]
sparsity = rowMeans(MRcounts(mouseData)==0)
lor = log(fitPA(mouseData,cl=pData(mouseData)[,3])$oddsRatio)
plotBubble(lor,sparsity,main="lor ~ sparsity")
# Example 2
x = runif(100000)
y = runif(100000)
plotBubble(y,x)


HCBravoLab/metagenomeSeq documentation built on March 17, 2024, 3:21 p.m.