gv_mut_load: gv_mut_load

View source: R/gv_mut_load.R

gv_mut_loadR Documentation

gv_mut_load

Description

Summarises the total number of mutations per sample and compares different groups of interest.

Usage

gv_mut_load(
  muts,
  metadata,
  response,
  compare = NULL,
  p_label = "p.format",
  colors = c("black", "orange")
)

Arguments

muts

Data frame containing genomic variations. Necessary columns must have the following names: - Hugo_Symbol: Gene symbol from HGNC. - Chromosome: Affected chromosome. - Start_Position: Mutation start coordinate. - End_Position: Mutation end coordinate. - Reference_Allele: The plus strand reference allele at this position. Includes the deleted sequence for a deletion or "-" for an insertion. - Tumor_Seq_Allele2: Tumor sequencing discovery allele. - Variant_Classification: Translational effect of variant allele. Can be one of the following: Frame_Shift_Del, Frame_Shift_Ins, In_Frame_Del, In_Frame_Ins, Missense_Mutation, Nonsense_Mutation, Silent, Splice_Site, Translation_Start_Site, Nonstop_Mutation, RNA, Targeted_Region. - Variant_Type: Type of mutation. Can be: 'SNP' (Single nucleotide polymorphism), 'DNP' (Double nucleotide polymorphism), 'INS' (Insertion), 'DEL' (Deletion). - Tumor_Sample_Barcode: Sample name.

metadata

Data frame that contains supporting variables to the data.

response

Unquoted name of the variable indicating the groups to analyse.

compare

A character string indicating which method to be used for comparing means. Options are 't.test' and 'wilcox.test' for two groups or 'anova' and 'kruskal.test' for more groups. Default value is NULL.

p_label

Character string specifying label type. Allowed values include 'p.signif' (shows the significance levels), 'p.format' (shows the formatted p-value).

colors

Character vector indicating the colors of the different groups to compare. Default values are two: black and orange.

Value

Returns a ggplot object and a data frame with the data.

Examples

mut.load <- gv_mut_load(muts = sample_mutations,
                        metadata = sample_metadata,
                        response = MSI_status,
                        compare = 'wilcox.test',
                        p_label = 'p.format',
                        colors = c('orange', 'black'))


oriolarques/GEGVIC documentation built on Oct. 30, 2024, 10:44 p.m.