focal_cn_plot.Rd
Generates a plot of all CN segments for a specified region.
focal_cn_plot(
region,
gene,
these_samples_metadata,
this_seq_type = "genome",
type = "gain",
segment_size = 1,
crop_segments = TRUE,
sort_by_annotation = c("pathology"),
crop_distance = 1e+08
)
Genomic region for plotting in bed format.
Optional variable, converts gene to region if region not supplied.
Required parameter. GAMBL metadata subset to the cases you want to process (or full metadata).
Seq type for returned CN segments. One of "genome" (default) or "capture".
Type of CN segment to be plotted. Default is gain (CN > 2).
This parameter controls the size of the segment plotted with ggplot2, default is 1.
Boolean statement that crops segment by first checking if crop segment is smaller than lef/right distance, then adds or subtracts crop distance to end/start coordinates. Default is TRUE.
Sort CN by annotation, default is "pathology".
Crop distance for cropping segments. Default value is 10000000 bp.
Nothing
This function visualizes all CN segments for a defined region, colours the returned segments based on lymphgen information.
In addition, this function takes either a specified region (chr:start-end format). If no region is supplied, the user can give the function a gene symbol
with gene
. If so, the function will internally retrieve the region for the specified gene.
Sample IDs are specified along the y-axis and the genomic position is visualized along the x-axis.
#get metadata
this_metadata = get_gambl_metadata()
#get myc region
myc_region = gene_to_region(gene_symbol = "MYC",
return_as = "region")
#> 1 region(s) returned for 1 gene(s)
#build plot
focal_cn_plot(these_samples_metadata = this_metadata,
region = myc_region,
type = "loss",
crop_distance = 100000000)