CP_PlotPeakDiff: Circos plot for peak time shift Make a circos plot for peak...

View source: R/CP_GraphFunctions.R

CP_PlotPeakDiffR Documentation

Circos plot for peak time shift Make a circos plot for peak time shift between two groups

Description

Circos plot for peak time shift Make a circos plot for peak time shift between two groups

Usage

CP_PlotPeakDiff(
  x,
  TOJR,
  dPhase,
  color.cut = list(param = "pvalue", fun = "<", val = 0.05, color.sig = "#b33515",
    color.none = "dark grey"),
  color.df = NULL,
  Info1 = "groupI",
  Info2 = "groupII",
  filename = NULL,
  file.width = 8,
  file.height = 8,
  time.start = -6,
  concordance.ref = 4,
  cir.x.breaks = seq(-12, 12, 4),
  cir.y.breaks = seq(-6, 18, 4),
  axis.text.size = 12,
  legend.position = "right",
  color.diff.refband = "darkgreen",
  color.diff.connectline = "grey80",
  color.diff.baseline = "blue"
)

Arguments

x

CP_Rhythmicity() output.

TOJR

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

dPhase

CP_DiffPar() output with phase shift tested.

color.cut

list. Genes will be plotted according a cutoff. Used only when dPhase is not NULL.

  • param parameter used for the cutoff. Should be a column in dPhase.

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

  • val numeric. The value used for the cutoff.

  • color.sig color for points that pass the color.cut criterion.

  • color.none color for points that do not pass the color.cut criterion.

color.df

data.frame. A more advanced color coding. The data frame should have two columns named color and label. label will be displayed as legend. The color vector should have the same order as genes in dPhase.

Info1

character string. Used in the plot title for group I

Info2

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

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

time.start

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

concordance.ref

The radius where the concordance reference line be plotted away from Δpeak = 0.

cir.x.breaks

numeric. A vector for breaks for the radius (peak difference). Should only contains values from -period/2 to period/2 and it is recommended that the break is equal spaced.

cir.y.breaks

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

axis.text.size

numeric. Size for the axis text.

legend.position

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

color.diff.refband

color of the reference band around Δpeak = 0.

color.diff.connectline

color of the start and end of the peak difference range.

color.diff.baseline

color of the reference line for Δpeak = 0.

Examples

x = CP_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 = CircadianPipeline::CP_Rhythmicity(x1 = x[[1]], x2 = x[[2]])
rhythm.diffPar = CircadianPipeline::CP_DiffPar(rhythm.res, "phase")
#make a plot with genes with differential phase p-value<0.05 in a different color
CP_PlotPeakDiff(rhythm.res, NULL, rhythm.diffPar)

XiangningXue/CircadianPipeline documentation built on May 3, 2022, 3:04 p.m.