diff --git a/tests/assembly/allmaps.py/inputs/JM-2.chain b/tests/assembly/allmaps.py/inputs/JM-2.chain index 5203bd67..df693957 100644 --- a/tests/assembly/allmaps.py/inputs/JM-2.chain +++ b/tests/assembly/allmaps.py/inputs/JM-2.chain @@ -1,66 +1,66 @@ -chain 1000 scaffold_158 1026459 + 0 1026459 chr23 15272643 + 0 1026459 1 -1026459 - -chain 1000 scaffold_1006 98986 + 0 98986 chr23 15272643 + 1026559 1125545 2 -98986 +chain 1000 scaffold_821 137336 + 0 137336 chr23 15272643 + 0 137336 1 +137336 -chain 1000 scaffold_382 404603 + 0 404603 chr23 15272643 - 13742395 14146998 3 -404603 +chain 1000 scaffold_792 147429 + 0 147429 chr23 15272643 + 137436 284865 2 +147429 -chain 1000 scaffold_648 201681 + 0 201681 chr23 15272643 + 1530348 1732029 4 -201681 +chain 1000 scaffold_866 127595 + 0 127595 chr23 15272643 + 284965 412560 3 +127595 -chain 1000 scaffold_829 131171 + 0 131171 chr23 15272643 + 1732129 1863300 5 -131171 +chain 1000 scaffold_1189 71547 + 0 71547 chr23 15272643 - 14788436 14859983 4 +71547 -chain 1000 scaffold_642 203512 + 0 203512 chr23 15272643 + 1863400 2066912 6 -203512 +chain 1000 scaffold_375 406785 + 0 406785 chr23 15272643 - 14381551 14788336 5 +406785 -chain 1000 scaffold_513 263302 + 0 263302 chr23 15272643 + 2067012 2330314 7 -263302 +chain 1000 scaffold_310 502147 + 0 502147 chr23 15272643 - 13879304 14381451 6 +502147 -chain 1000 scaffold_331 470372 + 0 470372 chr23 15272643 + 2330414 2800786 8 -470372 +chain 1000 scaffold_95 1588924 + 0 1588924 chr23 15272643 + 1393439 2982363 7 +1588924 -chain 1000 scaffold_150 1083458 + 0 1083458 chr23 15272643 + 2800886 3884344 9 -1083458 +chain 1000 scaffold_148 1097854 + 0 1097854 chr23 15272643 - 11192326 12290180 8 +1097854 -chain 1000 scaffold_80 1825797 + 0 1825797 chr23 15272643 + 3884444 5710241 10 -1825797 +chain 1000 scaffold_225 700647 + 0 700647 chr23 15272643 + 4080417 4781064 9 +700647 -chain 1000 scaffold_43 2563023 + 0 2563023 chr23 15272643 + 5710341 8273364 11 -2563023 +chain 1000 scaffold_164 979419 + 0 979419 chr23 15272643 - 9512060 10491479 10 +979419 -chain 1000 scaffold_129 1238496 + 0 1238496 chr23 15272643 - 5760683 6999179 12 +chain 1000 scaffold_129 1238496 + 0 1238496 chr23 15272643 + 5760683 6999179 11 1238496 -chain 1000 scaffold_164 979419 + 0 979419 chr23 15272643 + 9512060 10491479 13 -979419 +chain 1000 scaffold_43 2563023 + 0 2563023 chr23 15272643 - 5710341 8273364 12 +2563023 -chain 1000 scaffold_225 700647 + 0 700647 chr23 15272643 + 10491579 11192226 14 -700647 +chain 1000 scaffold_80 1825797 + 0 1825797 chr23 15272643 - 3884444 5710241 13 +1825797 -chain 1000 scaffold_148 1097854 + 0 1097854 chr23 15272643 + 11192326 12290180 15 -1097854 +chain 1000 scaffold_150 1083458 + 0 1083458 chr23 15272643 - 2800886 3884344 14 +1083458 -chain 1000 scaffold_95 1588924 + 0 1588924 chr23 15272643 + 12290280 13879204 16 -1588924 +chain 1000 scaffold_331 470372 + 0 470372 chr23 15272643 + 12471857 12942229 15 +470372 -chain 1000 scaffold_310 502147 + 0 502147 chr23 15272643 + 13879304 14381451 17 -502147 +chain 1000 scaffold_642 203512 + 0 203512 chr23 15272643 + 12942329 13145841 16 +203512 -chain 1000 scaffold_375 406785 + 0 406785 chr23 15272643 + 14381551 14788336 18 -406785 +chain 1000 scaffold_829 131171 + 0 131171 chr23 15272643 - 1995531 2126702 17 +131171 -chain 1000 scaffold_792 147429 + 0 147429 chr23 15272643 + 14788436 14935865 19 -147429 +chain 1000 scaffold_513 263302 + 0 263302 chr23 15272643 - 1732129 1995431 18 +263302 -chain 1000 scaffold_1189 71547 + 0 71547 chr23 15272643 + 14935965 15007512 20 -71547 +chain 1000 scaffold_648 201681 + 0 201681 chr23 15272643 + 13540614 13742295 19 +201681 -chain 1000 scaffold_866 127595 + 0 127595 chr23 15272643 + 15007612 15135207 21 -127595 +chain 1000 scaffold_382 404603 + 0 404603 chr23 15272643 + 13742395 14146998 20 +404603 -chain 1000 scaffold_821 137336 + 0 137336 chr23 15272643 + 15135307 15272643 22 -137336 +chain 1000 scaffold_1006 98986 + 0 98986 chr23 15272643 + 14147098 14246084 21 +98986 + +chain 1000 scaffold_158 1026459 + 0 1026459 chr23 15272643 + 14246184 15272643 22 +1026459 diff --git a/tests/assembly/allmaps.py/inputs/scaffolds.fasta.gz b/tests/assembly/allmaps.py/inputs/scaffolds.fasta.gz new file mode 100644 index 00000000..1d0a069f Binary files /dev/null and b/tests/assembly/allmaps.py/inputs/scaffolds.fasta.gz differ diff --git a/tests/assembly/test_allmaps.py b/tests/assembly/test_allmaps.py index 9109f0f8..933372fb 100644 --- a/tests/assembly/test_allmaps.py +++ b/tests/assembly/test_allmaps.py @@ -1,5 +1,8 @@ import os.path as op +from jcvi.apps.base import cleanup +from jcvi.assembly.allmaps import path + def datafile(path: str) -> str: """Returns the path to a file in the designated test directory.""" @@ -29,3 +32,20 @@ def test_liftover(): liftover(chainfile, bedfile, liftedbedfile, unmapfile="unmapped", cstyle="l") compare_line_by_line(liftedbedfile, expected) cleanup(liftedbedfile, "unmapped") + + +def test_path(): + bedfile = datafile("inputs/JM-2.bed") + fastafile = datafile("inputs/scaffolds.fasta.gz") + weightsfile = datafile("inputs/weights.txt") + output_image = "chr23.pdf" + cleanup(output_image) + path( + [ + bedfile, + fastafile, + "-w", + weightsfile, + ] + ) + assert op.exists(output_image)