diff --git a/R/methods_SE.R b/R/methods_SE.R index 9a260e2e..d3aeac8d 100755 --- a/R/methods_SE.R +++ b/R/methods_SE.R @@ -2895,6 +2895,8 @@ setMethod("describe_transcript", "RangedSummarizedExperiment", .describe_transcr combination_of_factors_of_NON_interest = # Factors se[1,1, drop=FALSE] |> + colData() |> + as_tibble(rownames = ".sample") |> select(...) |> suppressWarnings() |> colnames() |> diff --git a/tests/testthat/test-bulk_methods_SummarizedExperiment.R b/tests/testthat/test-bulk_methods_SummarizedExperiment.R index 84bc5a8f..3aae6428 100755 --- a/tests/testthat/test-bulk_methods_SummarizedExperiment.R +++ b/tests/testthat/test-bulk_methods_SummarizedExperiment.R @@ -747,7 +747,7 @@ test_that("gene over representation",{ species="Homo sapiens" ) - expect_equal( ncol(res), 10 ) + expect_equal( ncol(res), 13 ) @@ -854,8 +854,8 @@ test_that("Only reduced dimensions UMAP - no object",{ test_that("resolve_complete_confounders_of_non_interest",{ - library(tidySummarizedExperiment) - library(tidybulk) + #library(tidySummarizedExperiment) + library(SummarizedExperiment) # Sample annotations sample_annotations <- data.frame( @@ -890,7 +890,9 @@ test_that("resolve_complete_confounders_of_non_interest",{ se |> resolve_complete_confounders_of_non_interest(A, B, C) |> - distinct(.sample, A, B, C) |> + colData() |> + _[, c("A", "B", "C")] |> + as_tibble(rownames = ".sample") |> expect_identical(expected_tibble )