Skip to content

Commit

Permalink
Merge branch 'main' into oncoanalyser-sash-inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
pdiakumis authored Apr 16, 2024
2 parents 9d67293 + 7884814 commit f704447
Show file tree
Hide file tree
Showing 58 changed files with 1 addition and 2,303 deletions.
21 changes: 0 additions & 21 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,6 @@ export(dragen_hrd)
export(get_oncokb_genes)
export(hrd_results_tabs)
export(is_vcf)
export(linx_breakend_process)
export(linx_breakend_read)
export(linx_clusters_process)
export(linx_clusters_read)
export(linx_drivercatalog_process)
export(linx_drivercatalog_read)
export(linx_drivers_process)
export(linx_drivers_read)
export(linx_fusion_process)
export(linx_fusion_read)
export(linx_links_process)
export(linx_links_read)
export(linx_rmd)
export(linx_svs_process)
export(linx_svs_read)
export(linx_viscopynumber_read)
export(linx_visfusion_read)
export(linx_visgeneexon_read)
export(linx_visproteindomain_read)
export(linx_vissegments_read)
export(linx_vissvdata_read)
export(mkdir)
export(pkg_exists)
export(plot_bnd_sr_pr_tot_hist)
Expand Down
449 changes: 0 additions & 449 deletions R/linx.R

This file was deleted.

188 changes: 0 additions & 188 deletions R/linx_vis.R

This file was deleted.

55 changes: 0 additions & 55 deletions R/rmd.R
Original file line number Diff line number Diff line change
@@ -1,58 +1,3 @@
#' Generate UMCCR LINX Report
#'
#' Generates a UMCCR LINX HTML report. It does so with the following steps:
#' 1. recursively copy the table and plot directories into tmp/plot and tmp/table
#' 2. copy the rmd into tmp/linx.Rmd
#' 3. render the rmd inside tmp/
#' 4. return the path to the output HTML
#'
#' @param sample Name of sample.
#' @param table_dir Path to LINX table directory.
#' @param plot_dir Path to LINX plot directory.
#' @param out_file Path to output HTML file (needs '.html' suffix).
#' @param quiet Suppress printing during rendering.
#'
#' @return Path to rendered HTML report.
#' @export
linx_rmd <- function(sample, table_dir, plot_dir, out_file = NULL, quiet = FALSE) {
assertthat::assert_that(
is.character(sample), nchar(sample) > 0,
dir.exists(table_dir), dir.exists(plot_dir),
quiet %in% c(FALSE, TRUE)
)
if (!is.null(out_file)) {
assertthat::assert_that(
is.character(out_file),
tools::file_ext(out_file) == "html"
)
} else {
out_file <- glue::glue("linx_{sample}.html")
}
tmp_dir <- tempdir()
rmd_dir <- system.file("rmd/linx", package = "gpgr")
cpdir(table_dir, tmp_dir)
cpdir(plot_dir, tmp_dir)
cpdir(rmd_dir, tmp_dir)
rmd_file <- file.path(tmp_dir, "linx", "linx.Rmd")
out_dir <- dirname(out_file)
mkdir(out_dir)
pars <- list(
table_dir = table_dir,
plot_dir = plot_dir,
sample = sample
)
# suppress DT large size warning
options(DT.warn.size = FALSE)
rmarkdown::render(
input = rmd_file,
params = pars,
output_dir = out_dir,
output_file = I(out_file),
run_pandoc = TRUE,
quiet = quiet
)
}

#' Generate UMCCR Cancer Report
#'
#' Generates a UMCCR Cancer Report. It does so with the following steps:
Expand Down
13 changes: 0 additions & 13 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,6 @@ conda install r-gpgr -c umccr -c conda-forge -c bioconda

## Main modules

### 🕸 LINX {#id_-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 {#id_-purple}

- Read and process output files from the `PURPLE` purity/copy number estimator
Expand Down Expand Up @@ -89,10 +80,6 @@ echo "#-----------------------------------#"
echo "gpgr.R --help" & gpgr.R --help
echo ""
echo "#-----------------------------------#"
echo "#------- LINX Report -------#"
echo "gpgr.R linx --help" & gpgr.R linx --help
echo ""
echo "#-----------------------------------#"
echo "#------- Cancer Report -------#"
echo "gpgr.R canrep --help" & gpgr.R canrep --help
echo ""
Expand Down
6 changes: 1 addition & 5 deletions inst/cli/gpgr.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,15 @@ p$add_argument("-v", "--version", action = "version", version = glue::glue("{pro
subparser_name <- "subparser_name"
subp <- p$add_subparsers(help = "sub-command help", dest = subparser_name)

source(system.file("cli/linx.R", package = "gpgr"))
source(system.file("cli/canrep.R", package = "gpgr"))

linx_add_args(subp)
canrep_add_args(subp)

args <- p$parse_args()
if (length(args$subparser_name) == 0) {
p$print_help()
} else if (args$subparser_name == "linx") {
linx_parse_args(args)
} else if (args$subparser_name == "canrep") {
canrep_parse_args(args)
} else {
stop("Need to specify 'linx' or 'canrep' in the cli...")
stop("Need to specify 'canrep' in the cli...")
}
24 changes: 0 additions & 24 deletions inst/cli/linx.R

This file was deleted.

5 changes: 0 additions & 5 deletions inst/extdata/linx/README.md

This file was deleted.

15 changes: 0 additions & 15 deletions inst/extdata/linx/tables/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions inst/extdata/linx/tables/linx.breakend.tsv.gz.dvc

This file was deleted.

4 changes: 0 additions & 4 deletions inst/extdata/linx/tables/linx.clusters.tsv.gz.dvc

This file was deleted.

4 changes: 0 additions & 4 deletions inst/extdata/linx/tables/linx.driver.catalog.tsv.gz.dvc

This file was deleted.

4 changes: 0 additions & 4 deletions inst/extdata/linx/tables/linx.drivers.tsv.gz.dvc

This file was deleted.

4 changes: 0 additions & 4 deletions inst/extdata/linx/tables/linx.fusion.tsv.gz.dvc

This file was deleted.

Loading

0 comments on commit f704447

Please sign in to comment.