module_gv: module_gv

View source: R/module_gv.R

module_gvR Documentation

module_gv

Description

Summarises genetic variations, calculates mutational load and predicts mutational signatures in samples of interest.

Usage

module_gv(
  muts,
  metadata,
  response,
  top_genes = 10,
  specific_genes = NULL,
  colors = c("orange", "black"),
  compare = NULL,
  p_label = "p.format",
  gbuild = "BSgenome.Hsapiens.UCSC.hg19",
  mut_sigs = "COSMIC_v2_SBS_GRCh37",
  tri.counts.method = "default",
  col.names = TRUE
)

Arguments

muts

Data frame containing genetic 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.

top_genes

Number of genes to be analysed in the mutational summary.

specific_genes

Genes that will be plotted in the oncoplot.

colors

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

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).

gbuild

Version of the genome to work with. It can be one of the following: - ‘BSgenome.Hsapiens.UCSC.hg19’ - ‘BSgenome.Hsapiens.UCSC.hg38’ - ‘BSgenome.Mmusculus.UCSC.mm10’ - ‘BSgenome.Mmusculus.UCSC.mm39’

mut_sigs

Mutational signature matrices containing the frequencies of all nucleotide changes per signature need to be indicated. GEGVIC contains the matrices from COSMIC for single and double base substitutions. To choose one, the user has to indicate ’COSMIC_vXX_YYBS_GRChZZ’ in the mut_sigs argument. The XX is the version, that can be v2 or v3.2. YY indicates if mutations are single (S) or double (D) base substitutions, while the ZZ is for the genome assembly, either GRCh37 or GRCh38 for human data and mm9 or mm10 for mouse data.

tri.counts.method

Normalization method. Needs to be set to either: - 'default' – no further normalization - 'exome' – normalized by number of times each trinucleotide context is observed in the exome - 'genome' – normalized by number of times each trinucleotide context is observed in the genome - 'exome2genome' – multiplied by a ratio of that trinucleotide's occurence in the genome to the trinucleotide's occurence in the exome - 'genome2exome' – multiplied by a ratio of that trinucleotide's occurence in the exome to the trinucleotide's occurence in the genome - data frame containing user defined scaling factor – count data for each trinucleotide context is multiplied by the corresponding value given in the data frame.

col.names

Logical value to determine if tumour names s are shown in the heatmap.

Value

Returns plot and ggplot objects to summarise sample mutations, mutational load and mutational signatures. Also it returns a list of data frames with the data necessary to generate the plots.

Examples

tables_module_gv <- module_gv(muts = sample_mutations,
                              metadata = sample_metadata,
                              response = MSI_status,
                              top_genes = 10,
                              specific_genes = NULL,
                              colors = c('orange' ,'black'),
                              compare = 'wilcox.test',
                              p_label = 'p.format',
                              gbuild = 'BSgenome.Hsapiens.UCSC.hg38',
                              mut_sigs = 'COSMIC_v2_SBS_GRCh38',
                              tri.counts.method = 'default',
                              col.names = TRUE)


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