ASHM Rainbow Plot
ashm_rainbow_plot.Rd
Make a rainbow plot of all mutations in a region, ordered and coloured by metadata.
Usage
ashm_rainbow_plot(
mutations_maf,
metadata,
exclude_classifications,
drop_unmutated = FALSE,
classification_column,
bed,
region,
custom_colours,
hide_ids = TRUE
)
Arguments
- mutations_maf
A data frame containing mutations (MAF format) within a region of interest (i.e. use the get_ssm_by_region).
- metadata
should be a data frame with sample_id as a column.
- exclude_classifications
Optional argument for excluding specific classifications from a metadeta file.
- drop_unmutated
Boolean argument for removing unmutated sample ids in mutated cases.
- classification_column
The name of the metadata column to use for ordering and colouring samples.
- bed
Optional data frame specifying the regions to annotate (required columns: start, end, name).
- region
Genomic region for plotting in bed format.
- custom_colours
Provide named vector (or named list of vectors) containing custom annotation colours if you do not want to use standartized pallette.
- hide_ids
Boolean argument, if TRUE, ids will be removed.
Details
This function creates a rainbow plot for all mutations in a region. Region can either be specified with the `region` parameter, or the user can provide a maf that has already been subset to the region(s) of interest with `mutation_maf`. As a third alternative, the regions can also be specified as a bed file with `bed`. Lastly, this function has a variety of parameters that can be used to further customize the returned plot in many different ways. Refer to the parameter descriptions, examples as well as the vignettes for more demonstrations how this function can be called.
Examples
if (FALSE) { # \dontrun{
library(GAMBLR.data)
#basic usage
this_region = "chr6:90975034-91066134"
metadata = get_gambl_metadata()
metadata = check_and_clean_metadata(metadata,
duplicate_action ="keep_first")
ashm_rainbow_plot(metadata = metadata,
region = this_region)
} # }