knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
require(gpgr)
require(devtools)
require(dplyr)
require(knitr)

Introduction

PURPLE: Purity Ploidy Estimator (https://github.com/hartwigmedical/hmftools/tree/master/purple)

PURPLE combines B-allele frequency, read depth ratios, small variants and structural variants to estimate the purity and copy number profile of a tumor sample.

It outputs several files, some of which are displayed below.

Data Munging

Somatic CNVs (per chromosome)

cnv_som <- system.file("extdata/purple/purple.cnv.somatic.tsv", package = "gpgr") |>
  gpgr::purple_cnv_som_process()

Description

cnv_som$descr |>
  knitr::kable(format = "html", caption = "PURPLE Somatic CNVs (per chromosome) Columns.")

cnv_som$tab |>
  dplyr::slice(1:10) |>
  knitr::kable(format = "html", caption = "PURPLE Somatic CNVs (per chromosome) Summary Table.")

Somatic CNVs (per gene)

umccr_key_genes <- system.file("extdata/ref/umccr_cancer_genes_2019-03-20.tsv", package = "gpgr")
cnv_som_gene <- system.file("extdata/purple/purple.cnv.gene.tsv", package = "gpgr") |>
  gpgr::purple_cnv_som_gene_process(g = umccr_key_genes)

Description

cnv_som_gene$descr |>
  knitr::kable(format = "html", caption = "PURPLE Somatic CNVs (per gene) Columns.")

cnv_som_gene$tab |>
  dplyr::slice(1:10) |>
  knitr::kable(format = "html", caption = "PURPLE Somatic CNVs (per gene) Summary Table.")

Germline CNVs (per chromosome)

cnv_germ <- system.file("extdata/purple/purple.cnv.germline.tsv", package = "gpgr") |>
  gpgr::purple_cnv_germ_process()

Description

cnv_germ$descr |>
  knitr::kable(format = "html", caption = "PURPLE Germline CNVs (per chromosome) Columns.")

cnv_germ$tab |>
  dplyr::slice(1:10) |>
  knitr::kable(format = "html", caption = "PURPLE Germline CNVs (per chromosome) Summary Table.")

Purity

purity <- system.file("extdata/purple/purple.purity.tsv", package = "gpgr") |>
  gpgr::purple_purity_read()

purity$summary |>
  knitr::kable(format = "html", caption = "PURPLE Purity Summary Table.")

Kataegis

kat <- system.file("extdata/purple/purple.somatic.vcf.gz", package = "gpgr") |>
  purple_kataegis()
kat$data |>
  knitr::kable(format = "html", caption = "PURPLE Kataegis Table.")

Description

knitr::kable(kat$description, format = "html", caption = "Kataegis column description.")

QC

qc <- system.file("extdata/purple/purple.qc", package = "gpgr") |>
  gpgr::purple_qc_read()

qc$summary |>
  knitr::kable(format = "html", caption = "PURPLE QC Summary Table.")

Session Info

pkgs_of_interest <- c("base", "gpgr")
si <- gpgr::session_info_kable(pkgs_of_interest)
si$si_pkg
si$si_pl


umccr/gpgr documentation built on Jan. 19, 2022, 1:51 p.m.