Skip to content

Commit

Permalink
crancheck update
Browse files Browse the repository at this point in the history
  • Loading branch information
pdiakumis committed Dec 1, 2023
1 parent fdc404b commit a4b73f7
Show file tree
Hide file tree
Showing 17 changed files with 33 additions and 21 deletions.
5 changes: 5 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,8 @@
^\.dvcignore$
^\.dockerignore$
CODE_OF_CONDUCT.md

## inst html
inst/rmd/umccr_portal/html
inst/rmd/umccr_workflows/umccrise/html
inst/rmd/umccr_workflows/bcl_convert/html
7 changes: 4 additions & 3 deletions R/multiqc.R
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,9 @@ multiqc_date_fmt <- function(cdate) {
#'
#' @examples
#' \dontrun{
#' j <- here::here("nogit/warehouse/cttso/2023/05/wfr.ec3748db414f422381e419d367f73eec/dracarys_gds_sync/multiqc_data.json")
#' multiqc_parse_plots(j, plot_names = c("fastqc_gc_content_mean_sequence_quality_plot", "dragen_coverage_per_contig"))
#' j <- "dracarys_gds_sync/multiqc_data.json"
#' multiqc_parse_plots(j, plot_names = c("dragen_coverage_per_contig"))
#' multiqc_parse_plots(j, plot_names = "everything")
#' multiqc_parse_plots(j, plot_names = NULL)
#' }
#' @export
Expand Down Expand Up @@ -428,7 +429,7 @@ multiqc_parse_xyline_plot_contig_cvg <- function(dat) {
#' @examples
#' \dontrun{
#' j1 <- here::here("nogit/bcl_convert/multiqc_data.json")
#' j2 <- here::here("nogit/warehouse/wgs_tumor_normal/SBJ03197/2023-04-30_0813ce/dracarys_gds_sync/multiqc_data.json")
#' j2 <- here::here("nogit/dracarys_gds_sync/multiqc_data.json")
#' j <- j1
#' j <- j2
#' multiqc_list_plots(j)
Expand Down
4 changes: 2 additions & 2 deletions R/portal_meta.R
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ meta_tso_ctdna_tumor_only <- function(pmeta, status = c("Succeeded")) {
#' pmeta <- system.file("extdata/portal_meta_top4.csv", package = "dracarys")
#' (m <- meta_star_alignment(pmeta))
#' @testexamples
#' expect_equal(all(c("s3_outdir_star", "LibraryID_tumor") %in% colnames(m)), TRUE)
#' expect_equal(all(c("s3_outdir_star", "LibraryID") %in% colnames(m)), TRUE)
#' @export
meta_star_alignment <- function(pmeta, status = "Succeeded") {
# retrieve workflow runs with the given type and status
Expand Down Expand Up @@ -710,7 +710,7 @@ meta_oncoanalyser_wgts_existing_both <- function(pmeta, status = "Succeeded") {
#' pmeta <- system.file("extdata/portal_meta_top4.csv", package = "dracarys")
#' (m <- meta_oncoanalyser_wts(pmeta))
#' @testexamples
#' expect_equal(all(c("s3_outdir_oncoanalyser", "LibraryID_tumor", "s3_bam_tumor") %in% colnames(m)), TRUE)
#' expect_equal(all(c("s3_outdir_oncoanalyser", "LibraryID", "s3_bam") %in% colnames(m)), TRUE)
#' @export
meta_oncoanalyser_wts <- function(pmeta, status = "Succeeded") {
# retrieve workflow runs with the given type and status
Expand Down
2 changes: 1 addition & 1 deletion R/s3.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' @return A tibble with path, date, file size, file type, and presigned URL if requested.
#' @examples
#' \dontrun{
#' s3dir <- "s3://umccr-primary-data-prod/Accreditation/ALLOCATE-134131/WGS/2021-07-26/umccrised/ALLOCATE-134131__ALLOCATE-134131_MDx150892_Missing/cancer_report_tables"
#' s3dir <- "s3://umccr-primary-data-prod/cancer_report_tables"
#' s3_files_list_filter_relevant(s3dir = s3dir, presign = TRUE)
#' }
#' @export
Expand Down
4 changes: 2 additions & 2 deletions R/tso.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#'
#' @examples
#' \dontrun{
#' x <- normalizePath("~/icav1/g/production/analysis_data/SBJ00704/tso_ctdna_tumor_only/202311242b9666e0/L2301411/Results/PTC_ctTSO231120_L2301411/dracarys_gds_sync/PTC_ctTSO231120_L2301411_CopyNumberVariants.vcf.gz")
#' x <- normalizePath("CopyNumberVariants.vcf.gz")
#' d <- TsoCopyNumberVariantsVcfFile$new(x)
#' d_parsed <- d$read() # or read(d)
#' d$write(d_parsed, out_dir = tempdir(), prefix = "sample705", out_format = "tsv")
Expand Down Expand Up @@ -50,7 +50,7 @@ TsoCopyNumberVariantsVcfFile <- R6::R6Class(
#'
#' @examples
#' \dontrun{
#' x <- here::here("nogit/tso/2023-05-30/SBJ00595_L2100178/PTC_SrSqCMM1pc_L2100178_rerun_MergedSmallVariants.vcf.gz")
#' x <- "MergedSmallVariants.vcf.gz"
#' d <- TsoMergedSmallVariantsVcfFile$new(x)
#' d_parsed <- d$read() # or read(d)
#' d$write(d_parsed, out_dir = tempdir(), prefix = "sample705", out_format = "tsv")
Expand Down
1 change: 1 addition & 0 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ session_info_tbls <- function(pkgs = NULL) {
#' Output Format is Valid
#'
#' Checks that the specified output format is valid.
#' @param x Output format.
#' @export
dr_output_format_valid <- function(x) {
format_choices <- c("tsv", "parquet", "delta", "rds")
Expand Down
2 changes: 1 addition & 1 deletion R/vcf.R
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ bcftools_parse_vcf <- function(vcf, only_pass = TRUE) {
#'
#' @examples
#' \dontrun{
#' vcf_local <- here::here("nogit/tso/2023-05-30/SBJ00595_L2100178/PTC_SrSqCMM1pc_L2100178_rerun_MergedSmallVariants.vcf.gz")
#' vcf_local <- here::here("MergedSmallVariants.vcf.gz")
#' r <- c("chr1:115256529-115256529", "chr2:29443613-29443613")
#' bcftools_parse_vcf_regions(vcf_local, r)
#' }
Expand Down
5 changes: 3 additions & 2 deletions inst/rmd/umccr_portal/portal_summary.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ get_sbj_url <- function(x, colour = NULL, account = "pro") {
# Get metadata for workflows run within the date range
# options(width = 150)
fmt1 <- "%Y-%m-%dT%H:%M:%S"
date_start <- as.POSIXct("2023-11-22T00:00:01", format = fmt1)
date_end <- as.POSIXct("2023-11-23T23:59:59", format = fmt1)
date_start <- as.POSIXct("2023-11-27T00:00:01", format = fmt1)
date_end <- as.POSIXct("2023-11-28T23:59:59", format = fmt1)
wf_order <- c(
"bcl_convert",
"tso_ctdna_tumor_only",
Expand All @@ -134,6 +134,7 @@ wf_order <- c(
"sash"
)
invisible(capture.output(dracarys:::awsvault_profile("upro")))
lims_rds <- here(glue("nogit/data_portal/lims/{as.Date(date_end)}.rds"))
# lims_raw <- dracarys::glims_read()
# saveRDS(lims_raw, file = lims_rds)
Expand Down
2 changes: 1 addition & 1 deletion man/TsoCopyNumberVariantsVcfFile.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/TsoMergedSmallVariantsVcfFile.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/bcftools_parse_vcf_regions.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/dr_output_format_valid.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/multiqc_parse_bargraph_plot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions man/multiqc_parse_plots.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/s3_files_list_filter_relevant.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/testthat/test-roxytest-testexamples-portal_meta.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ test_that("Function meta_star_alignment() @ L498", {

pmeta <- system.file("extdata/portal_meta_top4.csv", package = "dracarys")
(m <- meta_star_alignment(pmeta))
expect_equal(all(c("s3_outdir_star", "LibraryID_tumor") %in% colnames(m)), TRUE)
expect_equal(all(c("s3_outdir_star", "LibraryID") %in% colnames(m)), TRUE)
})


Expand Down Expand Up @@ -105,6 +105,6 @@ test_that("Function meta_oncoanalyser_wts() @ L715", {

pmeta <- system.file("extdata/portal_meta_top4.csv", package = "dracarys")
(m <- meta_oncoanalyser_wts(pmeta))
expect_equal(all(c("s3_outdir_oncoanalyser", "LibraryID_tumor", "s3_bam_tumor") %in% colnames(m)), TRUE)
expect_equal(all(c("s3_outdir_oncoanalyser", "LibraryID", "s3_bam") %in% colnames(m)), TRUE)
})

2 changes: 1 addition & 1 deletion tests/testthat/test-roxytest-testexamples-regex.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# File R/regex.R: @testexamples

test_that("Function dr_func_eval() @ L89", {
test_that("Function dr_func_eval() @ L91", {

mean_1_to_10 <- dr_func_eval("mean", v = c("mean", "sd"))(1:10)
x <- system.file("extdata/tso/sample705.fragment_length_hist.json.gz", package = "dracarys")
Expand Down

0 comments on commit a4b73f7

Please sign in to comment.