Skip to content

Commit

Permalink
Merge pull request #82 from umccr/patch1-pd
Browse files Browse the repository at this point in the history
Grab correct cancer gene panel somatic_panel-v24.03.0.tsv
  • Loading branch information
pdiakumis authored Aug 20, 2024
2 parents c16f9a2 + cead7f1 commit 1226f7a
Show file tree
Hide file tree
Showing 16 changed files with 73 additions and 1,330 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# R specific hooks: https://github.com/lorenzwalthert/precommit
repos:
- repo: https://github.com/lorenzwalthert/precommit
rev: v0.3.2
rev: v0.4.3
hooks:
- id: style-files
args: [--style_pkg=styler, --style_fun=tidyverse_style]
Expand All @@ -14,7 +14,7 @@ repos:
- id: use-tidy-description
- id: readme-rmd-rendered
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
rev: v4.6.0
hooks:
- id: check-added-large-files
args: ['--maxkb=200']
Expand Down
6 changes: 3 additions & 3 deletions R/purple.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ purple_cnv_som_gene_read <- function(x) {
#'
#' @examples
#' x <- system.file("extdata/purple/purple.cnv.gene.tsv", package = "gpgr")
#' g <- system.file("extdata/ref/umccr_cancer_genes_v24.03.0.tsv", package = "gpgr")
#' g <- system.file("extdata/ref/somatic_panel-v24.03.0.tsv", package = "gpgr")
#' (pp <- purple_cnv_som_gene_process(x, g))
#' @testexamples
#' expect_equal(colnames(pp$tab)[ncol(pp$tab)], "minRegSupportStartEndMethod")
Expand All @@ -60,11 +60,11 @@ purple_cnv_som_gene_read <- function(x) {
purple_cnv_som_gene_process <- function(x, g = NULL) {
purple_cnv_gene <- purple_cnv_som_gene_read(x)
if (is.null(g)) {
g <- system.file("extdata/ref/umccr_cancer_genes_v24.03.0.tsv", package = "gpgr")
g <- system.file("extdata/ref/somatic_panel-v24.03.0.tsv", package = "gpgr")
}
genes <-
readr::read_tsv(g, col_types = readr::cols(
ensembl_gene_symbol = "c", oncogene = "l", tumorsuppressor = "l"
ensembl_gene_symbol = "c", oncogene = "l", tsgene = "l"
)) |>
dplyr::select(symbol = "ensembl_gene_symbol", "oncogene", "tsgene")
oncogenes <- genes |>
Expand Down
2 changes: 1 addition & 1 deletion R/sv.R
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ join_breakpoint_entries <- function(x) {
# Group by GRIDSS identifier (clipping trailing h/o [h: High, o: lOwer])
bps <- x |>
tidyr::separate("ID", into = c("BND_group", "BND_mate"), sep = -1, convert = TRUE, remove = FALSE) |>
dplyr::group_by(BND_group)
dplyr::group_by(.data$BND_group)

# Set a sequential breakpoint identifier
bps_groups <- bps |> dplyr::n_groups()
Expand Down
6 changes: 3 additions & 3 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ conda install r-gpgr -c umccr -c conda-forge -c bioconda
(<https://github.com/hartwigmedical/hmftools/tree/master/purple>).
See vignette at <https://umccr.github.io/gpgr/articles/purple.html>.

### 🐍 umccrise {#id_-umccrise}
### sash {#id_-sash}

- Generate a HTML report with results from the `umccrise` DRAGEN tumor/normal
post-processing workflow from UMCCR - <https://github.com/umccr/umccrise>.
- Generate a HTML report with results from the `sash` WGS post-processing workflow
- <https://github.com/scwatts/sash>.
See the [CLI](#cli) section below for options.

## 🥳 Developers {#id_-developers}
Expand Down
87 changes: 37 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@

- [📚 gpgr - Genomics Platform Group
Reporting](#-gpgr---genomics-platform-group-reporting)
Reporting](#books-gpgr---genomics-platform-group-reporting)
- [Installation](#installation)
- [Main modules](#main-modules)
- [🕸 LINX](#id_-linx)
- [🔮 PURPLE](#id_-purple)
- [🐍 umccrise](#id_-umccrise)
- [sash](#id_-sash)
- [🥳 Developers](#id_-developers)
- [💻 CLI](#id_-cli)

Expand Down Expand Up @@ -37,28 +36,19 @@ conda install r-gpgr -c umccr -c conda-forge -c bioconda

## Main modules

### 🕸 LINX

- Generate a HTML report with results from the `LINX` structural variant
visualisation tool from the Hartwig Medical Foundation
(<https://github.com/hartwigmedical/hmftools/tree/master/linx>). See
the [CLI](#cli) section below for options.
- For useful functions for reading/processing `LINX` results, see the
vignette at <https://umccr.github.io/gpgr/articles/linx.html>.

### 🔮 PURPLE

- Read and process output files from the `PURPLE` purity/copy number
estimator tool from the Hartwig Medical Foundation
(<https://github.com/hartwigmedical/hmftools/tree/master/purple>). See
vignette at <https://umccr.github.io/gpgr/articles/purple.html>.

### 🐍 umccrise
### sash

- Generate a HTML report with results from the `umccrise` DRAGEN
tumor/normal post-processing workflow from UMCCR -
<https://github.com/umccr/umccrise>. See the [CLI](#cli) section below
for options.
- Generate a HTML report with results from the `sash` WGS
post-processing workflow
- <https://github.com/scwatts/sash>. See the [CLI](#cli) section below
for options.

## 🥳 Developers

Expand All @@ -80,52 +70,40 @@ export PATH="${gpgr_cli}:${PATH}"
```

gpgr.R --version
gpgr.R 1.4.3
gpgr.R 2.1.0

#-----------------------------------#
gpgr.R --help
usage: gpgr.R [-h] [-v] {linx,canrep} ...
usage: gpgr.R [-h] [-v] {canrep} ...

UMCCR Genomics Platform Group Reporting

positional arguments:
{linx,canrep} sub-command help
linx UMCCR LINX Report.
{canrep} sub-command help
canrep UMCCR Cancer Report.

options:
-h, --help show this help message and exit
-v, --version show program's version number and exit

#-----------------------------------#
#------- LINX Report -------#
gpgr.R linx --help
usage: gpgr.R linx [-h] --sample SAMPLE --plot PLOT --table TABLE [--out OUT]
[--quiet]

options:
-h, --help show this help message and exit
--sample SAMPLE Sample name.
--plot PLOT Path to LINX plot directory.
--table TABLE Path to LINX table directory.
--out OUT HTML output file name [def: linx_{sample}.html].
--quiet Suppress log printing during rendering.

#-----------------------------------#
#------- Cancer Report -------#
gpgr.R canrep --help
usage: gpgr.R canrep [-h] --af_global AF_GLOBAL --af_keygenes AF_KEYGENES
--batch_name BATCH_NAME --conda_list CONDA_LIST --img_dir
IMG_DIR --key_genes KEY_GENES --somatic_snv_summary
SOMATIC_SNV_SUMMARY --somatic_snv_vcf SOMATIC_SNV_VCF
--batch_name BATCH_NAME [--conda_list CONDA_LIST]
--img_dir IMG_DIR --key_genes KEY_GENES --oncokb_genes
ONCOKB_GENES --somatic_snv_vcf SOMATIC_SNV_VCF
--somatic_snv_summary SOMATIC_SNV_SUMMARY
--somatic_sv_tsv SOMATIC_SV_TSV --somatic_sv_vcf
SOMATIC_SV_VCF --purple_som_gene_cnv PURPLE_SOM_GENE_CNV
--purple_som_cnv PURPLE_SOM_CNV --purple_purity
PURPLE_PURITY --purple_qc PURPLE_QC --purple_som_snv_vcf
PURPLE_SOM_SNV_VCF --oncoviral_present_viruses
ONCOVIRAL_PRESENT_VIRUSES --oncoviral_breakpoints_tsv
ONCOVIRAL_BREAKPOINTS_TSV [--out_file OUT_FILE] [--quiet]
--result_outdir RESULT_OUTDIR --tumor_name TUMOR_NAME
--purple_som_cnv_ann PURPLE_SOM_CNV_ANN --purple_som_cnv
PURPLE_SOM_CNV --purple_purity PURPLE_PURITY --purple_qc
PURPLE_QC --purple_som_snv_vcf PURPLE_SOM_SNV_VCF
--virusbreakend_tsv VIRUSBREAKEND_TSV --virusbreakend_vcf
VIRUSBREAKEND_VCF --dragen_hrd DRAGEN_HRD
--bcftools_stats BCFTOOLS_STATS [--out_file OUT_FILE]
[--quiet] --result_outdir RESULT_OUTDIR --tumor_name
TUMOR_NAME

options:
-h, --help show this help message and exit
Expand All @@ -140,16 +118,21 @@ export PATH="${gpgr_cli}:${PATH}"
--img_dir IMG_DIR Path to directory containing PURPLE plots.
--key_genes KEY_GENES
Path to UMCCR cancer gene file.
--somatic_snv_summary SOMATIC_SNV_SUMMARY
Path to `somatic_snv_summary.json`.
--oncokb_genes ONCOKB_GENES
Path to OncoKB database file.
--somatic_snv_vcf SOMATIC_SNV_VCF
Path to `somatic-PASS.vcf.gz` SNV VCF.
--somatic_snv_summary SOMATIC_SNV_SUMMARY
Path to `somatic_snv_summary.json` JSON.
--somatic_sv_tsv SOMATIC_SV_TSV
Path to `manta.tsv` TSV file.
--somatic_sv_vcf SOMATIC_SV_VCF
Path to `manta.vcf.gz` VCF file.
--purple_som_gene_cnv PURPLE_SOM_GENE_CNV
Path to `purple.cnv.gene.tsv`.
--purple_som_cnv_ann PURPLE_SOM_CNV_ANN
Path to annotated and prioritised
`purple.cnv.somatic.tsv`.
--purple_som_cnv PURPLE_SOM_CNV
Path to `purple.cnv.somatic.tsv`.
--purple_purity PURPLE_PURITY
Expand All @@ -158,10 +141,14 @@ export PATH="${gpgr_cli}:${PATH}"
Path to `purple.qc`.
--purple_som_snv_vcf PURPLE_SOM_SNV_VCF
Path to `purple.somatic.vcf.gz`.
--oncoviral_present_viruses ONCOVIRAL_PRESENT_VIRUSES
Path to `oncoviruses/present_viruses.txt`.
--oncoviral_breakpoints_tsv ONCOVIRAL_BREAKPOINTS_TSV
Path to `oncoviruses/oncoviral_breakpoints.tsv`.
--virusbreakend_tsv VIRUSBREAKEND_TSV
Path to VIRUSBreakend summary file.
--virusbreakend_vcf VIRUSBREAKEND_VCF
Path to VIRUSBreakend VCF file.
--dragen_hrd DRAGEN_HRD
Path to DRAGEN HRD file
--bcftools_stats BCFTOOLS_STATS
Path to bcftools stats file
--out_file OUT_FILE Path to output HTML file (needs '.html' suffix) [def:
{tumor_name}_cancer_report.html].
--quiet Suppress log printing during rendering.
Expand Down
4 changes: 2 additions & 2 deletions inst/extdata/purple/purple.purity.tsv.dvc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
outs:
- md5: b7e6e168bb07e3dc3bcab9934cda9094
size: 482
- md5: 37113a19fbacef8079824f7802f8ee4d
size: 468
path: purple.purity.tsv
hash: md5
4 changes: 2 additions & 2 deletions inst/extdata/purple/purple.qc.dvc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
outs:
- md5: c10f44c2a7dc2b29cd2971efc94e0b0d
size: 228
- md5: 2ec1cbc0a2c173f8154de718e82afb5d
size: 246
path: purple.qc
hash: md5
1 change: 1 addition & 0 deletions inst/extdata/ref/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/umccr_cancer_genes_v24.03.0.tsv
/somatic_panel-v24.03.0.tsv
5 changes: 5 additions & 0 deletions inst/extdata/ref/somatic_panel-v24.03.0.tsv.dvc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
outs:
- md5: 5ada82f5b399519a6ed34d5449a343f4
size: 50539
hash: md5
path: somatic_panel-v24.03.0.tsv
Loading

0 comments on commit 1226f7a

Please sign in to comment.