From dd7add3a205c118b194838ba2d78acf4adeff7b9 Mon Sep 17 00:00:00 2001 From: Federico Marini Date: Wed, 27 Mar 2024 13:52:04 +0100 Subject: [PATCH 1/3] devel branch to work for GHAs --- .github/workflows/pkgdown.yml | 8 ++++---- .github/workflows/test-coverage.yml | 4 ++-- .github/workflows/test.yml | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pkgdown.yml b/.github/workflows/pkgdown.yml index 60a86cc..939e239 100644 --- a/.github/workflows/pkgdown.yml +++ b/.github/workflows/pkgdown.yml @@ -7,9 +7,9 @@ # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: push: - branches: [main, master] + branches: [devel] pull_request: - branches: [main, master] + branches: [devel] workflow_dispatch: name: pkgdown @@ -41,7 +41,7 @@ jobs: shell: Rscript {0} - name: Deploy to GitHub pages 🚀 - if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/devel' uses: JamesIves/github-pages-deploy-action@4.1.4 with: clean: false @@ -50,7 +50,7 @@ jobs: - name: Deploy to Netlify uses: nwtgck/actions-netlify@v1.2 - if: github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master' + if: github.ref != 'refs/heads/main' && github.ref != 'refs/heads/devel' with: publish-dir: "./docs" github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test-coverage.yml b/.github/workflows/test-coverage.yml index ae72cb4..0f5f53f 100644 --- a/.github/workflows/test-coverage.yml +++ b/.github/workflows/test-coverage.yml @@ -5,9 +5,9 @@ # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: push: - branches: [main, master] + branches: [devel] pull_request: - branches: [main, master] + branches: [devel] name: test-coverage diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f69afb4..8da8d79 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,9 +4,9 @@ # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: pull_request: - branches: [main, master, dev] + branches: [devel] push: - branches: [main, master, dev] + branches: [devel] name: R-CMD-check From c2e69b8266c3dd68c81016eb4e1c18839baa642c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 27 Mar 2024 12:53:48 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- R/simulator.R | 3 +-- tests/testthat/test_simulator.R | 15 +++++++-------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/R/simulator.R b/R/simulator.R index c129d74..02417c6 100755 --- a/R/simulator.R +++ b/R/simulator.R @@ -74,7 +74,7 @@ simulate_sample <- function(data, if (n == 0) { n <- 1 } - if(!is.na(seed)){ + if (!is.na(seed)) { # fix seed for random selection of cells set.seed(seed) } @@ -437,7 +437,6 @@ simulate_bulk <- function(data, # sample cells and generate pseudo-bulk profiles all_samples <- BiocParallel::bplapply(seq_along(simulation_vector_list), function(i) { - simulation_vector <- simulation_vector_list[[i]] sample <- simulate_sample( data = data, diff --git a/tests/testthat/test_simulator.R b/tests/testthat/test_simulator.R index 41ff342..be14f20 100755 --- a/tests/testthat/test_simulator.R +++ b/tests/testthat/test_simulator.R @@ -48,15 +48,14 @@ test_that("test RNG", { seed <- 123 sim1 <- SimBu::simulate_bulk(data = dataset, scenario = "even", scaling_factor = "NONE", balance_even_mirror_scenario = 0, nsamples = 10, ncells = 100, run_parallel = FALSE, seed = seed) sim2 <- SimBu::simulate_bulk(data = dataset, scenario = "even", scaling_factor = "NONE", balance_even_mirror_scenario = 0, nsamples = 10, ncells = 100, run_parallel = FALSE, seed = seed) - x1 <- Matrix::rowSums(assays(sim1$bulk)[['bulk_counts']]) - x2 <- Matrix::rowSums(assays(sim2$bulk)[['bulk_counts']]) - testthat::expect_equal(x1,x2) - - # test that samples inside one simulation still are different - sample1 <- sim1$bulk[,1] - sample2 <- sim1$bulk[,2] - testthat::expect_false(all(assays(sample1)[['bulk_counts']] == assays(sample2)[['bulk_counts']])) + x1 <- Matrix::rowSums(assays(sim1$bulk)[["bulk_counts"]]) + x2 <- Matrix::rowSums(assays(sim2$bulk)[["bulk_counts"]]) + testthat::expect_equal(x1, x2) + # test that samples inside one simulation still are different + sample1 <- sim1$bulk[, 1] + sample2 <- sim1$bulk[, 2] + testthat::expect_false(all(assays(sample1)[["bulk_counts"]] == assays(sample2)[["bulk_counts"]])) }) test_that("test different scaling factor calculations + mRNA bias removal from counts", { From 8bcc0a5e190c180829c0b95f903e67bc85f8beeb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" Date: Wed, 27 Mar 2024 13:07:02 +0000 Subject: [PATCH 3/3] Roxygenize --- DESCRIPTION | 2 +- man/SimBu.Rd | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index d65f170..e2d1967 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -14,7 +14,7 @@ Description: SimBu can be used to simulate bulk RNA-seq datasets with known cell License: GPL-3 + file LICENSE Encoding: UTF-8 Roxygen: list(markdown = TRUE) -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.1 Imports: basilisk, BiocParallel, diff --git a/man/SimBu.Rd b/man/SimBu.Rd index 894b23e..2ebcbcf 100755 --- a/man/SimBu.Rd +++ b/man/SimBu.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/simulator.R \docType{package} \name{SimBu} +\alias{SimBu-package} \alias{SimBu} \title{SimBu: Bias-aware simulation of bulk RNA-seq data with variable cell type composition} \description{ @@ -31,3 +32,15 @@ adapt the cell type fractions in each sample by changing the scenario parameter. Inspect the cell type composition of your simulations with the plot_simulation() function. } +\seealso{ +Useful links: +\itemize{ + \item \url{https://github.com/omnideconv/SimBu} + \item Report bugs at \url{https://github.com/omnideconv/SimBu/issues} +} + +} +\author{ +\strong{Maintainer}: Alexander Dietrich \email{alex.dietrich@tum.de} + +}