boxplotCCF.patients: Plot boxplot of patients mutations CCF's for top genes.

Description Usage Arguments Value Examples

View source: R/plots.R

Description

boxplotCCF.patients Function to plot CCF's of aggregated patient-gene mutatuons, for top genes.

Usage

1
2
3
4
5
boxplotCCF.patients(sample.mutations, result.df, topGenes = 20,
  silent = FALSE, indels = TRUE, mode = "MAX", epsilon = 0.05,
  sample.gene.lim = 1, Tumor_Sample_Barcode = NULL, Hugo_Symbol = NULL,
  CCF = NULL, Variant_Classification = NULL, Variant_Type = NULL,
  color = NULL, shape = NULL)

Arguments

sample.mutations

data frame in MAF like format. Columns (with exactly same names) which sample.mutations should have are:

  • Tumor_Sample_Barcode column specifed by MAF format, reporting for each SNV in wich patient was found.

  • Hugo_Symbol column specifed by MAF format, which reports gene for each SNV.

  • CCF numeric column produce by CCF function.

  • Variant_Classification column specifed by MAF format, used to distinguish between silent and nonsilent SNVs

  • Variant_Type columns pecifed by MAF format; is mutation SNV or InDel

result.df

a data frame with Hugo_Symbol column. Genes in this column should be ordered by importance.

topGenes

a numeric/integer value; How meny top genes from results will be ploted.

silent

a boolean value indicating should silent mutations be counted. By default it is True.

indels

a boolean value indicating should indels be counted. By default it is True.

mode

a charechter value indicationg how to solve when in one gene-sample pair there are multiple mutations. Options are SUM, MAX and ADVANCE

epsilon

a numeric value. If mode is ADVANCE, epsilone value will be threshold for CCF difference to decide if they are in same or different clone.

sample.gene.lim

a numeric value specifying upper limit when summing is perfomed for gene-sample pair

Tumor_Sample_Barcode

(optional) integer/numeric value indicating column in sample.mutations which have sample ids for SNVs/Indels. Default is NULL value (in this case sample.mutations should already have this column)

Hugo_Symbol

(optional) integer/numeric value indicating column in sample.mutations having gene names for reported SNVs/Indels. Default is NULL value (in this case sample.mutations should already have this column)

CCF

(optional) integer/numeric value indicating column in sample.mutations which have cancer cell fraction information for SNVs/Indels. Default is NULL value (in this case sample.mutations should already have this column)

Variant_Classification

(optional) integer/numeric value indicating column in sample.mutations which contain classification for SNV (Silent or not). Default is NULL value (in this case sample.mutations should already have this column)

Variant_Type

(optional) integer/numeric value indicating column in sample.mutations which contains indormation if mutations is SNV or InDel . Default is NULL value (in this case sample.mutations should already have this column)

color

(optional) charachter value indicating column in sample.mutations to used as color dots. Default is NULL value and grey dots gonna be ploted. This variable should be unique by patients.

shape

(optional) charachter value indicating column in sample.mutations to used as shape for dots . Default is NULL value and grey dots gonna be ploted. This variable should be unique by patients.

Value

ggplot2 object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#get CCF column
sample.genes.mutect <- CCF(sample.genes.mutect)
# get background
bcgr.prob <- bcgr.combine(sample.genes.mutect)
# get ranking
df1 <- bayes.risk(sample.genes.mutect, bcgr.prob,  prior.sick = 0.00007) 
df2 <- bayes.driver(sample.genes.mutect, bcgr.prob,  prior.driver = 0.001) 
df.final <- combine.ranking(list(df1, df2),  min.mut = 2 )
# plot boxplot of CCF for top genes
boxplotCCF(sample.mutations=sample.genes.mutect, result.df=df.final)

hanasusak/cDriver documentation built on May 17, 2019, 2:27 p.m.