Description Usage Arguments Details Value Examples
Chromosome copy number plot with gene annotation.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | chromosome_copy_number_plot(
copy_number,
segments,
sample = NULL,
chromosome,
start = NULL,
end = NULL,
copy_number_steps = NULL,
genes = NULL,
max_points_to_display = Inf,
min_copy_number = NULL,
max_copy_number = NULL,
copy_number_breaks = NULL,
point_colour = "black",
point_alpha = NULL,
point_size = NULL,
segment_colour = "red",
segment_alpha = 1,
segment_line_size = 0.75,
copy_number_step_colour = "blue",
copy_number_step_alpha = 0.35,
copy_number_step_line_size = 0.75,
gene_colour = "darkgreen",
gene_alpha = 0.25,
position_scale = 1e-06,
xlabel = "position (Mbp)",
ylabel = "copy number"
)
|
copy_number |
a data frame containing |
segments |
a data frame containing |
sample |
the sample (required if the |
chromosome |
the chromosome to display. |
start |
the start coordinate within the specified chromosome. |
end |
the end coordinate within the specified chromosome. |
copy_number_steps |
a data frame containing |
genes |
a data frame containing |
max_points_to_display |
maximum number of copy number points to display (downsampling may be carried out if there are more copy number values than this number). |
min_copy_number |
the minimum |
max_copy_number |
the maximum |
copy_number_breaks |
breaks at which grid lines will be displayed. |
point_colour |
the colour of the copy number points. |
point_alpha |
the transparency of the copy number points. |
point_size |
= the size of the copy number points. |
segment_colour |
the colour of the copy number segments. |
segment_alpha |
the transparency of the copy number segments. |
segment_line_size |
the size of the lines for copy number segments. |
copy_number_step_colour |
the colour of the copy number step lines. |
copy_number_step_alpha |
the transparency of the copy number step lines. |
copy_number_step_line_size |
the size of the lines for the copy number steps. |
gene_colour |
the colour of the gene bars. |
gene_alpha |
the transparency of the gene bars. |
position_scale |
the scaling factor for the position x-axis. |
xlabel, ylabel |
x- and y-axis labels. |
copy_number
values can be on the relative or absolute scales or can
be log2 ratios but the same scale should be used consistently in each of the
copy_number
, segments
and copy_number_steps
data frames.
a ggplot
object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | data(copy_number)
data(genes)
segments <- copy_number_segments(copy_number)
absolute_copy_numbers <- 0:8
relative_copy_numbers <- absolute_to_relative_copy_number(absolute_copy_numbers, ploidy = 4.01, cellularity = 0.81)
copy_number_steps <- data.frame(absolute_copy_number = absolute_copy_numbers, copy_number = relative_copy_numbers)
chromosome_copy_number_plot(
copy_number,
segments,
sample = "X17222",
chromosome = 3,
copy_number_steps = copy_number_steps,
genes = genes,
min_copy_number = 0.25, max_copy_number = 2.5)
# filter for specific sample and convert relative copy numbers to log2 ratios
log2_ratio <- copy_number[copy_number$sample == "X17222", ]
log2_ratio$copy_number <- log2(log2_ratio$copy_number)
log2_ratio_segments <- copy_number_segments(log2_ratio)
log2_ratio_steps <- copy_number_steps
log2_ratio_steps$copy_number <- log2(log2_ratio_steps$copy_number)
chromosome_copy_number_plot(
log2_ratio,
log2_ratio_segments,
chromosome = 17, start = 7250000, end = 7750000,
copy_number_steps = log2_ratio_steps,
genes = genes,
min_copy_number = -2, max_copy_number = 2,
position_scale = 1,
xlabel = "position",
ylabel = expression(log[2]~ratio))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.