fancy_multisamp_ideogram.Rd
Generate ideograms for selected samples, visualizing copy number variation segments.
fancy_multisamp_ideogram(
these_sample_ids,
plot_title = "CN Segments Ideogram",
plot_sub = "grch37",
this_seq_type = "genome",
chr_anno_dist = 3,
chr_select = paste0("chr", c(1:22)),
include_cn2 = FALSE,
kompare = FALSE,
concordance = TRUE,
coding_only = FALSE,
from_flatfile = TRUE,
use_augmented_maf = TRUE
)
Sample to be plotted (accepts 2, 3 or 4 samples).
Main title of plot.
Subtitle of plot.
Seq type for returned CN segments. One of "genome" (default) or "capture".
Optional parameter to adjust chromosome annotations, default value is 3, increase to adjust annotations to left.
Optional parameter to subset plot to specific chromosomes. Default value is chr1-22.
Set to TRUE for plotting CN states == 2.
Boolean statement, set to TRUE to call cnvKompare on the selected samples for plotting concordant (or discordant) cn segments across selected chromosomes.
Boolean parameter to be used when kompare = TRUE. Default is TRUE, to plot discordant segments, set the parameter to FALSE.
Optional. Set to TRUE to restrict to plotting only coding mutations.
If set to true the function will use flat files instead of the database.
Boolean statement if to use augmented maf, default is FALSE.
A plot as a ggplot object (grob).
To create multi-sample ideograms, i.e showing CN segments across multiple samples, this function was created.
This can be used to infer inheritance patterns, hotspots, etc. across multiple samples or the sample ID but for different timepoints.
In addition, this plot can also allow to only plot concordant (or discordant) cn segments between two samples. i.e how two samples differ, or are alike.
The function automatically detects the number of samples provided and sets the plotting parameters accordingly.
The maximum number of samples this plot can deal with is 4 and sample IDs of interest are given to the these_sample_ids
.
In order to only plot segments that are concordant between the selected samples, set komapre
to TRUE and concordance
to TRUE.
To instead plot discordant CN segments, set this parameter to FALSE.
#two samples ideogram
fancy_multisamp_ideogram(these_sample_ids = c("00-15201_tumorA",
"00-15201_tumorB"),
include_cn2 = TRUE,
plot_title = "Multi-sample Ideograms Example",
plot_sub = "grch37",
chr_anno_dist = 2.5,
chr_select = paste0("chr", c(1:22)))
#> Warning: NAs introduced by coercion
#> Warning: number of items to replace is not a multiple of replacement length
#> Warning: Ignoring unknown aesthetics: label
#> Warning: Ignoring unknown aesthetics: label
#> Warning: Ignoring unknown aesthetics: label
#> Warning: Ignoring unknown aesthetics: label
#> Warning: Width not defined
#> ℹ Set with `position_dodge(width = ...)`
#> Warning: Width not defined
#> ℹ Set with `position_dodge(width = ...)`
#> Warning: Width not defined
#> ℹ Set with `position_dodge(width = ...)`
#> Warning: Width not defined
#> ℹ Set with `position_dodge(width = ...)`
#> Warning: Width not defined
#> ℹ Set with `position_dodge(width = ...)`
#> Warning: Width not defined
#> ℹ Set with `position_dodge(width = ...)`
#> Warning: Width not defined
#> ℹ Set with `position_dodge(width = ...)`
#> Warning: Width not defined
#> ℹ Set with `position_dodge(width = ...)`
#> Warning: Width not defined
#> ℹ Set with `position_dodge(width = ...)`
#> Warning: Width not defined
#> ℹ Set with `position_dodge(width = ...)`
#> Warning: Width not defined
#> ℹ Set with `position_dodge(width = ...)`
#> Warning: Width not defined
#> ℹ Set with `position_dodge(width = ...)`
#> Warning: Width not defined
#> ℹ Set with `position_dodge(width = ...)`
#> Warning: Width not defined
#> ℹ Set with `position_dodge(width = ...)`
#> Warning: Width not defined
#> ℹ Set with `position_dodge(width = ...)`
#> Warning: Width not defined
#> ℹ Set with `position_dodge(width = ...)`
#> Warning: Width not defined
#> ℹ Set with `position_dodge(width = ...)`