From cdb5220cdbf79194210a879fbbfcdceb27e8ec79 Mon Sep 17 00:00:00 2001 From: czechb3 Date: Tue, 23 Apr 2024 11:23:53 +0200 Subject: [PATCH] doc: update env vars --- R/add_annotation.R | 8 ++++---- man/add_CellLine_annotation.Rd | 4 ++-- man/add_Drug_annotation.Rd | 4 ++-- tests/testthat/test-add_annotation.R | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/R/add_annotation.R b/R/add_annotation.R index 0ebc0e6e..22f75a07 100644 --- a/R/add_annotation.R +++ b/R/add_annotation.R @@ -11,7 +11,7 @@ #' @param fill string indicating how unknown cell lines should be filled in the DB #' @param annotationPackage string indication name of the package containing cellline annotation #' @param externalSource string with path to external file with annotation data; by default it checks -#' 'gDR_cellline_annotation' env var. This file should contain columns such as gnumber, drug_name and drug_moa +#' 'GDR_CELLLINE_ANNOTATION' env var. This file should contain columns such as gnumber, drug_name and drug_moa #' @keywords annotation #' @details #' The logic of adding celline annotation for dt_metadata based on @@ -47,7 +47,7 @@ add_CellLine_annotation <- function( } else { "gDRtestData" }, - externalSource = Sys.getenv("gDR_cellline_annotation") + externalSource = Sys.getenv("GDR_CELLLINE_ANNOTATION") ) { # Assertions: @@ -126,7 +126,7 @@ add_CellLine_annotation <- function( #' @param fill string indicating how unknown cell lines should be filled in the DB #' @param annotationPackage string indication name of the package containing drug annotation #' @param externalSource string with path to external file with annotation data; by default it checks -#' 'gDR_drug_annotation' env var. This file should contain columns such as cell_line_identifier, +#' 'GDR_DRUG_ANNOTATION' env var. This file should contain columns such as cell_line_identifier, #' cell_line_name, primary_tissue, doubling_time, parental_identifier, and subtype #' @keywords annotation #' @details The logic of adding drug annotation for dt_metadata @@ -149,7 +149,7 @@ add_Drug_annotation <- function( } else { "gDRtestData" }, - externalSource = Sys.getenv("gDR_drug_annotation") + externalSource = Sys.getenv("GDR_DRUG_ANNOTATION") ) { # Assertions: diff --git a/man/add_CellLine_annotation.Rd b/man/add_CellLine_annotation.Rd index 1d78ce8d..85a03c5b 100644 --- a/man/add_CellLine_annotation.Rd +++ b/man/add_CellLine_annotation.Rd @@ -17,7 +17,7 @@ add_CellLine_annotation( } else { "gDRtestData" }, - externalSource = Sys.getenv("gDR_cellline_annotation") + externalSource = Sys.getenv("GDR_CELLLINE_ANNOTATION") ) } \arguments{ @@ -36,7 +36,7 @@ used in the annotation file} \item{annotationPackage}{string indication name of the package containing cellline annotation} \item{externalSource}{string with path to external file with annotation data; by default it checks -'gDR_cellline_annotation' env var. This file should contain columns such as gnumber, drug_name and drug_moa} +'GDR_CELLLINE_ANNOTATION' env var. This file should contain columns such as gnumber, drug_name and drug_moa} } \value{ data.table with metadata with annotated cell lines diff --git a/man/add_Drug_annotation.Rd b/man/add_Drug_annotation.Rd index 67cf33f3..f92ec1c2 100644 --- a/man/add_Drug_annotation.Rd +++ b/man/add_Drug_annotation.Rd @@ -14,7 +14,7 @@ add_Drug_annotation( } else { "gDRtestData" }, - externalSource = Sys.getenv("gDR_drug_annotation") + externalSource = Sys.getenv("GDR_DRUG_ANNOTATION") ) } \arguments{ @@ -27,7 +27,7 @@ add_Drug_annotation( \item{annotationPackage}{string indication name of the package containing drug annotation} \item{externalSource}{string with path to external file with annotation data; by default it checks -'gDR_drug_annotation' env var. This file should contain columns such as cell_line_identifier, +'GDR_DRUG_ANNOTATION' env var. This file should contain columns such as cell_line_identifier, cell_line_name, primary_tissue, doubling_time, parental_identifier, and subtype} } \value{ diff --git a/tests/testthat/test-add_annotation.R b/tests/testthat/test-add_annotation.R index 09d80ecc..e60022c6 100644 --- a/tests/testthat/test-add_annotation.R +++ b/tests/testthat/test-add_annotation.R @@ -31,7 +31,7 @@ test_that("add_CellLine_annotation works with custom annotation in external file subtype = "random") data.table::fwrite(custom_annotation, temp_path) - Sys.setenv(gDR_cellline_annotation = temp_path) + Sys.setenv(GDR_CELLLINE_ANNOTATION = temp_path) dt_unknown_annotated <- purrr::quietly(add_CellLine_annotation)(dt_unknown)$result expect_equal(unname(dt_unknown_annotated), unname(custom_annotation)) @@ -40,7 +40,7 @@ test_that("add_CellLine_annotation works with custom annotation in external file dt_unknown_annotated) # restore default - Sys.setenv(gDR_cellline_annotation = "") + Sys.setenv(GDR_CELLLINE_ANNOTATION = "") dt_unknown_annotated <- purrr::quietly(add_CellLine_annotation)(dt_unknown)$result expect_equal(dt_unknown_annotated$clid, custom_annotation$cell_line_identifier) @@ -84,7 +84,7 @@ test_that("add_Drug_annotation works with custom annotation in external file", { drug_moa = "custom_moa") data.table::fwrite(custom_annotation, temp_path) - Sys.setenv(gDR_drug_annotation = temp_path) + Sys.setenv(GDR_DRUG_ANNOTATION = temp_path) dt_unknown_annotated <- purrr::quietly(add_Drug_annotation)(dt_unknown)$result expect_equal(unname(dt_unknown_annotated), unname(custom_annotation)) @@ -93,7 +93,7 @@ test_that("add_Drug_annotation works with custom annotation in external file", { dt_unknown_annotated) # restore default - Sys.setenv(gDR_drug_annotation = "") + Sys.setenv(GDR_DRUG_ANNOTATION = "") dt_unknown_annotated <- purrr::quietly(add_Drug_annotation)(dt_unknown)$result expect_equal(dt_unknown_annotated$DrugName, custom_annotation$gnumber)