Skip to content

Commit

Permalink
Specific package to peakcombiner when loading data in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusMuck committed Jan 29, 2025
1 parent 4f3e11a commit b463f2c
Show file tree
Hide file tree
Showing 14 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions tests/testthat/test-center_expand_regions.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ output_colnames_post <- c(
"center", "sample_name", "input_names"
)
##
data(syn_data_bed)
data(syn_data_bed, package = "peakCombiner")
test_data <- syn_data_bed
##
test_data_prepared <- peakCombiner::prepare_input_regions(
Expand Down Expand Up @@ -217,13 +217,13 @@ test_that("Output data frame is correct for post-combined", {
test_that("Output data frame is correct for data_prepared", {
##
data <- test_data_prepared
result <- center_expand_regions(
result <- peakCombiner::center_expand_regions(
data = data,
center_by = "center_column",
expand_by = NULL
)
##
expect_no_error(center_expand_regions(
expect_no_error(peakCombiner::center_expand_regions(
data = data,
center_by = "center_column",
expand_by = NULL
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-combine_regions.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ output_colnames <- c(
)

#' Prepare test data set
data(syn_data_tibble)
data(syn_data_tibble, package = "peakCombiner")
test_data <- syn_data_tibble
test_data

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-cr_add_summit.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ output_colnames <- c(
"sample_name", "input_names"
)
##
data(syn_data_tibble)
data(syn_data_tibble, package = "peakCombiner")
test_data <- syn_data_tibble
##
test_data_prepared <- peakCombiner::prepare_input_regions(
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-cr_disjoin_filter.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ required_colnames <- c(
"chrom", "start", "end", "name", "score", "strand", "center", "sample_name"
)
##
data(syn_data_tibble)
data(syn_data_tibble, package = "peakCombiner")
test_data <- syn_data_tibble
input_colnames <- colnames(test_data)
##
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-cr_overlap_with_summits.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ output_colnames <- c(
"chrom", "start", "end", "width", "strand", "input_names"
)
##
data(syn_data_tibble)
data(syn_data_tibble, package = "peakCombiner")
test_data <- syn_data_tibble
input_colnames <- colnames(test_data)
##
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-cr_reduce.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ input_colnames <- c(
##
output_colnames <- c("chr", "start", "end", "width", "strand", "input_names")
##
data(syn_data_tibble)
data(syn_data_tibble, package = "peakCombiner")
test_data <- syn_data_tibble
##
test_data_prepared <- peakCombiner::prepare_input_regions(
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-define_expansion.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ required_colnames <- c(
##
test_expansion_value <- 350
##
data(syn_data_tibble)
data(syn_data_tibble, package = "peakCombiner")
test_data <- syn_data_tibble
input_colnames <- colnames(test_data)
##
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-filter_by_blacklist.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ required_colnames <- c(
"center", "sample_name"
)
##
data(syn_data_tibble)
data(syn_data_tibble, package = "peakCombiner")
test_data <- syn_data_tibble
input_colnames <- colnames(test_data)
##
Expand All @@ -31,7 +31,7 @@ test_data_filtered <- peakCombiner:::filter_by_chromosome_names(
##
input_colnames <- colnames(test_data_filtered)
##
data(blacklist_hg38)
data(blacklist_hg38, package = "peakCombiner")
blacklist <- blacklist_hg38
##
test_data_filtered_bl <- peakCombiner:::filter_by_blacklist(
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-filter_by_chromosome_names.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ required_colnames <- c(
"center", "sample_name"
)
##
data(syn_data_tibble)
data(syn_data_tibble, package = "peakCombiner")
test_data <- syn_data_tibble
input_colnames <- colnames(test_data)
##
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-filter_by_significance.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ required_colnames <- c(
"center", "sample_name"
)
##
data(syn_data_tibble)
data(syn_data_tibble, package = "peakCombiner")
test_data <- syn_data_tibble
input_colnames <- colnames(test_data)
##
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-filter_by_top_enriched.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ required_colnames <- c(
"center", "sample_name"
)
##
data(syn_data_tibble)
data(syn_data_tibble, package = "peakCombiner")
test_data <- syn_data_tibble
input_colnames <- colnames(test_data)
##
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-filter_regions.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ required_colnames <- c(
"center", "sample_name"
)
##
data(syn_data_tibble)
data(syn_data_tibble, package = "peakCombiner")
test_data <- syn_data_tibble

input_colnames <- colnames(test_data)
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-load_input_regions.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
##
set.seed(1234)
##
data(syn_data_tibble)
data(syn_data_tibble, package = "peakCombiner")
test_data <- syn_data_tibble
##
all_colnames <- c(
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-prepare_input_regions.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ colnames_preloaded_df <- c(

allowed_file_format <- c("narrowpeak", "broadpeak", "bed")

data(syn_data_bed)
data(syn_data_bed, package = "peakCombiner")
samplesheet_test <- syn_data_bed

test_sample_sheet <- peakCombiner::prepare_input_regions(
data = samplesheet_test[1, ]
)

data(syn_data_tibble)
data(syn_data_tibble, package = "peakCombiner")
test_data <- syn_data_tibble
input_colnames <- colnames(test_data)

Expand Down

0 comments on commit b463f2c

Please sign in to comment.