plotDataset: Plot summary of CARMA scores across the entire dataset or...

Description Usage Arguments Value Examples

View source: R/plotDataset.R View source: R/plotDataset 2.R

Description

This function plots regional CARMA scores across the whole dataset or within subgroups in the dataset. Each regional CARMA score is as a default presented as a median score across the dataset or within a group and can optionally be changed to reflect a percentile or a mean.

Usage

1
plotDataset(carma, group=NULL, group.order=NULL, plot.titles=NULL, plot.path, n.plot.cols=1, max.color.score=0.7, FUN=median, ...)

Arguments

carma

the output file from the CARMA function containing regional CARMA scores.

group

an optional argument giving a vector of length corresponding to the number of samples in the dataset. The vector assigns a label to each sample in order to plot each group separately. If group=NULL one summary plot of the entire dataset will be made.

group.order

an optional argument in the form of a vector giving the order of each group to be plotted(from left to right and top to bottom), using the labels found in the group argument. Only relevant when the group argument is used.

plot.titles

an optional argument in the form of a vector giving the plot titles to be printed inside the circos plots. If plot.titles=NULL no plot titles will be printed.

plot.path

a file path for the png file. The file path must include a ".png" postfix.

n.plot.cols

number of circos plots per row.

max.color.score

a numeric value between 0 and 1 representing the dynamic range for the heat map. By choosing a low number, the color intensity for low scores is scaled up.

FUN

the function to be used when calculating CARMA scores across the dataset or within subgroups. median is chosen as a default, but can optionally be replaced by mean etc.

Value

A png file containg a plot reflecting CARMA scores within the dataset.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
carma <- CARMA(test.data, region.type="arm", hg.version="hg19")

#	Make plot of entire dataset
plotDataset(carma, plot.path="~/Desktop/carma_scores_entire_dataset.png")

#	Make plot of subgroups
plotDataset(carma, group=rep(c("pos", "neg"), 50), group.order=c("neg", "pos"), plot.titles = c("Negative", "Positive"), plot.path="~/Desktop/carma_scores_groups.png", n.plot.cols=1)

#	Make plots side by side by increasing argument "n.plot.cols"
plotDataset(carma, group=rep(c("pos", "neg"), 50), group.order=c("neg", "pos"), plot.titles = c("Negative", "Positive"), plot.path="~/Desktop/carma_scores_groups.png", n.plot.cols=3)

#	Intensify colors by decreasing the argument "max.color.score"
plotDataset(carma, group=rep(c("pos", "neg"), 50), group.order=c("neg", "pos"), plot.titles = c("Negative", "Positive"), plot.path="~/Desktop/carma_scores_groups.png", n.plot.cols=3, max.color.score=0.4)

arnevpladsen/CARMA documentation built on Dec. 19, 2021, 4:39 a.m.