morinlab / GAMBLR.viz

Collection of functions to make plots for Genomic Analysis of Mature B-cell Lymphomas in R
https://morinlab.github.io/GAMBLR.viz/
MIT License
0 stars 0 forks source link

PrettyRainFallPlot Improvements #26

Closed mattssca closed 7 months ago

mattssca commented 7 months ago

This PR addresses a few issues recently discovered related to prettyRainFallPlot. The issues are described here #15.

The updated code introduced in this PR depends on resolving the issue posted in GAMBLR.data. Note, this fix is not yet on master.

Here are a few examples with the updated code as well as the figures generated.

#request one sample ID, zoom in to one region in hg38 (this projection was previously not supported)
prettyRainfallPlot(this_sample_id = "DOHH-2",
                   this_seq_type = "genome", 
                   chromosome = 2, 
                   projection = "hg38", 
                   plot_title = "Example 1")

#build plot for one sample, label SVs and subset to specific chromosomes.
prettyRainfallPlot(this_sample_id = "DOHH-2",  
                   this_seq_type = "genome",
                   chromosome = c(8, 12, 14), 
                   plot_title = "Example 2")

#build plot for all SSM calls and show the requested region
prettyRainfallPlot(this_seq_type = "genome", 
                   projection = "hg38",
                   zoom_in_region = gene_to_region(gene_symbol = "MYC", return_as = "region", genome_build = "hg38"), 
                   plot_title = "Example 3")

#give the function a amf with multiple sample IDs and request a region, this should work
prettyRainfallPlot(this_maf = get_ssm_by_samples(),
                   this_seq_type = "genome", 
                   zoom_in_region = gene_to_region(gene_symbol = "MYC", return_as = "region"), 
                   plot_title = "Example 4")

#give the function a maf with one sample ID and no zoom in region specified
prettyRainfallPlot(this_maf = get_ssm_by_samples(these_sample_ids = "DOHH-2"),
                   this_seq_type = "genome", 
                   plot_title = "Example 5")

Example 1

example_1

Example 2

example_2

Example 3

example_3

Example 4

example_4

Example 5

example_5