Get full paths for bam files for a sample or patient.

get_bams(this_sample_id, this_patient_id)

Arguments

this_sample_id

Sample ID of interest.

this_patient_id

patient ID of interest.

Value

A list that contains the genome_build and an igv-friendly build (igv_build), a list of bam file paths for tumour, normal and mrna data.

Details

Returns a list with BAM paths for tumour, normal and mrna data. This function expects a sample ID (this_sample_id) or a patient ID (this_patient_id).

Examples


#example 1, using a sample ID
bam_details = get_bams(this_sample_id = "HTMCP-01-06-00422-01A-01D")
#> Error in (function (cond) .Internal(C_tryCatchHelper(addr, 1L, cond)))(structure(list(message = c(i = "In argument: `seq_type %in% seq_type_filter & tissue_status == \"normal\"`."),     trace = structure(list(call = list(pkgdown::build_reference(lazy = TRUE),         purrr::map(topics, build_reference_topic, pkg = pkg,             lazy = lazy, examples_env = examples_env, run_dont_run = run_dont_run),         map_("list", .x, .f, ..., .progress = .progress), with_indexed_errors(i = i,             names = names, error_call = .purrr_error_call, call_with_cleanup(map_impl,                 environment(), .type, .progress, n, names, i)),         withCallingHandlers(expr, error = function(cnd) {            if (i == 0L) {            }            else {                message <- c(i = "In index: {i}.")                if (!is.null(names) && !is.na(names[[i]]) &&                   names[[i]] != "") {                  name <- names[[i]]                  message <- c(message, i = "With name: {name}.")                }                else {                  name <- NULL                }                cli::cli_abort(message, location = i, name = name,                   parent = cnd, call = error_call, class = "purrr_error_indexed")            }        }), call_with_cleanup(map_impl, environment(), .type,             .progress, n, names, i), .f(.x[[i]], ...), withCallingHandlers(data_reference_topic(topic,             pkg, examples_env = examples_env, run_dont_run = run_dont_run),             error = function(err) {                msg <- c(paste0("Failed to parse Rd in ", topic$file_in),                   i = err$message)                abort(msg, parent = err)            }), data_reference_topic(topic, pkg, examples_env = examples_env,             run_dont_run = run_dont_run), run_examples(tags$tag_examples[[1]],             env = if (is.null(examples_env)) NULL else new.env(parent = examples_env),             topic = tools::file_path_sans_ext(topic$file_in),             run_dont_run = run_dont_run), highlight_examples(code,             topic, env = env), downlit::evaluate_and_highlight(code,             fig_save = fig_save_topic, env = child_env(env),             output_handler = evaluate::new_output_handler(value = pkgdown_print)),         evaluate::evaluate(code, child_env(env), new_device = TRUE,             output_handler = output_handler), evaluate_call(expr,             parsed$src[[i]], envir = envir, enclos = enclos,             debug = debug, last = i == length(out), use_try = stop_on_error !=                 2L, keep_warning = keep_warning, keep_message = keep_message,             log_echo = log_echo, log_warning = log_warning, output_handler = output_handler,             include_timing = include_timing), timing_fn(handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr,             envir, enclos, user_handlers)), warning = wHandler,             error = eHandler, message = mHandler))), handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr,             envir, enclos, user_handlers)), warning = wHandler,             error = eHandler, message = mHandler)), try(f, silent = TRUE),         tryCatch(expr, error = function(e) {            call <- conditionCall(e)            if (!is.null(call)) {                if (identical(call[[1L]], quote(doTryCatch)))                   call <- sys.call(-4L)                dcall <- deparse(call, nlines = 1L)                prefix <- paste("Error in", dcall, ": ")                LONG <- 75L                sm <- strsplit(conditionMessage(e), "\n")[[1L]]                w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L],                   type = "w")                if (is.na(w))                   w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],                     type = "b")                if (w > LONG)                   prefix <- paste0(prefix, "\n  ")            }            else prefix <- "Error : "            msg <- paste0(prefix, conditionMessage(e), "\n")            .Internal(seterrmessage(msg[1L]))            if (!silent && isTRUE(getOption("show.error.messages"))) {                cat(msg, file = outFile)                .Internal(printDeferredWarnings())            }            invisible(structure(msg, class = "try-error", condition = e))        }), tryCatchList(expr, classes, parentenv, handlers),         tryCatchOne(expr, names, parentenv, handlers[[1L]]),         doTryCatch(return(expr), name, parentenv, handler), withCallingHandlers(withVisible(eval_with_user_handlers(expr,             envir, enclos, user_handlers)), warning = wHandler,             error = eHandler, message = mHandler), withVisible(eval_with_user_handlers(expr,             envir, enclos, user_handlers)), eval_with_user_handlers(expr,             envir, enclos, user_handlers), eval(expr, envir,             enclos), eval(expr, envir, enclos), get_bams(this_sample_id = "HTMCP-01-06-00422-01A-01D"),         get_gambl_metadata(tissue_status_filter = c("tumour",             "normal"), seq_type_filter = seq_type_filter), sample_meta %>%             dplyr::filter(seq_type %in% seq_type_filter & tissue_status ==                 "normal") %>% dplyr::select(patient_id, sample_id,             seq_type, genome_build) %>% as.data.frame() %>% dplyr::rename(normal_sample_id = "sample_id"),         dplyr::rename(., normal_sample_id = "sample_id"), as.data.frame(.),         dplyr::select(., patient_id, sample_id, seq_type, genome_build),         dplyr::filter(., seq_type %in% seq_type_filter & tissue_status ==             "normal"), filter.data.frame(., seq_type %in% seq_type_filter &             tissue_status == "normal"), filter_rows(.data, dots,             by), filter_eval(dots, mask = mask, error_call = error_call,             user_env = user_env), withCallingHandlers(mask$eval_all_filter(dots,             env_filter), error = dplyr_error_handler(dots = dots,             mask = mask, bullets = filter_bullets, error_call = error_call),             warning = function(cnd) {                local_error_context(dots, i, mask)                warning_handler(cnd)            }, `dplyr:::signal_filter_one_column_matrix` = function(e) {                warn_filter_one_column_matrix(env = error_call,                   user_env = user_env)            }, `dplyr:::signal_filter_across` = function(e) {                warn_filter_across(env = error_call, user_env = user_env)            }, `dplyr:::signal_filter_data_frame` = function(e) {                warn_filter_data_frame(env = error_call, user_env = user_env)            }), mask$eval_all_filter(dots, env_filter), eval(),         seq_type %in% seq_type_filter, .handleSimpleError(`<fn>`,             "object 'seq_type_filter' not found", base::quote(seq_type %in%                 seq_type_filter)), h(simpleError(msg, call)),         .handleSimpleError(`<fn>`, "error in evaluating the argument 'table' in selecting a method for function '%in%': object 'seq_type_filter' not found",             base::quote(h(simpleError(msg, call)))), h(simpleError(msg,             call)), abort(message, class = error_class, parent = parent,             call = error_call)), parent = c(0L, 1L, 2L, 3L, 4L,     3L, 3L, 7L, 7L, 9L, 10L, 11L, 12L, 13L, 14L, 14L, 16L, 17L,     18L, 19L, 20L, 14L, 14L, 14L, 24L, 25L, 26L, 27L, 28L, 0L,     0L, 0L, 0L, 0L, 34L, 35L, 36L, 36L, 38L, 0L, 0L, 41L, 0L,     43L, 44L), visible = c(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,     TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,     TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,     TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,     TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE),         namespace = c("pkgdown", "purrr", "purrr", "purrr", "base",         "purrr", "pkgdown", "base", "pkgdown", "pkgdown", "pkgdown",         "downlit", "evaluate", "evaluate", "evaluate", "evaluate",         "base", "base", "base", "base", "base", "base", "base",         "evaluate", "base", "base", "GAMBLR", "GAMBLR", NA, "dplyr",         "BiocGenerics", "dplyr", "dplyr", "dplyr", "dplyr", "dplyr",         "base", NA, "dplyr", NA, "base", "base", "base", "dplyr",         "rlang"), scope = c("::", "::", ":::", ":::", "::", ":::",         "local", "::", ":::", ":::", ":::", "::", "::", ":::",         "local", "local", "::", "::", "local", "local", "local",         "::", "::", ":::", "::", "::", "::", "::", NA, "::",         "::", "::", "::", ":::", ":::", ":::", "::", NA, "local",         NA, "::", "local", "::", "local", "::"), error_frame = c(FALSE,         FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,         FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,         FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,         FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,         TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,         FALSE, FALSE, FALSE, FALSE)), row.names = c(NA, -45L), version = 2L, class = c("rlang_trace",     "rlib_trace", "tbl", "data.frame")), parent = structure(list(        message = "error in evaluating the argument 'table' in selecting a method for function '%in%': object 'seq_type_filter' not found",         call = h(simpleError(msg, call))), class = c("simpleError",     "error", "condition")), rlang = list(inherit = TRUE), call = dplyr::filter(.,         seq_type %in% seq_type_filter & tissue_status == "normal"),     use_cli_format = TRUE), class = c("rlang_error", "error", "condition"))): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame':  In argument: `seq_type %in% seq_type_filter & tissue_status ==
#>   "normal"`.
#> Caused by error in `h()`:
#> ! error in evaluating the argument 'table' in selecting a method for function '%in%': object 'seq_type_filter' not found

