From 91728870c3b98892b17cb840510c78200b9f768f Mon Sep 17 00:00:00 2001 From: pdiakumis Date: Tue, 31 Oct 2023 23:54:24 +1100 Subject: [PATCH 1/8] wip --- inst/rmd/umccr_portal/portal_summary.Rmd | 7 ++++--- inst/rmd/umccr_workflows/umccrise/multi.Rmd | 4 ++-- man/portal_meta_read_athena.Rd | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/inst/rmd/umccr_portal/portal_summary.Rmd b/inst/rmd/umccr_portal/portal_summary.Rmd index 750ff44..9037bcd 100644 --- a/inst/rmd/umccr_portal/portal_summary.Rmd +++ b/inst/rmd/umccr_portal/portal_summary.Rmd @@ -111,10 +111,11 @@ get_sbj_url <- function(x, colour = NULL, account = "") { ``` ```{r vars} +# Get metadata for workflows run within the date range # options(width = 150) fmt1 <- "%Y-%m-%dT%H:%M:%S" -date_start <- as.POSIXct("2023-09-15T00:00:01", format = fmt1) -date_end <- as.POSIXct("2023-09-18T23:59:59", format = fmt1) +date_start <- as.POSIXct("2023-10-28T00:00:01", format = fmt1) +date_end <- as.POSIXct("2023-10-29T23:59:59", format = fmt1) wf_order <- c( "bcl_convert", "tso_ctdna_tumor_only", @@ -130,7 +131,7 @@ lims_rds <- here(glue("nogit/data_portal/lims/{as.Date(date_end)}.rds")) # saveRDS(lims_raw, file = lims_rds) lims_raw <- readr::read_rds(lims_rds) pmeta_rds <- here(glue("nogit/data_portal/workflows/{as.Date(date_end)}.rds")) -# pmeta_raw <- dracarys::portal_meta_read(rows = 80, account = "stg") +# pmeta_raw <- dracarys::portal_meta_read(rows = 50, account = "prod") # saveRDS(pmeta_raw, file = pmeta_rds) pmeta_raw <- readr::read_rds(pmeta_rds) pmeta <- pmeta_raw |> diff --git a/inst/rmd/umccr_workflows/umccrise/multi.Rmd b/inst/rmd/umccr_workflows/umccrise/multi.Rmd index 21b7bb2..9547b21 100644 --- a/inst/rmd/umccr_workflows/umccrise/multi.Rmd +++ b/inst/rmd/umccr_workflows/umccrise/multi.Rmd @@ -183,7 +183,7 @@ dat_s3 <- dat_s3_raw |> hash256 = substr(hash256, 1, 8), portal_run_id = glue("fake.{date_dir}{hash256}") ) |> - select(-c(um_dir, date_dir, hash256, SampleID_tumor)) + select(-c(date_dir, hash256, SampleID_tumor)) dat_gds <- fs::dir_ls(here("nogit/umccrise/rds/results"), regexp = "x[1-5]{1}.rds") |> purrr::map(readr::read_rds) |> bind_rows() @@ -302,7 +302,7 @@ cols_select1 <- c( "qc_status_hmf", "sex_hmf", "purity_hmf", "ploidy_hmf", "msi_hmf", "msi_mb_hmf", "contamination_hmf", "deleted_genes_hmf", "tmb_hmf", "tml_hmf", "wgd_hmf", "hypermutated", - "bpi_enabled", "portal_run_id", "portal_url" + "bpi_enabled", "portal_run_id", "portal_url", "um_dir" ) # signatures dsig <- bind_rows(list(s2015 = sigs_2015, s2020 = sigs_2020), .id = "Sig_group") |> diff --git a/man/portal_meta_read_athena.Rd b/man/portal_meta_read_athena.Rd index 5650f99..c62efc9 100644 --- a/man/portal_meta_read_athena.Rd +++ b/man/portal_meta_read_athena.Rd @@ -17,7 +17,7 @@ Reads the ICA Workflows Metadata for the given workflow run IDs. } \examples{ \dontrun{ -wfrids <- c('wfr.1e764ca00e7a43a69e2424f250a34868') +wfrids <- c("wfr.1e764ca00e7a43a69e2424f250a34868") portal_meta_read_athena(wfrids) } } From 615471d8f14f63caafd812aa647178f422e9bae5 Mon Sep 17 00:00:00 2001 From: pdiakumis Date: Wed, 1 Nov 2023 00:39:26 +1100 Subject: [PATCH 2/8] meta for sash + oncoa-wgs --- R/portal_meta.R | 102 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) diff --git a/R/portal_meta.R b/R/portal_meta.R index a0aee4c..a311c3a 100644 --- a/R/portal_meta.R +++ b/R/portal_meta.R @@ -435,6 +435,92 @@ meta_tso_ctdna_tumor_only <- function(pmeta, status = c("Succeeded")) { ) } +meta_sash <- function(pmeta, status = "Succeeded") { + # retrieve workflow runs with the given type and status + type <- "sash" + wf <- portal_meta_read(pmeta) |> + dplyr::filter( + .data$type_name == type, + .data$end_status %in% status + ) + if (nrow(wf) == 0) { + return(wf) + } + # grab libid/sampleid from the input meta, and outdir from the output meta + d <- wf |> + meta_io_fromjson() |> + dplyr::mutate( + # input + SubjectID = purrr::map_chr(.data$input, "subject_id", .default = NA), + SampleID_tumor = purrr::map_chr(.data$input, "tumor_sample_id", .default = NA), + SampleID_normal = purrr::map_chr(.data$input, "normal_sample_id", .default = NA), + LibraryID_tumor = purrr::map_chr(.data$input, "tumor_library_id", .default = NA), + LibraryID_normal = purrr::map_chr(.data$input, "normal_library_id", .default = NA), + gds_indir_dragen_somatic = purrr::map_chr(.data$input, "dragen_somatic_dir", .default = NA), + gds_indir_dragen_germline = purrr::map_chr(.data$input, "dragen_germline_dir", .default = NA), + s3_indir_oncoanalyser = purrr::map_chr(.data$input, "oncoanalyser_dir", .default = NA), + # output + s3_outdir_sash = purrr::map_chr(.data$output, "output_directory", .default = NA) + ) + d |> + dplyr::select( + meta_main_cols(), + -dplyr::any_of(c("sequence_run_id", "batch_run_id")), # NA for sash + "SubjectID", + "LibraryID_tumor", + "LibraryID_normal", + "SampleID_tumor", + "SampleID_normal", + "s3_outdir_sash", + "s3_indir_oncoanalyser", + "gds_indir_dragen_somatic", + "gds_indir_dragen_germline" + ) +} + +meta_oncoanalyser_wgs <- function(pmeta, status = "Succeeded") { + # retrieve workflow runs with the given type and status + type <- "oncoanalyser_wgs" + wf <- portal_meta_read(pmeta) |> + dplyr::filter( + .data$type_name == type, + .data$end_status %in% status + ) + if (nrow(wf) == 0) { + return(wf) + } + # grab libid/sampleid from the input meta, and outdir from the output meta + d <- wf |> + meta_io_fromjson() |> + dplyr::mutate( + # input + SubjectID = purrr::map_chr(.data$input, "subject_id", .default = NA), + SampleID_tumor = purrr::map_chr(.data$input, "tumor_wgs_sample_id", .default = NA), + SampleID_normal = purrr::map_chr(.data$input, "normal_wgs_sample_id", .default = NA), + LibraryID_tumor = purrr::map_chr(.data$input, "tumor_wgs_library_id", .default = NA), + LibraryID_normal = purrr::map_chr(.data$input, "normal_wgs_library_id", .default = NA), + gds_bam_tumor = purrr::map_chr(.data$input, "tumor_wgs_bam", .default = NA), + gds_bam_normal = purrr::map_chr(.data$input, "normal_wgs_bam", .default = NA), + mode = purrr::map_chr(.data$input, "mode", .default = NA), + # output + s3_outdir_oncoanalyser = purrr::map_chr(.data$output, "output_directory", .default = NA) + ) + d |> + dplyr::select( + meta_main_cols(), + -dplyr::any_of(c("sequence_run_id", "batch_run_id")), # NA for sash + "SubjectID", + "LibraryID_tumor", + "LibraryID_normal", + "SampleID_tumor", + "SampleID_normal", + "s3_outdir_oncoanalyser", + "gds_bam_tumor", + "gds_bam_normal" + ) +} + + meta_io_fromjson <- function(pmeta) { pmeta <- portal_meta_read(pmeta) pmeta |> @@ -558,3 +644,19 @@ portal_meta_read_athena <- function(wfrids = NULL) { RAthena::dbGetQuery(con, q1) |> tibble::as_tibble() } + + +portal_meta_read_athena_tmp <- function(x = NULL) { + assertthat::assert_that(!is.null(x)) + RAthena::RAthena_options(clear_s3_resource = FALSE) + con <- DBI::dbConnect( + RAthena::athena(), + work_group = "data_portal", + rstudio_conn_tab = FALSE + ) + q1 <- glue( + 'SELECT * FROM "data_portal"."data_portal"."data_portal_workflow" {x}' + ) + RAthena::dbGetQuery(con, q1) |> + tibble::as_tibble() +} From 7dda48032554d8e520e0fb3c952b4cfc29687f0e Mon Sep 17 00:00:00 2001 From: pdiakumis Date: Wed, 1 Nov 2023 08:47:23 +1100 Subject: [PATCH 3/8] meta for oncoa-wts + oncoa-wgts --- R/portal_meta.R | 82 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 79 insertions(+), 3 deletions(-) diff --git a/R/portal_meta.R b/R/portal_meta.R index a311c3a..d9f29b6 100644 --- a/R/portal_meta.R +++ b/R/portal_meta.R @@ -465,7 +465,6 @@ meta_sash <- function(pmeta, status = "Succeeded") { d |> dplyr::select( meta_main_cols(), - -dplyr::any_of(c("sequence_run_id", "batch_run_id")), # NA for sash "SubjectID", "LibraryID_tumor", "LibraryID_normal", @@ -501,14 +500,12 @@ meta_oncoanalyser_wgs <- function(pmeta, status = "Succeeded") { LibraryID_normal = purrr::map_chr(.data$input, "normal_wgs_library_id", .default = NA), gds_bam_tumor = purrr::map_chr(.data$input, "tumor_wgs_bam", .default = NA), gds_bam_normal = purrr::map_chr(.data$input, "normal_wgs_bam", .default = NA), - mode = purrr::map_chr(.data$input, "mode", .default = NA), # output s3_outdir_oncoanalyser = purrr::map_chr(.data$output, "output_directory", .default = NA) ) d |> dplyr::select( meta_main_cols(), - -dplyr::any_of(c("sequence_run_id", "batch_run_id")), # NA for sash "SubjectID", "LibraryID_tumor", "LibraryID_normal", @@ -520,6 +517,85 @@ meta_oncoanalyser_wgs <- function(pmeta, status = "Succeeded") { ) } +meta_oncoanalyser_wgts_existing_both <- function(pmeta, status = "Succeeded") { + # retrieve workflow runs with the given type and status + type <- "oncoanalyser_wgts_existing_both" + wf <- portal_meta_read(pmeta) |> + dplyr::filter( + .data$type_name == type, + .data$end_status %in% status + ) + if (nrow(wf) == 0) { + return(wf) + } + # grab libid/sampleid from the input meta, and outdir from the output meta + d <- wf |> + meta_io_fromjson() |> + dplyr::mutate( + # input + SubjectID = purrr::map_chr(.data$input, "subject_id", .default = NA), + SampleID_tumor_wgs = purrr::map_chr(.data$input, "tumor_wgs_sample_id", .default = NA), + SampleID_normal_wgs = purrr::map_chr(.data$input, "normal_wgs_sample_id", .default = NA), + SampleID_tumor_wts = purrr::map_chr(.data$input, "tumor_wts_sample_id", .default = NA), + LibraryID_tumor_wgs = purrr::map_chr(.data$input, "tumor_wgs_library_id", .default = NA), + LibraryID_normal_wgs = purrr::map_chr(.data$input, "normal_wgs_library_id", .default = NA), + LibraryID_tumor_wts = purrr::map_chr(.data$input, "tumor_wts_library_id", .default = NA), + gds_bam_tumor_wgs = purrr::map_chr(.data$input, "tumor_wgs_bam", .default = NA), + gds_bam_normal_wgs = purrr::map_chr(.data$input, "normal_wgs_bam", .default = NA), + s3_bam_tumor_wts = purrr::map_chr(.data$input, "tumor_wts_bam", .default = NA), + s3_indir_oncoanalyser_wgs = purrr::map_chr(.data$input, "existing_wgs_dir", .default = NA), + s3_indir_oncoanalyser_wts = purrr::map_chr(.data$input, "existing_wts_dir", .default = NA), + # output + s3_outdir_oncoanalyser = purrr::map_chr(.data$output, "output_directory", .default = NA) + ) + d |> + dplyr::select( + meta_main_cols(), + "SubjectID", + "LibraryID_tumor", + "LibraryID_normal", + "SampleID_tumor", + "SampleID_normal", + "s3_outdir_oncoanalyser", + "gds_bam_tumor", + "gds_bam_normal" + ) +} + +meta_oncoanalyser_wts <- function(pmeta, status = "Succeeded") { + # retrieve workflow runs with the given type and status + type <- "oncoanalyser_wts" + wf <- portal_meta_read(pmeta) |> + dplyr::filter( + .data$type_name == type, + .data$end_status %in% status + ) + if (nrow(wf) == 0) { + return(wf) + } + # grab libid/sampleid from the input meta, and outdir from the output meta + d <- wf |> + meta_io_fromjson() |> + dplyr::mutate( + # input + mode = purrr::map_chr(.data$input, "mode", .default = NA), + SubjectID = purrr::map_chr(.data$input, "subject_id", .default = NA), + SampleID_tumor = purrr::map_chr(.data$input, "tumor_wts_sample_id", .default = NA), + LibraryID_tumor = purrr::map_chr(.data$input, "tumor_wts_library_id", .default = NA), + s3_bam_tumor = purrr::map_chr(.data$input, "tumor_wts_bam", .default = NA), + # output + s3_outdir_oncoanalyser = purrr::map_chr(.data$output, "output_directory", .default = NA) + ) + d |> + dplyr::select( + meta_main_cols(), + "SubjectID", + "LibraryID_tumor", + "SampleID_tumor", + "s3_bam_tumor", + "s3_outdir_oncoanalyser", + ) +} meta_io_fromjson <- function(pmeta) { pmeta <- portal_meta_read(pmeta) From 9f7eea72b533105e0321afe9a4025162d6414495 Mon Sep 17 00:00:00 2001 From: pdiakumis Date: Wed, 1 Nov 2023 10:26:03 +1100 Subject: [PATCH 4/8] add docs + tests --- NAMESPACE | 4 + R/portal_meta.R | 73 ++++++++++++++++--- data-raw/portal_meta.R | 8 +- man/meta_oncoanalyser_wgs.Rd | 23 ++++++ man/meta_oncoanalyser_wgts_existing_both.Rd | 23 ++++++ man/meta_oncoanalyser_wts.Rd | 23 ++++++ man/meta_sash.Rd | 23 ++++++ .../test-roxytest-testexamples-portal_meta.R | 40 +++++++++- 8 files changed, 201 insertions(+), 16 deletions(-) create mode 100644 man/meta_oncoanalyser_wgs.Rd create mode 100644 man/meta_oncoanalyser_wgts_existing_both.Rd create mode 100644 man/meta_oncoanalyser_wts.Rd create mode 100644 man/meta_sash.Rd diff --git a/NAMESPACE b/NAMESPACE index 95c343f..71d5c73 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -44,7 +44,11 @@ export(glims_read) export(ica_token_validate) export(match_regex) export(meta_bcl_convert) +export(meta_oncoanalyser_wgs) +export(meta_oncoanalyser_wgts_existing_both) +export(meta_oncoanalyser_wts) export(meta_rnasum) +export(meta_sash) export(meta_tso_ctdna_tumor_only) export(meta_umccrise) export(meta_wgs_alignment_qc) diff --git a/R/portal_meta.R b/R/portal_meta.R index d9f29b6..5983b27 100644 --- a/R/portal_meta.R +++ b/R/portal_meta.R @@ -8,7 +8,7 @@ #' pmeta <- system.file("extdata/portal_meta_top4.csv", package = "dracarys") #' (m <- meta_bcl_convert(pmeta)) #' @testexamples -#' expect_equal(sum(!is.na(m$topup_or_rerun)), 22) +#' expect_equal(sum(!is.na(m$topup_or_rerun)), 1) #' expect_equal(length(unique(m$portal_run_id)), 4) #' @export meta_bcl_convert <- function(pmeta, status = "Succeeded") { @@ -128,8 +128,8 @@ meta_wts_tumor_only <- function(pmeta, status = "Succeeded") { #' pmeta <- system.file("extdata/portal_meta_top4.csv", package = "dracarys") #' (m <- meta_rnasum(pmeta)) #' @testexamples -#' expect_equal(m$rnasum_dataset[1], "LAML") -#' expect_equal(basename(m$gds_outfile_rnasum_html[4]), "MDX230277.RNAseq_report.html") +#' expect_equal(m$rnasum_dataset[1], "PANCAN") +#' expect_equal(basename(m$gds_outfile_rnasum_html[4]), "MDX230467.RNAseq_report.html") #' @export meta_rnasum <- function(pmeta, status = "Succeeded") { # retrieve workflow runs with the given type and status @@ -397,7 +397,7 @@ meta_umccrise <- function(pmeta, status = "Succeeded") { #' pmeta <- system.file("extdata/portal_meta_top4.csv", package = "dracarys") #' (m <- meta_tso_ctdna_tumor_only(pmeta)) #' @testexamples -#' expect_equal(length(unique(m$portal_run_id)), 4) +#' expect_equal(length(unique(m$portal_run_id)), 2) #' @export meta_tso_ctdna_tumor_only <- function(pmeta, status = c("Succeeded")) { # retrieve workflow runs with the given type and status @@ -435,6 +435,18 @@ meta_tso_ctdna_tumor_only <- function(pmeta, status = c("Succeeded")) { ) } +#' Metadata for sash workflow +#' +#' @param pmeta Path to portal workflows metadata table, or tibble with already parsed data. +#' @param status Workflow status to keep (default: Succeeded). +#' +#' @return A tibble with metadata per workflow run. +#' @examples +#' pmeta <- system.file("extdata/portal_meta_top4.csv", package = "dracarys") +#' (m <- meta_sash(pmeta)) +#' @testexamples +#' expect_equal(all(c("s3_indir_oncoanalyser", "LibraryID_tumor", "s3_outdir_sash") %in% colnames(m)), TRUE) +#' @export meta_sash <- function(pmeta, status = "Succeeded") { # retrieve workflow runs with the given type and status type <- "sash" @@ -477,6 +489,18 @@ meta_sash <- function(pmeta, status = "Succeeded") { ) } +#' Metadata for oncoanalyser_wgs workflow +#' +#' @param pmeta Path to portal workflows metadata table, or tibble with already parsed data. +#' @param status Workflow status to keep (default: Succeeded). +#' +#' @return A tibble with metadata per workflow run. +#' @examples +#' pmeta <- system.file("extdata/portal_meta_top4.csv", package = "dracarys") +#' (m <- meta_oncoanalyser_wgs(pmeta)) +#' @testexamples +#' expect_equal(all(c("s3_outdir_oncoanalyser", "LibraryID_tumor", "gds_bam_tumor") %in% colnames(m)), TRUE) +#' @export meta_oncoanalyser_wgs <- function(pmeta, status = "Succeeded") { # retrieve workflow runs with the given type and status type <- "oncoanalyser_wgs" @@ -517,6 +541,18 @@ meta_oncoanalyser_wgs <- function(pmeta, status = "Succeeded") { ) } +#' Metadata for oncoanalyser_wgts_existing_both workflow +#' +#' @param pmeta Path to portal workflows metadata table, or tibble with already parsed data. +#' @param status Workflow status to keep (default: Succeeded). +#' +#' @return A tibble with metadata per workflow run. +#' @examples +#' pmeta <- system.file("extdata/portal_meta_top4.csv", package = "dracarys") +#' (m <- meta_oncoanalyser_wgts_existing_both(pmeta)) +#' @testexamples +#' expect_equal(all(c("s3_outdir_oncoanalyser", "LibraryID_tumor_wts", "gds_bam_tumor_wgs") %in% colnames(m)), TRUE) +#' @export meta_oncoanalyser_wgts_existing_both <- function(pmeta, status = "Succeeded") { # retrieve workflow runs with the given type and status type <- "oncoanalyser_wgts_existing_both" @@ -552,16 +588,33 @@ meta_oncoanalyser_wgts_existing_both <- function(pmeta, status = "Succeeded") { dplyr::select( meta_main_cols(), "SubjectID", - "LibraryID_tumor", - "LibraryID_normal", - "SampleID_tumor", - "SampleID_normal", + "LibraryID_tumor_wgs", + "LibraryID_normal_wgs", + "LibraryID_tumor_wts", + "SampleID_tumor_wgs", + "SampleID_normal_wgs", + "SampleID_tumor_wts", "s3_outdir_oncoanalyser", - "gds_bam_tumor", - "gds_bam_normal" + "s3_indir_oncoanalyser_wgs", + "s3_indir_oncoanalyser_wts", + "gds_bam_tumor_wgs", + "gds_bam_normal_wgs", + "s3_bam_tumor_wts" ) } +#' Metadata for oncoanalyser_wts workflow +#' +#' @param pmeta Path to portal workflows metadata table, or tibble with already parsed data. +#' @param status Workflow status to keep (default: Succeeded). +#' +#' @return A tibble with metadata per workflow run. +#' @examples +#' 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) +#' @export meta_oncoanalyser_wts <- function(pmeta, status = "Succeeded") { # retrieve workflow runs with the given type and status type <- "oncoanalyser_wts" diff --git a/data-raw/portal_meta.R b/data-raw/portal_meta.R index 08189bd..56982f6 100644 --- a/data-raw/portal_meta.R +++ b/data-raw/portal_meta.R @@ -8,11 +8,15 @@ require(readr) wfs <- c( "bcl_convert", "rnasum", "tso_ctdna_tumor_only", - "umccrise", "wgs_alignment_qc", "wgs_tumor_normal", "wts_tumor_only" + "umccrise", "wgs_alignment_qc", "wgs_tumor_normal", "wts_tumor_only", + "wts_alignment_qc", + "oncoanalyser_wgs", "oncoanalyser_wgts_existing_both", + "oncoanalyser_wts", "sash", "star_alignment" ) +account <- "stg" get_top_succeeded <- function(wf, num_row = 10, num_top = 4) { - dracarys::portal_meta_read(params = glue::glue("&type_name={wf}"), rows = num_row) |> + dracarys::portal_meta_read(params = glue::glue("&type_name={wf}"), account = account, rows = num_row) |> dplyr::filter(.data$end_status == "Succeeded") |> dplyr::slice_head(n = num_top) } diff --git a/man/meta_oncoanalyser_wgs.Rd b/man/meta_oncoanalyser_wgs.Rd new file mode 100644 index 0000000..0f9d3b9 --- /dev/null +++ b/man/meta_oncoanalyser_wgs.Rd @@ -0,0 +1,23 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/portal_meta.R +\name{meta_oncoanalyser_wgs} +\alias{meta_oncoanalyser_wgs} +\title{Metadata for oncoanalyser_wgs workflow} +\usage{ +meta_oncoanalyser_wgs(pmeta, status = "Succeeded") +} +\arguments{ +\item{pmeta}{Path to portal workflows metadata table, or tibble with already parsed data.} + +\item{status}{Workflow status to keep (default: Succeeded).} +} +\value{ +A tibble with metadata per workflow run. +} +\description{ +Metadata for oncoanalyser_wgs workflow +} +\examples{ +pmeta <- system.file("extdata/portal_meta_top4.csv", package = "dracarys") +(m <- meta_oncoanalyser_wgs(pmeta)) +} diff --git a/man/meta_oncoanalyser_wgts_existing_both.Rd b/man/meta_oncoanalyser_wgts_existing_both.Rd new file mode 100644 index 0000000..12c223e --- /dev/null +++ b/man/meta_oncoanalyser_wgts_existing_both.Rd @@ -0,0 +1,23 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/portal_meta.R +\name{meta_oncoanalyser_wgts_existing_both} +\alias{meta_oncoanalyser_wgts_existing_both} +\title{Metadata for oncoanalyser_wgts_existing_both workflow} +\usage{ +meta_oncoanalyser_wgts_existing_both(pmeta, status = "Succeeded") +} +\arguments{ +\item{pmeta}{Path to portal workflows metadata table, or tibble with already parsed data.} + +\item{status}{Workflow status to keep (default: Succeeded).} +} +\value{ +A tibble with metadata per workflow run. +} +\description{ +Metadata for oncoanalyser_wgts_existing_both workflow +} +\examples{ +pmeta <- system.file("extdata/portal_meta_top4.csv", package = "dracarys") +(m <- meta_oncoanalyser_wgts_existing_both(pmeta)) +} diff --git a/man/meta_oncoanalyser_wts.Rd b/man/meta_oncoanalyser_wts.Rd new file mode 100644 index 0000000..bf24a8c --- /dev/null +++ b/man/meta_oncoanalyser_wts.Rd @@ -0,0 +1,23 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/portal_meta.R +\name{meta_oncoanalyser_wts} +\alias{meta_oncoanalyser_wts} +\title{Metadata for oncoanalyser_wts workflow} +\usage{ +meta_oncoanalyser_wts(pmeta, status = "Succeeded") +} +\arguments{ +\item{pmeta}{Path to portal workflows metadata table, or tibble with already parsed data.} + +\item{status}{Workflow status to keep (default: Succeeded).} +} +\value{ +A tibble with metadata per workflow run. +} +\description{ +Metadata for oncoanalyser_wts workflow +} +\examples{ +pmeta <- system.file("extdata/portal_meta_top4.csv", package = "dracarys") +(m <- meta_oncoanalyser_wts(pmeta)) +} diff --git a/man/meta_sash.Rd b/man/meta_sash.Rd new file mode 100644 index 0000000..6577c1f --- /dev/null +++ b/man/meta_sash.Rd @@ -0,0 +1,23 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/portal_meta.R +\name{meta_sash} +\alias{meta_sash} +\title{Metadata for sash workflow} +\usage{ +meta_sash(pmeta, status = "Succeeded") +} +\arguments{ +\item{pmeta}{Path to portal workflows metadata table, or tibble with already parsed data.} + +\item{status}{Workflow status to keep (default: Succeeded).} +} +\value{ +A tibble with metadata per workflow run. +} +\description{ +Metadata for sash workflow +} +\examples{ +pmeta <- system.file("extdata/portal_meta_top4.csv", package = "dracarys") +(m <- meta_sash(pmeta)) +} diff --git a/tests/testthat/test-roxytest-testexamples-portal_meta.R b/tests/testthat/test-roxytest-testexamples-portal_meta.R index 0ad045a..873816e 100644 --- a/tests/testthat/test-roxytest-testexamples-portal_meta.R +++ b/tests/testthat/test-roxytest-testexamples-portal_meta.R @@ -6,7 +6,7 @@ test_that("Function meta_bcl_convert() @ L14", { pmeta <- system.file("extdata/portal_meta_top4.csv", package = "dracarys") (m <- meta_bcl_convert(pmeta)) - expect_equal(sum(!is.na(m$topup_or_rerun)), 22) + expect_equal(sum(!is.na(m$topup_or_rerun)), 1) expect_equal(length(unique(m$portal_run_id)), 4) }) @@ -24,8 +24,8 @@ test_that("Function meta_rnasum() @ L134", { pmeta <- system.file("extdata/portal_meta_top4.csv", package = "dracarys") (m <- meta_rnasum(pmeta)) - expect_equal(m$rnasum_dataset[1], "LAML") - expect_equal(basename(m$gds_outfile_rnasum_html[4]), "MDX230277.RNAseq_report.html") + expect_equal(m$rnasum_dataset[1], "PANCAN") + expect_equal(basename(m$gds_outfile_rnasum_html[4]), "MDX230467.RNAseq_report.html") }) @@ -57,6 +57,38 @@ test_that("Function meta_tso_ctdna_tumor_only() @ L402", { pmeta <- system.file("extdata/portal_meta_top4.csv", package = "dracarys") (m <- meta_tso_ctdna_tumor_only(pmeta)) - expect_equal(length(unique(m$portal_run_id)), 4) + expect_equal(length(unique(m$portal_run_id)), 2) +}) + + +test_that("Function meta_sash() @ L450", { + + pmeta <- system.file("extdata/portal_meta_top4.csv", package = "dracarys") + (m <- meta_sash(pmeta)) + expect_equal(all(c("s3_indir_oncoanalyser", "LibraryID_tumor", "s3_outdir_sash") %in% colnames(m)), TRUE) +}) + + +test_that("Function meta_oncoanalyser_wgs() @ L504", { + + pmeta <- system.file("extdata/portal_meta_top4.csv", package = "dracarys") + (m <- meta_oncoanalyser_wgs(pmeta)) + expect_equal(all(c("s3_outdir_oncoanalyser", "LibraryID_tumor", "gds_bam_tumor") %in% colnames(m)), TRUE) +}) + + +test_that("Function meta_oncoanalyser_wgts_existing_both() @ L556", { + + pmeta <- system.file("extdata/portal_meta_top4.csv", package = "dracarys") + (m <- meta_oncoanalyser_wgts_existing_both(pmeta)) + expect_equal(all(c("s3_outdir_oncoanalyser", "LibraryID_tumor_wts", "gds_bam_tumor_wgs") %in% colnames(m)), TRUE) +}) + + +test_that("Function meta_oncoanalyser_wts() @ L618", { + + 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) }) From c4f75e3f90e1e8770ea7bb4af459775ab150cf36 Mon Sep 17 00:00:00 2001 From: pdiakumis Date: Wed, 1 Nov 2023 10:53:31 +1100 Subject: [PATCH 5/8] meta for wts_alignment_qc --- R/portal_meta.R | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/R/portal_meta.R b/R/portal_meta.R index 5983b27..1567dc8 100644 --- a/R/portal_meta.R +++ b/R/portal_meta.R @@ -222,6 +222,54 @@ meta_wgs_alignment_qc <- function(pmeta, status = "Succeeded") { ) } +#' Metadata for wts_alignment_qc workflow +#' +#' @param pmeta Path to portal workflows metadata table, or tibble with already parsed data. +#' @param status Workflow status to keep (default: Succeeded). +#' +#' @return A tibble with metadata per workflow run. +#' @examples +#' pmeta <- system.file("extdata/portal_meta_top4.csv", package = "dracarys") +#' (m <- meta_wts_alignment_qc(pmeta)) +#' @testexamples +#' expect_equal("Lane" %in% colnames(m), TRUE) +#' @export +meta_wts_alignment_qc <- function(pmeta, status = "Succeeded") { + # retrieve workflow runs with the given type and status + type <- "wts_alignment_qc" + wf <- portal_meta_read(pmeta) |> + dplyr::filter( + .data$type_name == type, + .data$end_status %in% status + ) + if (nrow(wf) == 0) { + return(wf) + } + d <- wf |> + meta_io_fromjson() |> + dplyr::mutate( + # input + rglb = purrr::map_chr(.data$input, list("fastq_list_rows", "rglb")), + rgsm = purrr::map_chr(.data$input, list("fastq_list_rows", "rgsm")), + lane = purrr::map_int(.data$input, list("fastq_list_rows", "lane")), + lane = as.character(.data$lane), + # output + gds_outdir_dragen = purrr::map_chr(.data$output, list("dragen_alignment_output_directory", "location"), .default = NA), + gds_outdir_multiqc = purrr::map_chr(.data$output, list("multiqc_output_directory", "location"), .default = NA), + SubjectID = sub("umccr__automated__wts_alignment_qc__(SBJ.*)__L.*", "\\1", .data$wfr_name), + ) + d |> + dplyr::select( + dplyr::all_of(meta_main_cols()), + "SubjectID", + LibraryID = "rglb", + SampleID = "rgsm", + Lane = "lane", + "gds_outdir_dragen", + "gds_outdir_multiqc", + ) +} + #' Metadata for wgs_tumor_normal workflow #' #' @param pmeta Path to portal workflows metadata table, or tibble with already parsed data. From 935d494f74853dbccdbe87ec835110ba37540fe0 Mon Sep 17 00:00:00 2001 From: pdiakumis Date: Wed, 1 Nov 2023 11:02:55 +1100 Subject: [PATCH 6/8] meta for star_alignment --- NAMESPACE | 2 + R/portal_meta.R | 49 +++++++++++++++++++ man/meta_star_alignment.Rd | 23 +++++++++ man/meta_wts_alignment_qc.Rd | 23 +++++++++ .../test-roxytest-testexamples-portal_meta.R | 30 +++++++++--- 5 files changed, 120 insertions(+), 7 deletions(-) create mode 100644 man/meta_star_alignment.Rd create mode 100644 man/meta_wts_alignment_qc.Rd diff --git a/NAMESPACE b/NAMESPACE index 71d5c73..d648d79 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -49,10 +49,12 @@ export(meta_oncoanalyser_wgts_existing_both) export(meta_oncoanalyser_wts) export(meta_rnasum) export(meta_sash) +export(meta_star_alignment) export(meta_tso_ctdna_tumor_only) export(meta_umccrise) export(meta_wgs_alignment_qc) export(meta_wgs_tumor_normal) +export(meta_wts_alignment_qc) export(meta_wts_tumor_only) export(multiqc_column_map_append) export(multiqc_date_fmt) diff --git a/R/portal_meta.R b/R/portal_meta.R index 1567dc8..3e124d1 100644 --- a/R/portal_meta.R +++ b/R/portal_meta.R @@ -483,6 +483,55 @@ meta_tso_ctdna_tumor_only <- function(pmeta, status = c("Succeeded")) { ) } +#' Metadata for star_alignment workflow +#' +#' @param pmeta Path to portal workflows metadata table, or tibble with already parsed data. +#' @param status Workflow status to keep (default: Succeeded). +#' +#' @return A tibble with metadata per workflow run. +#' @examples +#' 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) +#' @export +meta_star_alignment <- function(pmeta, status = "Succeeded") { + # retrieve workflow runs with the given type and status + type <- "star_alignment" + wf <- portal_meta_read(pmeta) |> + dplyr::filter( + .data$type_name == type, + .data$end_status %in% status + ) + if (nrow(wf) == 0) { + return(wf) + } + # grab libid/sampleid from the input meta, and outdir from the output meta + d <- wf |> + meta_io_fromjson() |> + dplyr::mutate( + # input + SubjectID = purrr::map_chr(.data$input, "subject_id", .default = NA), + SampleID_tumor = purrr::map_chr(.data$input, "sample_id", .default = NA), + LibraryID_tumor = purrr::map_chr(.data$input, "library_id", .default = NA), + gds_fq_fwd = purrr::map_chr(.data$input, "fastq_fwd", .default = NA), + gds_fq_rev = purrr::map_chr(.data$input, "fastq_rev", .default = NA), + # output + s3_outdir_star = purrr::map_chr(.data$output, "output_directory", .default = NA) + ) + d |> + dplyr::select( + meta_main_cols(), + "SubjectID", + "LibraryID_tumor", + "SampleID_tumor", + "s3_outdir_star", + "gds_fq_fwd", + "gds_fq_rev" + ) +} + + #' Metadata for sash workflow #' #' @param pmeta Path to portal workflows metadata table, or tibble with already parsed data. diff --git a/man/meta_star_alignment.Rd b/man/meta_star_alignment.Rd new file mode 100644 index 0000000..7af9158 --- /dev/null +++ b/man/meta_star_alignment.Rd @@ -0,0 +1,23 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/portal_meta.R +\name{meta_star_alignment} +\alias{meta_star_alignment} +\title{Metadata for star_alignment workflow} +\usage{ +meta_star_alignment(pmeta, status = "Succeeded") +} +\arguments{ +\item{pmeta}{Path to portal workflows metadata table, or tibble with already parsed data.} + +\item{status}{Workflow status to keep (default: Succeeded).} +} +\value{ +A tibble with metadata per workflow run. +} +\description{ +Metadata for star_alignment workflow +} +\examples{ +pmeta <- system.file("extdata/portal_meta_top4.csv", package = "dracarys") +(m <- meta_star_alignment(pmeta)) +} diff --git a/man/meta_wts_alignment_qc.Rd b/man/meta_wts_alignment_qc.Rd new file mode 100644 index 0000000..5b2c5ed --- /dev/null +++ b/man/meta_wts_alignment_qc.Rd @@ -0,0 +1,23 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/portal_meta.R +\name{meta_wts_alignment_qc} +\alias{meta_wts_alignment_qc} +\title{Metadata for wts_alignment_qc workflow} +\usage{ +meta_wts_alignment_qc(pmeta, status = "Succeeded") +} +\arguments{ +\item{pmeta}{Path to portal workflows metadata table, or tibble with already parsed data.} + +\item{status}{Workflow status to keep (default: Succeeded).} +} +\value{ +A tibble with metadata per workflow run. +} +\description{ +Metadata for wts_alignment_qc workflow +} +\examples{ +pmeta <- system.file("extdata/portal_meta_top4.csv", package = "dracarys") +(m <- meta_wts_alignment_qc(pmeta)) +} diff --git a/tests/testthat/test-roxytest-testexamples-portal_meta.R b/tests/testthat/test-roxytest-testexamples-portal_meta.R index 873816e..ba2bda6 100644 --- a/tests/testthat/test-roxytest-testexamples-portal_meta.R +++ b/tests/testthat/test-roxytest-testexamples-portal_meta.R @@ -37,7 +37,15 @@ test_that("Function meta_wgs_alignment_qc() @ L189", { }) -test_that("Function meta_wgs_tumor_normal() @ L237", { +test_that("Function meta_wts_alignment_qc() @ L237", { + + pmeta <- system.file("extdata/portal_meta_top4.csv", package = "dracarys") + (m <- meta_wts_alignment_qc(pmeta)) + expect_equal("Lane" %in% colnames(m), TRUE) +}) + + +test_that("Function meta_wgs_tumor_normal() @ L285", { pmeta <- system.file("extdata/portal_meta_top4.csv", package = "dracarys") (m <- meta_wgs_tumor_normal(pmeta)) @@ -45,7 +53,7 @@ test_that("Function meta_wgs_tumor_normal() @ L237", { }) -test_that("Function meta_umccrise() @ L307", { +test_that("Function meta_umccrise() @ L355", { pmeta <- system.file("extdata/portal_meta_top4.csv", package = "dracarys") (m <- meta_umccrise(pmeta)) @@ -53,7 +61,7 @@ test_that("Function meta_umccrise() @ L307", { }) -test_that("Function meta_tso_ctdna_tumor_only() @ L402", { +test_that("Function meta_tso_ctdna_tumor_only() @ L450", { pmeta <- system.file("extdata/portal_meta_top4.csv", package = "dracarys") (m <- meta_tso_ctdna_tumor_only(pmeta)) @@ -61,7 +69,15 @@ test_that("Function meta_tso_ctdna_tumor_only() @ L402", { }) -test_that("Function meta_sash() @ L450", { +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) +}) + + +test_that("Function meta_sash() @ L547", { pmeta <- system.file("extdata/portal_meta_top4.csv", package = "dracarys") (m <- meta_sash(pmeta)) @@ -69,7 +85,7 @@ test_that("Function meta_sash() @ L450", { }) -test_that("Function meta_oncoanalyser_wgs() @ L504", { +test_that("Function meta_oncoanalyser_wgs() @ L601", { pmeta <- system.file("extdata/portal_meta_top4.csv", package = "dracarys") (m <- meta_oncoanalyser_wgs(pmeta)) @@ -77,7 +93,7 @@ test_that("Function meta_oncoanalyser_wgs() @ L504", { }) -test_that("Function meta_oncoanalyser_wgts_existing_both() @ L556", { +test_that("Function meta_oncoanalyser_wgts_existing_both() @ L653", { pmeta <- system.file("extdata/portal_meta_top4.csv", package = "dracarys") (m <- meta_oncoanalyser_wgts_existing_both(pmeta)) @@ -85,7 +101,7 @@ test_that("Function meta_oncoanalyser_wgts_existing_both() @ L556", { }) -test_that("Function meta_oncoanalyser_wts() @ L618", { +test_that("Function meta_oncoanalyser_wts() @ L715", { pmeta <- system.file("extdata/portal_meta_top4.csv", package = "dracarys") (m <- meta_oncoanalyser_wts(pmeta)) From 1828562771d66ea713b61d66d02b39ad9290438e Mon Sep 17 00:00:00 2001 From: pdiakumis Date: Thu, 2 Nov 2023 01:13:28 +1100 Subject: [PATCH 7/8] portal summary: add wts-alignqc/star/oncoa/sash --- R/portal_meta.R | 20 +- inst/rmd/umccr_portal/portal_summary.Rmd | 287 ++++++++++++++++++++--- 2 files changed, 269 insertions(+), 38 deletions(-) diff --git a/R/portal_meta.R b/R/portal_meta.R index 3e124d1..e74349c 100644 --- a/R/portal_meta.R +++ b/R/portal_meta.R @@ -512,8 +512,8 @@ meta_star_alignment <- function(pmeta, status = "Succeeded") { dplyr::mutate( # input SubjectID = purrr::map_chr(.data$input, "subject_id", .default = NA), - SampleID_tumor = purrr::map_chr(.data$input, "sample_id", .default = NA), - LibraryID_tumor = purrr::map_chr(.data$input, "library_id", .default = NA), + SampleID = purrr::map_chr(.data$input, "sample_id", .default = NA), + LibraryID = purrr::map_chr(.data$input, "library_id", .default = NA), gds_fq_fwd = purrr::map_chr(.data$input, "fastq_fwd", .default = NA), gds_fq_rev = purrr::map_chr(.data$input, "fastq_rev", .default = NA), # output @@ -523,8 +523,8 @@ meta_star_alignment <- function(pmeta, status = "Succeeded") { dplyr::select( meta_main_cols(), "SubjectID", - "LibraryID_tumor", - "SampleID_tumor", + "LibraryID", + "SampleID", "s3_outdir_star", "gds_fq_fwd", "gds_fq_rev" @@ -730,9 +730,9 @@ meta_oncoanalyser_wts <- function(pmeta, status = "Succeeded") { # input mode = purrr::map_chr(.data$input, "mode", .default = NA), SubjectID = purrr::map_chr(.data$input, "subject_id", .default = NA), - SampleID_tumor = purrr::map_chr(.data$input, "tumor_wts_sample_id", .default = NA), - LibraryID_tumor = purrr::map_chr(.data$input, "tumor_wts_library_id", .default = NA), - s3_bam_tumor = purrr::map_chr(.data$input, "tumor_wts_bam", .default = NA), + SampleID = purrr::map_chr(.data$input, "tumor_wts_sample_id", .default = NA), + LibraryID = purrr::map_chr(.data$input, "tumor_wts_library_id", .default = NA), + s3_bam = purrr::map_chr(.data$input, "tumor_wts_bam", .default = NA), # output s3_outdir_oncoanalyser = purrr::map_chr(.data$output, "output_directory", .default = NA) ) @@ -740,9 +740,9 @@ meta_oncoanalyser_wts <- function(pmeta, status = "Succeeded") { dplyr::select( meta_main_cols(), "SubjectID", - "LibraryID_tumor", - "SampleID_tumor", - "s3_bam_tumor", + "LibraryID", + "SampleID", + "s3_bam", "s3_outdir_oncoanalyser", ) } diff --git a/inst/rmd/umccr_portal/portal_summary.Rmd b/inst/rmd/umccr_portal/portal_summary.Rmd index 9037bcd..b1ebb40 100644 --- a/inst/rmd/umccr_portal/portal_summary.Rmd +++ b/inst/rmd/umccr_portal/portal_summary.Rmd @@ -114,16 +114,22 @@ get_sbj_url <- function(x, colour = NULL, account = "") { # Get metadata for workflows run within the date range # options(width = 150) fmt1 <- "%Y-%m-%dT%H:%M:%S" -date_start <- as.POSIXct("2023-10-28T00:00:01", format = fmt1) -date_end <- as.POSIXct("2023-10-29T23:59:59", format = fmt1) +date_start <- as.POSIXct("2023-10-27T00:00:01", format = fmt1) +date_end <- as.POSIXct("2023-10-30T23:59:59", format = fmt1) wf_order <- c( "bcl_convert", "tso_ctdna_tumor_only", "wgs_alignment_qc", + "wts_alignment_qc", "wts_tumor_only", "wgs_tumor_normal", "umccrise", - "rnasum" + "rnasum", + "star_alignment", + "oncoanalyser_wts", + "oncoanalyser_wgs", + "oncoanalyser_wgts_existing_both", + "sash" ) lims_rds <- here(glue("nogit/data_portal/lims/{as.Date(date_end)}.rds")) @@ -131,7 +137,7 @@ lims_rds <- here(glue("nogit/data_portal/lims/{as.Date(date_end)}.rds")) # saveRDS(lims_raw, file = lims_rds) lims_raw <- readr::read_rds(lims_rds) pmeta_rds <- here(glue("nogit/data_portal/workflows/{as.Date(date_end)}.rds")) -# pmeta_raw <- dracarys::portal_meta_read(rows = 50, account = "prod") +# pmeta_raw <- dracarys::portal_meta_read(rows = 300, account = "stg") # saveRDS(pmeta_raw, file = pmeta_rds) pmeta_raw <- readr::read_rds(pmeta_rds) pmeta <- pmeta_raw |> @@ -153,9 +159,12 @@ pmeta_sumy <- pmeta |> ) |> dplyr::rowwise() |> dplyr::mutate( - sbj_lib = as.character(glue("umccr__automated__{.data$type_name}__")), - sbj_lib = sub(paste0(.data$sbj_lib, "(.*)__2023.*"), "\\1", .data$wfr_name), - sbjid = sub("(SBJ.*)__L.*", "\\1", .data$sbj_lib) + wfr_name = dplyr::if_else(grepl("umccr__automated", .data$wfr_name), + glue("{.data$wfr_name}"), + glue("umccr__automated__{.data$wfr_name}") + ), + sbj_lib = sub("umccr__automated__(.*?)__(SBJ.*__L.*)__202.*", "\\2", .data$wfr_name), + sbjid = sub("(SBJ.*?)__L.*", "\\1", .data$sbj_lib) ) |> dplyr::ungroup() unique_sbj <- sort(unique(pmeta_sumy$sbjid)) @@ -199,9 +208,13 @@ split(x, x$column_group) |> kableExtra::kable_classic(full_width = FALSE, position = "left") ``` +```{r, results='asis'} +blank_lines() +``` + ## RuntimeVis -```{r vistime, fig.width=15, fig.height = 10} +```{r vistime, fig.width=15, fig.height = 20} p1 <- pmeta_sumy |> dplyr::arrange(sbj_lib, type_name) |> dplyr::group_by(sbj_lib, type_name) |> @@ -260,11 +273,14 @@ pmeta |> ) |> dplyr::left_join(lims, by = c("LibraryID", "SampleID")) |> dplyr::left_join(clrs1 |> dplyr::select(sbjid, sbj_url), by = c("SubjectID" = "sbjid")) |> - dplyr::mutate(SubjectID = dplyr::if_else(is.na(.data$sbj_url), get_sbj_url(.data$SubjectID), .data$sbj_url)) |> + dplyr::mutate( + SubjectID = dplyr::if_else(is.na(.data$sbj_url), get_sbj_url(.data$SubjectID), .data$sbj_url), + durationMin = round(as.numeric(difftime(end, start, units = "mins"))) + ) |> dplyr::select( end_status, runfolder_name, SubjectID, LibraryID, SampleID, Phenotype, ExternalSubjectID, ProjectOwner, ProjectName, batch_name, Type, Assay, Source, Quality, Workflow, - start, end + durationMin, start, end ) |> dplyr::arrange(desc(SubjectID), start) |> dt_view() @@ -287,11 +303,14 @@ pmeta |> dracarys::meta_tso_ctdna_tumor_only(status = c("Succeeded", "Failed")) |> dplyr::left_join(lims, by = c("LibraryID", "SampleID", "SubjectID")) |> dplyr::left_join(clrs1 |> dplyr::select(sbjid, sbj_url), by = c("SubjectID" = "sbjid")) |> - dplyr::mutate(SubjectID = dplyr::if_else(is.na(.data$sbj_url), get_sbj_url(.data$SubjectID), .data$sbj_url)) |> + dplyr::mutate( + SubjectID = dplyr::if_else(is.na(.data$sbj_url), get_sbj_url(.data$SubjectID), .data$sbj_url), + durationMin = round(as.numeric(difftime(end, start, units = "mins"))) + ) |> dplyr::select( end_status, SubjectID, LibraryID, SampleID, Phenotype, ExternalSubjectID, ProjectOwner, ProjectName, Type, Assay, Source, Quality, Workflow, - wfr_id, start, end, gds_outdir + portal_run_id, wfr_id, durationMin, start, end, gds_outdir ) |> dplyr::arrange(desc(SubjectID), start) |> dt_view() @@ -314,18 +333,21 @@ pmeta |> dracarys::meta_wgs_alignment_qc(status = c("Succeeded", "Failed")) |> dplyr::left_join(lims, by = c("LibraryID", "SampleID", "SubjectID")) |> dplyr::left_join(clrs1 |> dplyr::select(sbjid, sbj_url), by = c("SubjectID" = "sbjid")) |> - dplyr::mutate(SubjectID = dplyr::if_else(is.na(.data$sbj_url), get_sbj_url(.data$SubjectID), .data$sbj_url)) |> + dplyr::mutate( + SubjectID = dplyr::if_else(is.na(.data$sbj_url), get_sbj_url(.data$SubjectID), .data$sbj_url), + durationMin = round(as.numeric(difftime(end, start, units = "mins"))) + ) |> dplyr::select( end_status, SubjectID, LibraryID, SampleID, Phenotype, Lane, ExternalSubjectID, ProjectOwner, ProjectName, Type, Assay, Source, Quality, Workflow, - wfr_id, start, end, gds_outdir_dragen + portal_run_id, wfr_id, durationMin, start, end, gds_outdir_dragen ) |> dplyr::arrange(desc(SubjectID), start) |> dt_view() ``` ```{r echo=FALSE} -wf <- "wts_tumor_only" +wf <- "wts_alignment_qc" ``` ### 4. `r wf` @@ -336,16 +358,49 @@ if (!chunks1[[wf]]) { } ``` +```{r eval=chunks1[[wf]]} +pmeta |> + dracarys::meta_wts_alignment_qc(status = c("Succeeded", "Failed")) |> + dplyr::left_join(lims, by = c("LibraryID", "SampleID", "SubjectID")) |> + dplyr::left_join(clrs1 |> dplyr::select(sbjid, sbj_url), by = c("SubjectID" = "sbjid")) |> + dplyr::mutate( + SubjectID = dplyr::if_else(is.na(.data$sbj_url), get_sbj_url(.data$SubjectID), .data$sbj_url), + durationMin = round(as.numeric(difftime(end, start, units = "mins"))) + ) |> + dplyr::select( + end_status, SubjectID, LibraryID, SampleID, Phenotype, Lane, ExternalSubjectID, + ProjectOwner, ProjectName, Type, Assay, Source, Quality, Workflow, + portal_run_id, wfr_id, durationMin, start, end, gds_outdir_dragen + ) |> + dplyr::arrange(desc(SubjectID), start) |> + dt_view() +``` + +```{r echo=FALSE} +wf <- "wts_tumor_only" +``` + +### 5. `r wf` + +```{r} +if (!chunks1[[wf]]) { + kable_empty_wf(wf) +} +``` + ```{r eval=chunks1[[wf]]} pmeta |> dracarys::meta_wts_tumor_only(status = c("Succeeded", "Failed")) |> dplyr::left_join(lims, by = c("LibraryID", "SampleID", "SubjectID")) |> dplyr::left_join(clrs1 |> dplyr::select(sbjid, sbj_url), by = c("SubjectID" = "sbjid")) |> - dplyr::mutate(SubjectID = dplyr::if_else(is.na(.data$sbj_url), get_sbj_url(.data$SubjectID), .data$sbj_url)) |> + dplyr::mutate( + SubjectID = dplyr::if_else(is.na(.data$sbj_url), get_sbj_url(.data$SubjectID), .data$sbj_url), + durationMin = round(as.numeric(difftime(end, start, units = "mins"))) + ) |> dplyr::select( end_status, SubjectID, LibraryID, SampleID, Phenotype, ExternalSubjectID, ProjectOwner, ProjectName, Type, Assay, Source, Quality, Workflow, - wfr_id, start, end, gds_outdir_dragen + portal_run_id, wfr_id, durationMin, start, end, gds_outdir_dragen ) |> dplyr::arrange(desc(SubjectID), start) |> dt_view() @@ -355,7 +410,7 @@ pmeta |> wf <- "wgs_tumor_normal" ``` -### 5. `r wf` +### 6. `r wf` ```{r} if (!chunks1[[wf]]) { @@ -373,11 +428,14 @@ pmeta |> # include Phenotype to double-check join dplyr::left_join(lims, by = c("LibraryID", "SampleID", "SubjectID", "Phenotype")) |> dplyr::left_join(clrs1 |> dplyr::select(sbjid, sbj_url), by = c("SubjectID" = "sbjid")) |> - dplyr::mutate(SubjectID = dplyr::if_else(is.na(.data$sbj_url), get_sbj_url(.data$SubjectID), .data$sbj_url)) |> + dplyr::mutate( + SubjectID = dplyr::if_else(is.na(.data$sbj_url), get_sbj_url(.data$SubjectID), .data$sbj_url), + durationMin = round(as.numeric(difftime(end, start, units = "mins"))) + ) |> dplyr::select( end_status, SubjectID, LibraryID, SampleID, Phenotype, ExternalSubjectID, ProjectOwner, ProjectName, Type, Assay, Source, Quality, Workflow, - wfr_id, start, end, gds_outdir_dragen_somatic, gds_outdir_dragen_germline + portal_run_id, wfr_id, durationMin, start, end, gds_outdir_dragen_somatic, gds_outdir_dragen_germline ) |> dplyr::arrange(desc(SubjectID), start) |> dt_view() @@ -387,7 +445,7 @@ pmeta |> wf <- "umccrise" ``` -### 6. `r wf` {.active} +### 7. `r wf` ```{r} if (!chunks1[[wf]]) { @@ -395,7 +453,7 @@ if (!chunks1[[wf]]) { } ``` -```{r eval=chunks1[["umccrise"]]} +```{r eval=chunks1[[wf]]} pmeta |> dracarys::meta_umccrise(status = c("Succeeded", "Failed")) |> tidyr::unite("SampleID__LibraryID___normal", SampleID_normal, LibraryID_normal, sep = "__") |> @@ -405,11 +463,14 @@ pmeta |> # include Phenotype to double-check join dplyr::left_join(lims, by = c("LibraryID", "SampleID", "SubjectID", "Phenotype")) |> dplyr::left_join(clrs1 |> dplyr::select(sbjid, sbj_url), by = c("SubjectID" = "sbjid")) |> - dplyr::mutate(SubjectID = dplyr::if_else(is.na(.data$sbj_url), get_sbj_url(.data$SubjectID), .data$sbj_url)) |> + dplyr::mutate( + SubjectID = dplyr::if_else(is.na(.data$sbj_url), get_sbj_url(.data$SubjectID), .data$sbj_url), + durationMin = round(as.numeric(difftime(end, start, units = "mins"))) + ) |> dplyr::select( end_status, SubjectID, LibraryID, SampleID, Phenotype, ExternalSubjectID, ProjectOwner, ProjectName, Type, Assay, Source, Quality, Workflow, - wfr_id, start, end, gds_outdir_umccrise + portal_run_id, wfr_id, durationMin, start, end, gds_outdir_umccrise ) |> dplyr::arrange(desc(SubjectID), start) |> dt_view() @@ -419,7 +480,7 @@ pmeta |> wf <- "rnasum" ``` -### 7. `r wf` +### 8. `r wf` ```{r} if (!chunks1[[wf]]) { @@ -427,16 +488,186 @@ if (!chunks1[[wf]]) { } ``` -```{r eval=chunks1[["rnasum"]]} +```{r eval=chunks1[[wf]]} pmeta |> dracarys::meta_rnasum(status = c("Succeeded", "Failed")) |> dplyr::left_join(lims, by = c("LibraryID", "SampleID", "SubjectID")) |> dplyr::left_join(clrs1 |> dplyr::select(sbjid, sbj_url), by = c("SubjectID" = "sbjid")) |> - dplyr::mutate(SubjectID = dplyr::if_else(is.na(.data$sbj_url), get_sbj_url(.data$SubjectID), .data$sbj_url)) |> + dplyr::mutate( + SubjectID = dplyr::if_else(is.na(.data$sbj_url), get_sbj_url(.data$SubjectID), .data$sbj_url), + durationMin = round(as.numeric(difftime(end, start, units = "mins"))) + ) |> dplyr::select( end_status, SubjectID, LibraryID, SampleID, Phenotype, rnasum_dataset, ExternalSubjectID, ProjectOwner, ProjectName, Type, Assay, Source, Quality, Workflow, - wfr_id, start, end, gds_outdir_rnasum, + portal_run_id, wfr_id, durationMin, start, end, gds_outdir_rnasum, + ) |> + dplyr::arrange(desc(SubjectID), start) |> + dt_view() +``` + +```{r echo=FALSE} +wf <- "star_alignment" +``` + +### 9. `r wf` + +```{r} +if (!chunks1[[wf]]) { + kable_empty_wf(wf) +} +``` + +```{r eval=chunks1[[wf]]} +pmeta |> + dracarys::meta_star_alignment(status = c("Succeeded", "Failed")) |> + dplyr::left_join(lims, by = c("LibraryID", "SampleID", "SubjectID")) |> + dplyr::left_join(clrs1 |> dplyr::select(sbjid, sbj_url), by = c("SubjectID" = "sbjid")) |> + dplyr::mutate( + SubjectID = dplyr::if_else(is.na(.data$sbj_url), get_sbj_url(.data$SubjectID), .data$sbj_url), + durationMin = round(as.numeric(difftime(end, start, units = "mins"))) + ) |> + dplyr::select( + end_status, SubjectID, LibraryID, SampleID, Phenotype, ExternalSubjectID, ProjectOwner, ProjectName, + Type, Assay, Source, Quality, Workflow, + portal_run_id, wfr_id, durationMin, start, end, s3_outdir_star + ) |> + dplyr::arrange(desc(SubjectID), start) |> + dt_view() +``` + +```{r echo=FALSE} +wf <- "oncoanalyser_wts" +``` + +### 10. `r wf` + +```{r} +if (!chunks1[[wf]]) { + kable_empty_wf(wf) +} +``` + +```{r eval=chunks1[[wf]]} +pmeta |> + dracarys::meta_oncoanalyser_wts(status = c("Succeeded", "Failed")) |> + dplyr::left_join(lims, by = c("LibraryID", "SampleID", "SubjectID")) |> + dplyr::left_join(clrs1 |> dplyr::select(sbjid, sbj_url), by = c("SubjectID" = "sbjid")) |> + dplyr::mutate( + SubjectID = dplyr::if_else(is.na(.data$sbj_url), get_sbj_url(.data$SubjectID), .data$sbj_url), + durationMin = round(as.numeric(difftime(end, start, units = "mins"))) + ) |> + dplyr::select( + end_status, SubjectID, LibraryID, SampleID, Phenotype, ExternalSubjectID, ProjectOwner, ProjectName, + Type, Assay, Source, Quality, Workflow, + portal_run_id, wfr_id, durationMin, start, end, s3_outdir_oncoanalyser + ) |> + dplyr::arrange(desc(SubjectID), start) |> + dt_view() +``` + + +```{r echo=FALSE} +wf <- "oncoanalyser_wgs" +``` + +### 11. `r wf` + +```{r} +if (!chunks1[[wf]]) { + kable_empty_wf(wf) +} +``` + +```{r eval=chunks1[[wf]]} +pmeta |> + dracarys::meta_oncoanalyser_wgs(status = c("Succeeded", "Failed")) |> + tidyr::unite("SampleID__LibraryID___normal", SampleID_normal, LibraryID_normal, sep = "__") |> + tidyr::unite("SampleID__LibraryID___tumor", SampleID_tumor, LibraryID_tumor, sep = "__") |> + tidyr::pivot_longer(c("SampleID__LibraryID___normal", "SampleID__LibraryID___tumor"), names_to = c(NA, "Phenotype"), names_sep = "___", values_to = "SampleID__LibraryID") |> + tidyr::separate_wider_delim("SampleID__LibraryID", delim = "__", names = c("SampleID", "LibraryID")) |> + # include Phenotype to double-check join + dplyr::left_join(lims, by = c("LibraryID", "SampleID", "SubjectID", "Phenotype")) |> + dplyr::left_join(clrs1 |> dplyr::select(sbjid, sbj_url), by = c("SubjectID" = "sbjid")) |> + dplyr::mutate( + SubjectID = dplyr::if_else(is.na(.data$sbj_url), get_sbj_url(.data$SubjectID), .data$sbj_url), + durationMin = round(as.numeric(difftime(end, start, units = "mins"))) + ) |> + dplyr::select( + end_status, SubjectID, LibraryID, SampleID, Phenotype, ExternalSubjectID, + ProjectOwner, ProjectName, Type, Assay, Source, Quality, Workflow, + portal_run_id, wfr_id, durationMin, start, end, s3_outdir_oncoanalyser + ) |> + dplyr::arrange(desc(SubjectID), start) |> + dt_view() +``` + +```{r echo=FALSE} +wf <- "oncoanalyser_wgts_existing_both" +``` + +### 12. `r wf` + +```{r} +if (!chunks1[[wf]]) { + kable_empty_wf(wf) +} +``` + +```{r eval=chunks1[[wf]]} +pmeta |> + dracarys::meta_oncoanalyser_wgts_existing_both(status = c("Succeeded", "Failed")) |> + tidyr::unite("SampleID__LibraryID___normal___wgs", SampleID_normal_wgs, LibraryID_normal_wgs, sep = "__") |> + tidyr::unite("SampleID__LibraryID___tumor___wgs", SampleID_tumor_wgs, LibraryID_tumor_wgs, sep = "__") |> + tidyr::unite("SampleID__LibraryID___tumor___wts", SampleID_tumor_wts, LibraryID_tumor_wts, sep = "__") |> + tidyr::pivot_longer(c("SampleID__LibraryID___normal___wgs", "SampleID__LibraryID___tumor___wgs", "SampleID__LibraryID___tumor___wts"), names_to = c(NA, "Phenotype", "WGTS"), names_sep = "___", values_to = "SampleID__LibraryID") |> + tidyr::separate_wider_delim("SampleID__LibraryID", delim = "__", names = c("SampleID", "LibraryID")) |> + # include Phenotype to double-check join + dplyr::left_join(lims, by = c("LibraryID", "SampleID", "SubjectID", "Phenotype")) |> + dplyr::left_join(clrs1 |> dplyr::select(sbjid, sbj_url), by = c("SubjectID" = "sbjid")) |> + dplyr::mutate( + SubjectID = dplyr::if_else(is.na(.data$sbj_url), get_sbj_url(.data$SubjectID), .data$sbj_url), + durationMin = round(as.numeric(difftime(end, start, units = "mins"))) + ) |> + dplyr::select( + end_status, SubjectID, LibraryID, SampleID, Phenotype, WGTS, ExternalSubjectID, + ProjectOwner, ProjectName, Type, Assay, Source, Quality, Workflow, + portal_run_id, wfr_id, durationMin, start, end, s3_outdir_oncoanalyser + ) |> + dplyr::arrange(desc(SubjectID), start) |> + dt_view() +``` + +```{r echo=FALSE} +wf <- "sash" +``` + +### 13. `r wf` {.active} + +```{r} +if (!chunks1[[wf]]) { + kable_empty_wf(wf) +} +``` + +```{r eval=chunks1[[wf]]} +pmeta |> + dracarys::meta_sash(status = c("Succeeded", "Failed")) |> + tidyr::unite("SampleID__LibraryID___normal", SampleID_normal, LibraryID_normal, sep = "__") |> + tidyr::unite("SampleID__LibraryID___tumor", SampleID_tumor, LibraryID_tumor, sep = "__") |> + tidyr::pivot_longer(c("SampleID__LibraryID___normal", "SampleID__LibraryID___tumor"), names_to = c(NA, "Phenotype"), names_sep = "___", values_to = "SampleID__LibraryID") |> + tidyr::separate_wider_delim("SampleID__LibraryID", delim = "__", names = c("SampleID", "LibraryID")) |> + # include Phenotype to double-check join + dplyr::left_join(lims, by = c("LibraryID", "SampleID", "SubjectID", "Phenotype")) |> + dplyr::left_join(clrs1 |> dplyr::select(sbjid, sbj_url), by = c("SubjectID" = "sbjid")) |> + dplyr::mutate( + SubjectID = dplyr::if_else(is.na(.data$sbj_url), get_sbj_url(.data$SubjectID), .data$sbj_url), + durationMin = round(as.numeric(difftime(end, start, units = "mins"))) + ) |> + dplyr::select( + end_status, SubjectID, LibraryID, SampleID, Phenotype, ExternalSubjectID, + ProjectOwner, ProjectName, Type, Assay, Source, Quality, Workflow, + portal_run_id, wfr_id, durationMin, start, end, s3_outdir_sash ) |> dplyr::arrange(desc(SubjectID), start) |> dt_view() From d8917ceb28f268475107085cf5236ef8f81ba210 Mon Sep 17 00:00:00 2001 From: pdiakumis Date: Thu, 2 Nov 2023 10:56:30 +1100 Subject: [PATCH 8/8] bring durationMin to the front --- inst/rmd/umccr_portal/portal_summary.Rmd | 54 ++++++++++++------------ 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/inst/rmd/umccr_portal/portal_summary.Rmd b/inst/rmd/umccr_portal/portal_summary.Rmd index b1ebb40..1753033 100644 --- a/inst/rmd/umccr_portal/portal_summary.Rmd +++ b/inst/rmd/umccr_portal/portal_summary.Rmd @@ -115,7 +115,7 @@ get_sbj_url <- function(x, colour = NULL, account = "") { # options(width = 150) fmt1 <- "%Y-%m-%dT%H:%M:%S" date_start <- as.POSIXct("2023-10-27T00:00:01", format = fmt1) -date_end <- as.POSIXct("2023-10-30T23:59:59", format = fmt1) +date_end <- as.POSIXct("2023-10-31T23:59:59", format = fmt1) wf_order <- c( "bcl_convert", "tso_ctdna_tumor_only", @@ -278,9 +278,9 @@ pmeta |> durationMin = round(as.numeric(difftime(end, start, units = "mins"))) ) |> dplyr::select( - end_status, runfolder_name, SubjectID, LibraryID, SampleID, Phenotype, ExternalSubjectID, + end_status, durationMin, runfolder_name, SubjectID, LibraryID, SampleID, Phenotype, ExternalSubjectID, ProjectOwner, ProjectName, batch_name, Type, Assay, Source, Quality, Workflow, - durationMin, start, end + start, end ) |> dplyr::arrange(desc(SubjectID), start) |> dt_view() @@ -308,9 +308,9 @@ pmeta |> durationMin = round(as.numeric(difftime(end, start, units = "mins"))) ) |> dplyr::select( - end_status, SubjectID, LibraryID, SampleID, Phenotype, ExternalSubjectID, + end_status, durationMin, SubjectID, LibraryID, SampleID, Phenotype, ExternalSubjectID, ProjectOwner, ProjectName, Type, Assay, Source, Quality, Workflow, - portal_run_id, wfr_id, durationMin, start, end, gds_outdir + portal_run_id, wfr_id, start, end, gds_outdir ) |> dplyr::arrange(desc(SubjectID), start) |> dt_view() @@ -338,9 +338,9 @@ pmeta |> durationMin = round(as.numeric(difftime(end, start, units = "mins"))) ) |> dplyr::select( - end_status, SubjectID, LibraryID, SampleID, Phenotype, Lane, ExternalSubjectID, + end_status, durationMin, SubjectID, LibraryID, SampleID, Phenotype, Lane, ExternalSubjectID, ProjectOwner, ProjectName, Type, Assay, Source, Quality, Workflow, - portal_run_id, wfr_id, durationMin, start, end, gds_outdir_dragen + portal_run_id, wfr_id, start, end, gds_outdir_dragen ) |> dplyr::arrange(desc(SubjectID), start) |> dt_view() @@ -368,9 +368,9 @@ pmeta |> durationMin = round(as.numeric(difftime(end, start, units = "mins"))) ) |> dplyr::select( - end_status, SubjectID, LibraryID, SampleID, Phenotype, Lane, ExternalSubjectID, + end_status, durationMin, SubjectID, LibraryID, SampleID, Phenotype, Lane, ExternalSubjectID, ProjectOwner, ProjectName, Type, Assay, Source, Quality, Workflow, - portal_run_id, wfr_id, durationMin, start, end, gds_outdir_dragen + portal_run_id, wfr_id, start, end, gds_outdir_dragen ) |> dplyr::arrange(desc(SubjectID), start) |> dt_view() @@ -398,9 +398,9 @@ pmeta |> durationMin = round(as.numeric(difftime(end, start, units = "mins"))) ) |> dplyr::select( - end_status, SubjectID, LibraryID, SampleID, Phenotype, ExternalSubjectID, ProjectOwner, ProjectName, + end_status, durationMin, SubjectID, LibraryID, SampleID, Phenotype, ExternalSubjectID, ProjectOwner, ProjectName, Type, Assay, Source, Quality, Workflow, - portal_run_id, wfr_id, durationMin, start, end, gds_outdir_dragen + portal_run_id, wfr_id, start, end, gds_outdir_dragen ) |> dplyr::arrange(desc(SubjectID), start) |> dt_view() @@ -433,9 +433,9 @@ pmeta |> durationMin = round(as.numeric(difftime(end, start, units = "mins"))) ) |> dplyr::select( - end_status, SubjectID, LibraryID, SampleID, Phenotype, ExternalSubjectID, ProjectOwner, ProjectName, + end_status, durationMin, SubjectID, LibraryID, SampleID, Phenotype, ExternalSubjectID, ProjectOwner, ProjectName, Type, Assay, Source, Quality, Workflow, - portal_run_id, wfr_id, durationMin, start, end, gds_outdir_dragen_somatic, gds_outdir_dragen_germline + portal_run_id, wfr_id, start, end, gds_outdir_dragen_somatic, gds_outdir_dragen_germline ) |> dplyr::arrange(desc(SubjectID), start) |> dt_view() @@ -468,9 +468,9 @@ pmeta |> durationMin = round(as.numeric(difftime(end, start, units = "mins"))) ) |> dplyr::select( - end_status, SubjectID, LibraryID, SampleID, Phenotype, ExternalSubjectID, + end_status, durationMin, SubjectID, LibraryID, SampleID, Phenotype, ExternalSubjectID, ProjectOwner, ProjectName, Type, Assay, Source, Quality, Workflow, - portal_run_id, wfr_id, durationMin, start, end, gds_outdir_umccrise + portal_run_id, wfr_id, start, end, gds_outdir_umccrise ) |> dplyr::arrange(desc(SubjectID), start) |> dt_view() @@ -498,9 +498,9 @@ pmeta |> durationMin = round(as.numeric(difftime(end, start, units = "mins"))) ) |> dplyr::select( - end_status, SubjectID, LibraryID, SampleID, Phenotype, rnasum_dataset, ExternalSubjectID, + end_status, durationMin, SubjectID, LibraryID, SampleID, Phenotype, rnasum_dataset, ExternalSubjectID, ProjectOwner, ProjectName, Type, Assay, Source, Quality, Workflow, - portal_run_id, wfr_id, durationMin, start, end, gds_outdir_rnasum, + portal_run_id, wfr_id, start, end, gds_outdir_rnasum, ) |> dplyr::arrange(desc(SubjectID), start) |> dt_view() @@ -528,9 +528,9 @@ pmeta |> durationMin = round(as.numeric(difftime(end, start, units = "mins"))) ) |> dplyr::select( - end_status, SubjectID, LibraryID, SampleID, Phenotype, ExternalSubjectID, ProjectOwner, ProjectName, + end_status, durationMin, SubjectID, LibraryID, SampleID, Phenotype, ExternalSubjectID, ProjectOwner, ProjectName, Type, Assay, Source, Quality, Workflow, - portal_run_id, wfr_id, durationMin, start, end, s3_outdir_star + portal_run_id, wfr_id, start, end, s3_outdir_star ) |> dplyr::arrange(desc(SubjectID), start) |> dt_view() @@ -558,9 +558,9 @@ pmeta |> durationMin = round(as.numeric(difftime(end, start, units = "mins"))) ) |> dplyr::select( - end_status, SubjectID, LibraryID, SampleID, Phenotype, ExternalSubjectID, ProjectOwner, ProjectName, + end_status, durationMin, SubjectID, LibraryID, SampleID, Phenotype, ExternalSubjectID, ProjectOwner, ProjectName, Type, Assay, Source, Quality, Workflow, - portal_run_id, wfr_id, durationMin, start, end, s3_outdir_oncoanalyser + portal_run_id, wfr_id, start, end, s3_outdir_oncoanalyser ) |> dplyr::arrange(desc(SubjectID), start) |> dt_view() @@ -594,9 +594,9 @@ pmeta |> durationMin = round(as.numeric(difftime(end, start, units = "mins"))) ) |> dplyr::select( - end_status, SubjectID, LibraryID, SampleID, Phenotype, ExternalSubjectID, + end_status, durationMin, SubjectID, LibraryID, SampleID, Phenotype, ExternalSubjectID, ProjectOwner, ProjectName, Type, Assay, Source, Quality, Workflow, - portal_run_id, wfr_id, durationMin, start, end, s3_outdir_oncoanalyser + portal_run_id, wfr_id, start, end, s3_outdir_oncoanalyser ) |> dplyr::arrange(desc(SubjectID), start) |> dt_view() @@ -630,9 +630,9 @@ pmeta |> durationMin = round(as.numeric(difftime(end, start, units = "mins"))) ) |> dplyr::select( - end_status, SubjectID, LibraryID, SampleID, Phenotype, WGTS, ExternalSubjectID, + end_status, durationMin, SubjectID, LibraryID, SampleID, Phenotype, WGTS, ExternalSubjectID, ProjectOwner, ProjectName, Type, Assay, Source, Quality, Workflow, - portal_run_id, wfr_id, durationMin, start, end, s3_outdir_oncoanalyser + portal_run_id, wfr_id, start, end, s3_outdir_oncoanalyser ) |> dplyr::arrange(desc(SubjectID), start) |> dt_view() @@ -665,9 +665,9 @@ pmeta |> durationMin = round(as.numeric(difftime(end, start, units = "mins"))) ) |> dplyr::select( - end_status, SubjectID, LibraryID, SampleID, Phenotype, ExternalSubjectID, + end_status, durationMin, SubjectID, LibraryID, SampleID, Phenotype, ExternalSubjectID, ProjectOwner, ProjectName, Type, Assay, Source, Quality, Workflow, - portal_run_id, wfr_id, durationMin, start, end, s3_outdir_sash + portal_run_id, wfr_id, start, end, s3_outdir_sash ) |> dplyr::arrange(desc(SubjectID), start) |> dt_view()