CP_PlotPeakLink: Circos plot for linked peak time Make a circos plot for...

View source: R/CP_GraphFunctions.R

CP_PlotPeakLinkR Documentation

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

Description

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

Usage

CP_PlotPeakLink(
  x,
  TOJR,
  dPhase,
  color.cut = list(param = "pvalue", fun = "<", val = 0.05, color.sig = "#03a1fc",
    color.none = "dark grey"),
  color.df = NULL,
  time.start = -6,
  Info1 = "groupI",
  Info2 = "groupII",
  filename = NULL,
  file.width = 8,
  file.height = 8,
  cir.y.breaks = seq(-6, 18, 4),
  axis.text.size = 12,
  legend.position = "right",
  color.link.low = "#e8f7ff",
  color.link.high = "#03a1fc"
)

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.

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).

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

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.link.low

color of the link for genes with smallest |peak difference|

color.link.high

color of the link for genes with highest |peak difference|

Examples

x = CircadianPipeline::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")
CP_PlotPeakLink(rhythm.res, NULL, rhythm.diffPar)


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