From 1ae41994f5fe5a7113278c0a8bf8f922f152949c Mon Sep 17 00:00:00 2001 From: OganM Date: Wed, 7 Aug 2024 22:16:04 -0700 Subject: [PATCH] previous fix for get_result_sets --- R/processors.R | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/R/processors.R b/R/processors.R index 2fe78ca0..f9199154 100644 --- a/R/processors.R +++ b/R/processors.R @@ -335,8 +335,22 @@ processDifferentialExpressionAnalysisResultSetValueObject = function(d){ contrast.ID <- contrast_id[!contrast_id %in% baseline_id] size <- length(contrast.ID) + experimental.factors <- non_control_factors %>% purrr::map(processFactorValueValueObject) + + factor.ID <- x$experimentalFactors[[1]]$id + factor.category <-x$experimentalFactors[[1]]$category + factor.category.URI <-x$experimentalFactors[[1]]$categoryUri + + experimental.factors <- experimental.factors %>% lapply(function(x){ + x$factor.ID <- factor.ID + x$factor.category <- factor.category + x$factor.category.URI <- factor.category.URI + return(x) + }) + + baseline.factors <- x$baselineGroup %>% processFactorValueValueObject() %>% list() %>% rep(size) } else{ @@ -380,9 +394,17 @@ processDifferentialExpressionAnalysisResultSetValueObject = function(d){ all_factors <- x$experimentalFactors %>% lapply(function(y){ - y$values %>% purrr::map(processFactorValueValueObject) %>% do.call(rbind,.) + factor.ID <- y$id + factor.category <- y$category + factor.category.URI <- y$categoryUri + out <- y$values %>% purrr::map(processFactorValueValueObject) %>% do.call(rbind,.) + out$factor.ID <- factor.ID + out$factor.category <- factor.category + out$factor.category.URI <- factor.category.URI + return(out) }) %>% do.call(rbind,.) + baseline_factors <- all_factors %>% dplyr::filter(ID %in% baseline_ids)