README.md

Please Note

Modified by Shaghayegh Soudi November 2021

Two new arguments (min_rho and max_rho) have added to the battenberg_wgs.R script. This is useful for cases where we have a good prediction about the range of purity in our sample which can be obtained from DPclust package. The original battenberg searchs for the purity from the minimum of 0.1 to the maximium of 1 and sometimes overstimates or understimates purity. Having a range is very useful to avoid over-under stimating purity.

Battenberg

This repository contains code for the whole genome sequencing subclonal copy number caller Battenberg, as described in Nik-Zainal, Van Loo, Wedge, et al. (2012), Cell. The code was forked from Wedge-Oxford/battenberg and modified to function with hg38 genomes with chr prefixed chromosome names.

Installation instructions

The instructions below will install the latest stable Battenberg version.

Prerequisites

Installing from Github requires devtools and Battenberg requires readr, splines, RColorBrewer and ASCAT, while the pipeline requires parallel and doParallel. From the command line run:

R -q -e 'source("http://bioconductor.org/biocLite.R"); biocLite(c("devtools", "splines", "readr", "doParallel", "ggplot2", "RColorBrewer", "gridExtra", "gtools", "parallel"));'
R -q -e 'devtools::install_github("Crick-CancerGenomics/ascat/ASCAT")'

Installation from Github

To install Battenberg, run the following from the command line:

R -q -e 'devtools::install_github("morinlab/battenberg")'

Required reference files

hg19/grch37

Battenberg requires reference files for GRCh37 can be downloaded from here: https://ora.ox.ac.uk/objects/uuid:2c1fec09-a504-49ab-9ce9-3f17bac531bc. Support for hg38 is now available (see below).

These files work as-is with non-prefixed chromosome names. Many of the files will need to be modified before they can be used with bams that contain chr-prefixed chromosome names The bundle contains the following files:

hg38/grch38

Pipeline

Go into inst/example for example WGS and SNP6 R-only pipelines.

Description of the output

Key output files

The copy number profile saved in the [samplename]_subclones.txt is a tab delimited file in text format. Within this file there is a line for each segment in the tumour genome. Each segment will have either one or two copy number states:

A copy number state consists of a major and a minor allele and their frequencies, which together add give the total copy number for that segment and an estimate fraction of tumour cells that carry each allele.

The following columns are available in the Battenberg output:

| Column | Description | | ------------- | ------------- | | chr | The chromosome of the segment | | startpos | Start position on the chromosome | | endpos | End position on the chromosome | | BAF | The B-allele frequency of the segment | | pval | P-value that is obtained when testing whether this segment should be represented by one or two states. A low p-value will result in the fitting of a second copy number state | | LogR | The log ratio of normalised tumour coverage versus its matched normal sequencing sample | | ntot | An internal total copy number value used to determine the priority of solutions. NOTE: This is not the total copy number of this segment! | | nMaj1_A | The major allele copy number of state 1 from solution A | | nMin1_A | The minor allele copy number of state 1 from solution A | | frac1_A | Fraction of tumour cells carrying state 1 in solution A | | nMaj2_A | The major allele copy number of state 2 from solution A. This value can be NA | | nMin2_A | The minor allele copy number of state 2 from solution A. This value can be NA | | frac2_A | Fraction of tumour cells carrying state 2 in solution A. This value can be NA | | SDfrac_A | Standard deviation on the BAF of SNPs in this segment, can be used as a measure of uncertainty | | SDfrac_A_BS | Bootstrapped standard deviation | | frac1_A_0.025 | Associated 95% confidence interval of the bootstrap measure of uncertainty |

Followed by possible equivalent solutions B to F with the same columns as defined above for solution A (due to the way a profile is fit Battenberg can generate a series of equivalent solutions that are reported separately in the output).

Plots for QC

It also produces a number plots that show the raw data and are useful for QC (and their raw data files denoted by *.tab)

Intermediate figures

Finally, a range of plots show intermediate steps and can occasionally be useful

Advice for including structural variant breakpoints

Battenberg can take prior breakpoints, from structural variants (SVs) for example, as input. SV breakpoints are typically much more precise and a pair of SVs can be closer together then what typically can be obtained from a BAF or coverage track. It is therefore adventageous to include prior breakpoints in a Battenberg run. However, including too many (as in 100s) incorrect breakpoints can have adverse effects by allowing many small segments to be affected by noise where there isn't any signal and increasing the runtime of the pipeline. It is therefore advised to filter prior breakpoints from SVs such that the genome is slightly oversegmented. Finally, some SV types, such as inversions, do not constitute a change in copy number and therefore also add breakpoints that should not be considered. It is therefore also advised to filter breakpoints from SVs that do not cause a change in copynumber, such as inversions.



shaghayeghsoudi/Battenberg_customized documentation built on Feb. 13, 2022, 4:10 a.m.