DCP_PlotPeakHist: Histogram of peak time Make a circos histogram plot for peak...

View source: R/DCP_GraphFunctions.R

DCP_PlotPeakHistR Documentation

Histogram of peak time Make a circos histogram plot for peak time.

Description

Histogram of peak time Make a circos histogram plot for peak time.

Usage

DCP_PlotPeakHist(
  x,
  TOJR = NULL,
  RhyBothOnly = FALSE,
  sig.cut = list(param = "pvalue", fun = "<", val = 0.05),
  time.start = -6,
  Info1 = "groupI",
  Info2 = "groupII",
  GroupSplit = FALSE,
  filename = NULL,
  file.width = 8,
  file.height = 8,
  color.hist = NULL,
  cir.y.breaks = seq(-6, 18, 4),
  single.binwidth = 1,
  axis.text.size = 12,
  legend.position = "right"
)

Arguments

x

DCP_Rhythmicity() output

TOJR

toTOJR output. If NULL, rhythm.joint object in x will be used.

RhyBothOnly

For two-group output, plot only RhyBoth genes or all rhythmic genes in separate groups?

sig.cut

A list. Used only for single-group plot, only genes satisfying sig.cut will be plotted. If NULL then genes all genes in regardless of significance in rhythmicity will be plotted.

  • param parameter used for the cutoff. Should be a column in rhythmicity estimates result (e.g. x$rhythm for one-group analysis, or x$x1$rhythm for two-group analysis).

  • fun character string. Either "<" or ">"

  • val numeric. The value used for the cutoff

time.start

numeric. What time do you want the phase start? Default is -6, which is midnight if time is in ZT scale.

Info1

character string. Used in the plot title for group I

Info2

character string. Used in the plot title for group II (if exist).

GroupSplit

logical. For two-group output, should the histogram of each group be plotted separately?

filename

character string. The filename for plot export. If NULL, the plot will not be saved.

file.width

width of the export plot

file.height

height of the export plot

color.hist

Input color. The length of the vector should be the same of the number of the groups.

cir.y.breaks

numeric. A vector for breaks for the angles. Should start with phase.start and end with phase.start+period

single.binwidth

numeric. The binwidth for plotting peak histogram.

axis.text.size

Size for the axis text.

legend.position

One of "left”, "top", "right", "bottom", or "none"

Value

a ggplot2 object.

Examples

x = DCP_sim_data(ngene=1000, nsample=30, A1=c(2, 3), A2=c(2, 3),
phase1=c(0, pi/4), phase2=c(pi/2, pi*3/2),
M1=c(4, 6), M2=c(4, 6), sigma1=1, sigma2=1)
rhythm.res = DCP_Rhythmicity(x1 = x[[1]], x2 = x[[2]])
# Make a two-group plot:
DCP_PlotPeakHist(rhythm.res)
# Make a one-group plot
DCP_PlotPeakHist(rhythm.res$x1)

DiffCircaPipeline/Rpackage documentation built on March 17, 2023, 7:32 a.m.