Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gdr 2224 #98

Merged
merged 30 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
b608f46
fix: bug with wrong refining rowdata
bczech Nov 14, 2023
b567cbe
chore: bump version and update NEWS.md
bczech Nov 15, 2023
1f16cb4
refactor: get rid of transforming rowData into S4Vectors
bczech Nov 15, 2023
e2d2410
test: fix unit tests
bczech Nov 20, 2023
d06c76d
refactor: add more headers
bczech Nov 24, 2023
dca7dbc
refactor: fix typo
bczech Nov 29, 2023
f799317
refactor: move average biological replicates function
bczech Nov 29, 2023
9d70c72
refactor: move functions for supporting additional metadata
bczech Dec 1, 2023
8ff9d41
chore: bump version
bczech Dec 1, 2023
38231f7
test: fix unit tests
bczech Dec 1, 2023
1328469
test: update unit tests
bczech Dec 1, 2023
8f20b9f
refactor: add missing asserts
bczech Dec 1, 2023
01444b9
doc: reoxygenate
bczech Dec 1, 2023
ff6992a
refactor: fix averaging
bczech Dec 1, 2023
dc76673
refactor: add support for ids
bczech Dec 1, 2023
2e88c68
refactor: extend the list of metrics for averaging
bczech Dec 4, 2023
32b9f95
refactor: update headers
bczech Dec 4, 2023
5545967
refactor: update logic for averaging
bczech Dec 4, 2023
5f1a607
test: fix unit tests
bczech Dec 4, 2023
8aab64c
test: add unit tests
bczech Dec 4, 2023
2ed154a
test: add unit tests
bczech Dec 4, 2023
8e37463
test: fix unit tests
bczech Dec 5, 2023
2efbf46
test: update unit tests
bczech Dec 5, 2023
73667aa
refactor: add missing namespace
bczech Dec 5, 2023
2356975
ci: trigger build
bczech Dec 5, 2023
92adbb7
refactor: move function
bczech Dec 6, 2023
3ac0dc8
refactor: update namespace
bczech Dec 6, 2023
cd0591d
test: update unit test
bczech Dec 6, 2023
5f2920b
doc: add missing examples
bczech Dec 6, 2023
42a60f4
doc: reoxygenate
bczech Dec 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: gDRutils
Type: Package
Title: A package with helper functions for processing drug response data
Version: 0.99.39
Date: 2023-11-10
Version: 0.99.40
Date: 2023-11-15
Authors@R: c(person("Bartosz", "Czech", role=c("aut")),
person("Arkadiusz", "Gladki", role=c("cre", "aut"), email="[email protected]"),
person("Aleksander", "Chlebowski", role=c("aut")),
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.99.40 (2023-11-15)
- fix bug with refining rowData
- extend the list of headers

## 0.99.39 (2023-11-10)
- update schema to support NA in reference division time

Expand Down
21 changes: 20 additions & 1 deletion R/headers_list.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
get_env_identifiers("drug_name", simplify = TRUE),
get_env_identifiers("masked_tag", simplify = TRUE),
paste0(get_env_identifiers("drug_name", simplify = TRUE), "_", 2:10),
paste0(get_env_identifiers("drug_moa", simplify = TRUE), "_", 2:10),
HEADERS_LIST[["raw_data"]],
HEADERS_LIST[["normalized_results"]],
HEADERS_LIST[["averaged_results"]],
Expand All @@ -51,6 +52,22 @@

HEADERS_LIST[["ordered_1"]] <- .orderHeaderList(HEADERS_LIST, 1)
HEADERS_LIST[["ordered_2"]] <- .orderHeaderList(HEADERS_LIST, 2)

HEADERS_LIST[["id"]] <- c("rId", "cId")

HEADERS_LIST[["combo"]] <- c("normalization_type",
"iso_level",
"pos_x",
"pos_y",
"pos_x_ref",
"pos_y_ref",
"log2_CI",
"log10_ratio_conc")

HEADERS_LIST[["obsolete"]] <- c("RV",
"GR",
"Excess")


HEADERS_LIST
}
Expand Down Expand Up @@ -83,7 +100,9 @@
.getAveragedResultsList <- function() {
c(
"x",
"x_std"
"x_std",
"std_RelativeViability",
"std_GRvalue"
)
}

Expand Down
5 changes: 3 additions & 2 deletions R/standardize_MAE.R
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,14 @@ get_optional_coldata_fields <- function(se) {
#'
get_optional_rowdata_fields <- function(se) {
bczech marked this conversation as resolved.
Show resolved Hide resolved
idfs <- get_SE_identifiers(se)
rowdata <- SummarizedExperiment::rowData(se)

out <- c(idfs["drug_moa"])

if (!is.null(idfs["drug2"])) {
if (!is.null(rowdata[[idfs[["drug2"]]]])) {
out <- c(out, idfs["drug_moa2"])
}
if (!is.null(idfs["drug3"])) {
if (!is.null(rowdata[[idfs[["drug3"]]]])) {
out <- c(out, idfs["drug_moa3"])
}

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-headers.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ test_that("get_header works", {
expect_equal(get_header("manifest"), list(barcode = c("Barcode", "Plate"),
template = c("Template", "Treatment"),
duration = "Duration"))
expect_equal(length(get_header()), 13)
expect_equal(length(get_header()), 14)
bczech marked this conversation as resolved.
Show resolved Hide resolved

set_env_identifier("duration", "TEST_DURATION")
expect_equal(get_header("manifest"), list(barcode = c("Barcode", "Plate"),
Expand Down