#example 2, using a patient ID
bam_details = get_bams(this_patient_id = "HTMCP-01-06-00422")
#> Error in (function (cond) .Internal(C_tryCatchHelper(addr, 1L, cond)))(structure(list(message = c(i = "In argument: `seq_type %in% seq_type_filter & tissue_status == \"normal\"`."),     trace = structure(list(call = list(pkgdown::build_reference(lazy = TRUE),         purrr::map(topics, build_reference_topic, pkg = pkg,             lazy = lazy, examples_env = examples_env, run_dont_run = run_dont_run),         map_("list", .x, .f, ..., .progress = .progress), with_indexed_errors(i = i,             names = names, error_call = .purrr_error_call, call_with_cleanup(map_impl,                 environment(), .type, .progress, n, names, i)),         withCallingHandlers(expr, error = function(cnd) {            if (i == 0L) {            }            else {                message <- c(i = "In index: {i}.")                if (!is.null(names) && !is.na(names[[i]]) &&                   names[[i]] != "") {                  name <- names[[i]]                  message <- c(message, i = "With name: {name}.")                }                else {                  name <- NULL                }                cli::cli_abort(message, location = i, name = name,                   parent = cnd, call = error_call, class = "purrr_error_indexed")            }        }), call_with_cleanup(map_impl, environment(), .type,             .progress, n, names, i), .f(.x[[i]], ...), withCallingHandlers(data_reference_topic(topic,             pkg, examples_env = examples_env, run_dont_run = run_dont_run),             error = function(err) {                msg <- c(paste0("Failed to parse Rd in ", topic$file_in),                   i = err$message)                abort(msg, parent = err)            }), data_reference_topic(topic, pkg, examples_env = examples_env,             run_dont_run = run_dont_run), run_examples(tags$tag_examples[[1]],             env = if (is.null(examples_env)) NULL else new.env(parent = examples_env),             topic = tools::file_path_sans_ext(topic$file_in),             run_dont_run = run_dont_run), highlight_examples(code,             topic, env = env), downlit::evaluate_and_highlight(code,             fig_save = fig_save_topic, env = child_env(env),             output_handler = evaluate::new_output_handler(value = pkgdown_print)),         evaluate::evaluate(code, child_env(env), new_device = TRUE,             output_handler = output_handler), evaluate_call(expr,             parsed$src[[i]], envir = envir, enclos = enclos,             debug = debug, last = i == length(out), use_try = stop_on_error !=                 2L, keep_warning = keep_warning, keep_message = keep_message,             log_echo = log_echo, log_warning = log_warning, output_handler = output_handler,             include_timing = include_timing), timing_fn(handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr,             envir, enclos, user_handlers)), warning = wHandler,             error = eHandler, message = mHandler))), handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr,             envir, enclos, user_handlers)), warning = wHandler,             error = eHandler, message = mHandler)), try(f, silent = TRUE),         tryCatch(expr, error = function(e) {            call <- conditionCall(e)            if (!is.null(call)) {                if (identical(call[[1L]], quote(doTryCatch)))                   call <- sys.call(-4L)                dcall <- deparse(call, nlines = 1L)                prefix <- paste("Error in", dcall, ": ")                LONG <- 75L                sm <- strsplit(conditionMessage(e), "\n")[[1L]]                w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L],                   type = "w")                if (is.na(w))                   w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],                     type = "b")                if (w > LONG)                   prefix <- paste0(prefix, "\n  ")            }            else prefix <- "Error : "            msg <- paste0(prefix, conditionMessage(e), "\n")            .Internal(seterrmessage(msg[1L]))            if (!silent && isTRUE(getOption("show.error.messages"))) {                cat(msg, file = outFile)                .Internal(printDeferredWarnings())            }            invisible(structure(msg, class = "try-error", condition = e))        }), tryCatchList(expr, classes, parentenv, handlers),         tryCatchOne(expr, names, parentenv, handlers[[1L]]),         doTryCatch(return(expr), name, parentenv, handler), withCallingHandlers(withVisible(eval_with_user_handlers(expr,             envir, enclos, user_handlers)), warning = wHandler,             error = eHandler, message = mHandler), withVisible(eval_with_user_handlers(expr,             envir, enclos, user_handlers)), eval_with_user_handlers(expr,             envir, enclos, user_handlers), eval(expr, envir,             enclos), eval(expr, envir, enclos), get_bams(this_patient_id = "HTMCP-01-06-00422"),         get_gambl_metadata(tissue_status_filter = c("tumour",             "normal"), seq_type_filter = seq_type_filter), sample_meta %>%             dplyr::filter(seq_type %in% seq_type_filter & tissue_status ==                 "normal") %>% dplyr::select(patient_id, sample_id,             seq_type, genome_build) %>% as.data.frame() %>% dplyr::rename(normal_sample_id = "sample_id"),         dplyr::rename(., normal_sample_id = "sample_id"), as.data.frame(.),         dplyr::select(., patient_id, sample_id, seq_type, genome_build),         dplyr::filter(., seq_type %in% seq_type_filter & tissue_status ==             "normal"), filter.data.frame(., seq_type %in% seq_type_filter &             tissue_status == "normal"), filter_rows(.data, dots,             by), filter_eval(dots, mask = mask, error_call = error_call,             user_env = user_env), withCallingHandlers(mask$eval_all_filter(dots,             env_filter), error = dplyr_error_handler(dots = dots,             mask = mask, bullets = filter_bullets, error_call = error_call),             warning = function(cnd) {                local_error_context(dots, i, mask)                warning_handler(cnd)            }, `dplyr:::signal_filter_one_column_matrix` = function(e) {                warn_filter_one_column_matrix(env = error_call,                   user_env = user_env)            }, `dplyr:::signal_filter_across` = function(e) {                warn_filter_across(env = error_call, user_env = user_env)            }, `dplyr:::signal_filter_data_frame` = function(e) {                warn_filter_data_frame(env = error_call, user_env = user_env)            }), mask$eval_all_filter(dots, env_filter), eval(),         seq_type %in% seq_type_filter, .handleSimpleError(`<fn>`,             "object 'seq_type_filter' not found", base::quote(get_gambl_metadata(tissue_status_filter = c("tumour",                 "normal"), seq_type_filter = seq_type_filter))),         h(simpleError(msg, call)), .handleSimpleError(`<fn>`,             "error in evaluating the argument 'table' in selecting a method for function '%in%': object 'seq_type_filter' not found",             base::quote(h(simpleError(msg, call)))), h(simpleError(msg,             call)), abort(message, class = error_class, parent = parent,             call = error_call)), parent = c(0L, 1L, 2L, 3L, 4L,     3L, 3L, 7L, 7L, 9L, 10L, 11L, 12L, 13L, 14L, 14L, 16L, 17L,     18L, 19L, 20L, 14L, 14L, 14L, 24L, 25L, 26L, 27L, 28L, 0L,     0L, 0L, 0L, 0L, 34L, 35L, 36L, 36L, 38L, 0L, 0L, 41L, 0L,     43L, 44L), visible = c(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,     TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,     TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,     TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,     TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, FALSE),         namespace = c("pkgdown", "purrr", "purrr", "purrr", "base",         "purrr", "pkgdown", "base", "pkgdown", "pkgdown", "pkgdown",         "downlit", "evaluate", "evaluate", "evaluate", "evaluate",         "base", "base", "base", "base", "base", "base", "base",         "evaluate", "base", "base", "GAMBLR", "GAMBLR", NA, "dplyr",         "BiocGenerics", "dplyr", "dplyr", "dplyr", "dplyr", "dplyr",         "base", NA, "dplyr", NA, "base", "base", "base", "dplyr",         "rlang"), scope = c("::", "::", ":::", ":::", "::", ":::",         "local", "::", ":::", ":::", ":::", "::", "::", ":::",         "local", "local", "::", "::", "local", "local", "local",         "::", "::", ":::", "::", "::", "::", "::", NA, "::",         "::", "::", "::", ":::", ":::", ":::", "::", NA, "local",         NA, "::", "local", "::", "local", "::"), error_frame = c(FALSE,         FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,         FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,         FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,         FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,         TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,         FALSE, FALSE, FALSE, FALSE)), row.names = c(NA, -45L), version = 2L, class = c("rlang_trace",     "rlib_trace", "tbl", "data.frame")), parent = structure(list(        message = "error in evaluating the argument 'table' in selecting a method for function '%in%': object 'seq_type_filter' not found",         call = h(simpleError(msg, call))), class = c("simpleError",     "error", "condition")), rlang = list(inherit = TRUE), call = dplyr::filter(.,         seq_type %in% seq_type_filter & tissue_status == "normal"),     use_cli_format = TRUE), class = c("rlang_error", "error", "condition"))): error in evaluating the argument 'x' in selecting a method for function 'as.data.frame':  In argument: `seq_type %in% seq_type_filter & tissue_status ==
#>   "normal"`.
#> Caused by error in `h()`:
#> ! error in evaluating the argument 'table' in selecting a method for function '%in%': object 'seq_type_filter' not found