diff --git a/R/data.R b/R/data.R index dee9d66a..fbbc0077 100755 --- a/R/data.R +++ b/R/data.R @@ -28,11 +28,6 @@ #' "se_mini" -#' SummarizedExperiment mini for vignette -#' -#' -"test_deseq2_df" - #' Needed for vignette vignette_manuscript_signature_tsne #' #' diff --git a/data/test_deseq2_df.rda b/data/test_deseq2_df.rda deleted file mode 100644 index d1a474e7..00000000 Binary files a/data/test_deseq2_df.rda and /dev/null differ diff --git a/man/test_deseq2_df.Rd b/man/test_deseq2_df.Rd deleted file mode 100644 index 2869ebb3..00000000 --- a/man/test_deseq2_df.Rd +++ /dev/null @@ -1,16 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/data.R -\docType{data} -\name{test_deseq2_df} -\alias{test_deseq2_df} -\title{SummarizedExperiment mini for vignette} -\format{ -An object of class \code{DESeqDataSet} with 9921 rows and 7 columns. -} -\usage{ -test_deseq2_df -} -\description{ -SummarizedExperiment mini for vignette -} -\keyword{datasets} diff --git a/tests/testthat/test-bulk_methods.R b/tests/testthat/test-bulk_methods.R index b7c16da6..6db6d34f 100755 --- a/tests/testthat/test-bulk_methods.R +++ b/tests/testthat/test-bulk_methods.R @@ -655,15 +655,23 @@ test_that("New method choice",{ test_that("DESeq2 differential trancript abundance - no object",{ - res_deseq2 = - test_deseq2_df |> + if (find.package("DESeq2", quiet = TRUE) |> length() |> equals(0)) { + if (!requireNamespace("BiocManager", quietly = TRUE)) + install.packages("BiocManager", repos = "https://cloud.r-project.org") + BiocManager::install("DESeq2", ask = FALSE) + } + + test_deseq2_df = DESeq2::DESeqDataSet(se_mini,design=~condition) + colData(test_deseq2_df)$condition = factor(colData(test_deseq2_df)$condition) + + res_deseq2 = + test_deseq2_df |> DESeq2::DESeq() |> DESeq2::results() res_tidybulk = test_deseq2_df |> tidybulk() |> - identify_abundant(factor_of_interest = condition) |> test_differential_abundance(~condition, method="DESeq2", action="get") @@ -853,7 +861,6 @@ test_that("differential trancript abundance - random effects",{ test_that("test prefix",{ - library(DESeq2) library(stringr) df = input_df |> tidybulk(a, b, c, ) |> identify_abundant(factor_of_interest = condition)