-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: more merge helper/merge main testing
- Loading branch information
1 parent
028e9b8
commit bd12b68
Showing
4 changed files
with
106 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import pathlib | ||
|
||
TEST_BIN_DIR = pathlib.Path(__file__).parent / "bin" | ||
TEST_DATA_DIR = pathlib.Path(__file__).parent / "data" | ||
TEST_OUT_DIR = pathlib.Path(__file__).parent / "out" | ||
|
||
BIGWIG_TO_BEDGRAPH_BIN = TEST_BIN_DIR / "bigWigToBedGraph.linux.x86_64" | ||
BIGWIG_MERGE_PLUS_BIN = TEST_BIN_DIR / "bigWigMergePlus" | ||
|
||
INPUT_FILES = ( | ||
TEST_DATA_DIR / "25574.Blueprint.ERS487305.RNA-Seq.signal_reverse.bigWig", | ||
TEST_DATA_DIR / "25575.Blueprint.ERS487305.RNA-Seq.signal_forward.bigWig", | ||
TEST_DATA_DIR / "25582.Blueprint.ERS487306.RNA-Seq.signal_reverse.bigWig", | ||
) | ||
INPUT_FILES_STR = [*map(str, INPUT_FILES)] | ||
|
||
TEST_POS = "chr1:0-500000" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import pytest | ||
|
||
from bw_merge_window.entry import entry | ||
|
||
from . import shared_data as sd | ||
|
||
ALL_TEST_ARGS = ( | ||
(sd.TEST_POS, *sd.INPUT_FILES_STR), | ||
(sd.TEST_POS, *sd.INPUT_FILES_STR, "--range", "0-1000"), | ||
(sd.TEST_POS, *sd.INPUT_FILES_STR, "--treat-missing-as-zero"), | ||
(sd.TEST_POS, *sd.INPUT_FILES_STR, "--treat-missing-as-zero", "--range", "0-1000"), | ||
(sd.TEST_POS, *sd.INPUT_FILES_STR, "--treat-missing-as-zero", "--range=-500-1000"), | ||
(sd.TEST_POS, *sd.INPUT_FILES_STR, "--treat-missing-as-zero", "--range", "10-50"), | ||
# TODO: these should be tested, but it's too slow... | ||
# ("chr1", *sd.INPUT_FILES_STR, "--treat-missing-as-zero"), | ||
# ("chr1:0-", *sd.INPUT_FILES_STR, "--treat-missing-as-zero"), | ||
# ("chr1:5000-", *sd.INPUT_FILES_STR, "--treat-missing-as-zero"), | ||
) | ||
|
||
|
||
@pytest.mark.parametrize("args", ALL_TEST_ARGS) | ||
def test_merge_conditions(args): | ||
out_test = str(sd.TEST_OUT_DIR / "merged-test.bw") | ||
entry((*args, "--output", out_test)) |