chromplot | R Documentation |
A function to visualize log2 ratios and events for all individuals on a given chromosome
chromplot(log2_data, chrom, event_data = NULL, het_sites = NULL,
event_colors = c("red", "orange", "forestgreen"))
log2_data |
a data.frame, the log2 ratio data to be plotted. The first column must be named "chr" and hold chromosome names. The second column must be named "lower" and hold the starting position of the probe. The second column must be named "upper" and hold the end position of the probe. The fourth column must be named "ind" and hold the name of the individual about which a particular data record is. The alst column must be named "log2_ratio" and gives the log2 ratio observed at a particular location for a given individual. |
chrom |
a character vector of length one. The chromosome for which the data is the be plotted. |
event_data |
an optional data.frame holding the positions of CNV events (homozygous deletions, heterozygous deletions or duplications) to be plotted alongside the log2 ratio data. The data.frame can contain an arbitrary number of columns, but at least the 6 following columns must be present: ind, chr, start, end, mean_log2, type. "ind" corresponds to the individual in which the event is found. "chr" corresponds to the chromosome on which the event is located. "start" gives the starting position of the vent. "end" gives the end position of the event. "mean_log2" corresponds to the mean log2 ratio over the extent of the event. "type" can take one of three mutually exclusive values: "homdel" stands for homozygous deletions, "hetdel" stands for heterozygous deletions, and "dup" stands for duplication. |
het_sites |
a data.frame giving the positions of heterogeneity regions among the individuals to be plotted. These regions will be indicated by a red-colored semi-transparent rectangle for easier interpretation of the results. The data.frame must contain three columns, "chr", "start", "stop", collectively indicating the positions of the heterogeneity regions. |
event_colors |
a character vector of length three indicating the colors to use for plotting, respectively, homozygous deletions, heterozygous deletions, and duplications. |
a ggplot graph
NULL
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.