Contents

1 Introduction

The R package BoBafit is composed of four functions which allow the refit and the recalibration of copy number profile of tumor sample. In particular, the package was built to check, and possibly correct, the diploid regions. The wrong diploid region is a phenomenon that very often affects the profiles of samples with a very complex karyotype.

The principal and refitting function was named DRrefit, which - throughout a chromosome clustering method and a list of unaltered chromosomes (chromosome list) - recalibrates the copy number values. BoBafit also contains three secondary functions: ComputeNormalChromosome, which generates the chromosome list; PlotChrCluster, where is possible to visualize the cluster; and Popeye, which affixes its chromosomal arm to each segment (see in “Data Preparation” vignette).

2 Data

The package checks the diploid region assessment working on pre-estimated segment information, as the copy number and their position. We included a data set TCGA_BRCA_CN_segments where are showed all the information necessary. The data correspond to segments about 100 breast tumors samples obtained by the project TCGA-BRCA (Tomczak, Czerwińska, and Wiznerowicz 2015). In the “Data Preparation” vingnette is shown how we download and prepare the dataset for the following analysis.

## Warning: replacing previous import 'ggplot2::geom_segment' by
## 'ggbio::geom_segment' when loading 'BOBaFIT'

3 BOBaFIT Workflow

Once the dataset has been prepared, the next step is to generate the chromosome list. The chromosome list is a vector containing all chromosomal arm which are the least affected by SCNAs in the tumor analyzed. Together with the clustering, the chromosome list is one the operating principles to rewrite the diploid region. The list can be manually created or by using the function ComputeNormalChromosome. We suggest these two sequential steps to allow the right refit and recalibration of sample’s diploid region:

  1. ComputeNormalChromosome()

  2. DRrefit()

Here we performed this analysis workflow on the dataset TCGA_BRCA_CN_segments described above.

3.1 ComputeNormalChromosome

The chromosome list is a vector specific for each tumor (type and subtype) . The chromosome arms included in this list must be selected based on how many CNA events they are subject to and how many times their CN falls into a “diploid range”. According to this principle, ComputeNormalChromosome write the chromosome list. The function allows to set the chromosomal alteration rate (tolerance_val), which corresponds to a minimum percentage of alterations that one wants to tolerate per arm.

With a little dataframe (less than 200 samples), we suggest an alteration rate of 5% (0.5) ; on the contrary, With a big dataframe (about 1000 samples), we suggest as maximum rate 20-25% (0.20-0.25) . The function input is a sample cohort with their segments.

Here we performed the function in the data set TCGA_BRCA_CN_segments, using an alteration rate of 25%.

chr_list

[1] “10q” “12q” “15q” “2p” “2q” “3p” “4q” “9q”

Storing the result in the variable chr_list, it will be a vector containing the chromosomal arms which present an alteration rate under the indicated tolerance_val value.

The function also plots in the Viewer a histogram where is possible observe the chromosomal alteration rate of each chromosomal arms and which one have been selected in the chromosome list (blue bars). The tolerance value has been set at 0.25 (dotted line).

\end{kframe}\begin{adjustwidth}{}{0mm} \includegraphics[width=100%]{/tmp/RtmplXpsds/Rbuild7c3ef3a37abab/BOBaFIT/vignettes/BOBaFIT_files/figure-html/chrlist plot-1} \end{adjustwidth} \begin{adjustwidth}{}{0mm} \includegraphics[width=100%]{/tmp/RtmplXpsds/Rbuild7c3ef3a37abab/BOBaFIT/vignettes/BOBaFIT_files/figure-html/DRrefit_plot 1-1} \end{adjustwidth}

\begin{adjustwidth}{}{0mm} \includegraphics[width=100%]{/tmp/RtmplXpsds/Rbuild7c3ef3a37abab/BOBaFIT/vignettes/BOBaFIT_files/figure-html/DRrefit_plot 2-1} \end{adjustwidth}\begin{kframe}

4 PlotChrCluster

Another accessory function is PlotChrCluster. It can be used to visualize the chromosomal cluster in a single sample or in a sample cohort. The input data is always a .tsv file, as the data frame TCGA_BRCA_CN_segments. The option of clust_method argument are the same of DRrefit(“ward.D”, “ward.D2”, “single”, “complete”, “average”, “mcquitty”, “median”, “centroid” and “kmeans”).

Cluster <- PlotChrCluster(segs = TCGA_BRCA_CN_segments,
                       clust_method = "ward.D2",
                       plot_output= TRUE)

We suggest to store the output on a variable (in this example we use Cluster) to view and possibly save the data frame generated. The PlotCuster will automatically save the plot in the folder indicated by the variable path of the argument plot_path.

In the PlotChrCluster plot, the chromosomal arms are labeled and colored according to the cluster they belong to. The y-axis reports the arm CN.