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

devel branch to work for GHAs #52

Open
wants to merge 3 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions .github/workflows/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/[email protected]
with:
clean: false
Expand All @@ -50,7 +50,7 @@ jobs:

- name: Deploy to Netlify
uses: nwtgck/[email protected]
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 }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions R/simulator.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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,
Expand Down
13 changes: 13 additions & 0 deletions man/SimBu.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 7 additions & 8 deletions tests/testthat/test_simulator.R
Original file line number Diff line number Diff line change
Expand Up @@ -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", {
Expand Down
Loading