prettyChromoplot.Rd
Use GISTIC2.0 scores output to reproduce maftools::chromoplot with more flexibility.
prettyChromoplot(
scores,
genes_to_label,
cutoff = 0.5,
adjust_amps = 0.5,
adjust_dels = 2.75,
label_size = 3,
force_pull = 0,
segment.curvature = 0.25,
segment.ncp = 4,
segment.angle = 25
)
Output file scores.gistic from the run of GISTIC2.0
Optional. Provide a data frame of genes to label (if mutated). The first 3 columns must contain chromosome, start, and end coordinates. Another required column must contain gene names and be named gene
. All other columns are ignored. If no data frame provided, oncogenes from GAMBLR packages are used by default to annotate on the plot.
Optional. Used to determine which regions to color as aberrant. Must be float in the range between 0 and 1. The higher the number, the less regions will be considered as aberrant. The default is 0.5.
Optional. The value of G-score for highest amplification peak will be multiplied by this value to determine how far up the gene label will be displayed. Default 0.5.
Optional. The value of G-score for highest deletion peak will be multiplied by this value to determine how far down the gene label will be displayed. Default 2.75.
Optional. The font size for the gene label to be displayed. Default 3.
Optional. How strong the gene name label will be pulled towards a data point. Default 0 (no pulling).
Optional. Indicates whether arrow to the data point should be curved. Accepts numeric value, where negative is for left-hand and positive for right-hand curves, and 0 for straight lines. Default 0.25.
Optional. Indicates number of control points to make a smoother curve. Higher value allows for more flexibility for the curve. Default 4.
Optional. Numeric value in the range 0-180, where less than 90 skews control points of the arrow from label to data point toward the start point. Default 25.
plot
This function uses GISTIC2.0 scores to create a chromosome plot, based on a similar plotting function from maftools
.
The only required parameter for this function is scores
, which is the path to a file with GISTIC2.0 scores.
Other parameters are all optional. For a detailed explanation of how to use these, refer to the parameter descriptions.
if (FALSE) {
#basic usage
prettyChromoplot("path_to_gistic_results/scores.gistic")
#advanced usages
prettyChromoplot(scorees = "path_to_gistic_results/scores.gistic",
genes_to_label = "path_to_gene_coordinates_table.tsv",
cutoff = 0.75) +
... #any ggplot options to customize plot appearance
}