Quellcode durchsuchen

added test about feature tracks

lucananni93 vor 2 Jahren
Ursprung
Commit
c6005f09e8
1 geänderte Dateien mit 13 neuen und 0 gelöschten Zeilen
  1. 13 0
      tests/testthat/test-main.R

+ 13 - 0
tests/testthat/test-main.R

@@ -39,3 +39,16 @@ test_that("CALDER works with dumps", {
     unlink(output_path, recursive=TRUE)
 })
 
+test_that("CALDER works with custom feature track", {
+    input_cool_path <- file.path(testthat::test_path("data"), "test.cool")
+    feature_track_path <- file.path(testthat::test_path("data"), "test_gene_coverage.bed")
+    output_path <- testthat::test_path("test-main-featuretrack-out")
+
+    CMD = paste0(CALDER_CLI, " -i ", input_cool_path, " -t cool -g hg38 -o ", output_path, " -f ", feature_track_path)
+    system(CMD)
+
+    expect_snapshot_file(file.path(output_path, "sub_compartments", "all_sub_compartments.bed"), name = "TestFeatureTrack_all_sub_compartments.bed")
+    expect_snapshot_file(file.path(output_path, "sub_compartments", "all_sub_compartments.tsv"), name = "TestFeatureTrack_all_sub_compartments.tsv")
+    expect_snapshot_file(file.path(output_path, "sub_domains", "all_nested_boundaries.bed"), name = "TestFeatureTrack_all_nested_boundaries.bed")
+    unlink(output_path, recursive=TRUE)
+})