Skip to content
Jon Belyeu edited this page Nov 14, 2019 · 4 revisions

Run tests

Manual tests

Testing samplot is (should be) simple. Assuming you have the repository cloned locally, cd to the test/data/ directory and run the commands.sh script (you may choose to remove the existing test directories first to ensure that output is newly generated). You must have the hg19 human reference genome in bgzipped format to successfully run these tests, so the test script will download that reference. This may take some time, but will not be repeated if the reference remains in the test/data/ directory.

cd test/data/
rm -r test_imgs/
rm -r test_site/
bash commands.sh

This will re-create the directories where the example images are stored and re-plot those images, as well as re-generating the test site.

Get data

If you desire to re-download the entire test dataset from the Genome in a Bottle website, run the subset_alignments.sh script (in that same directory). This will take a subset of the alignments from many very large alignment files and will download the reference as a fasta file. Be aware that this may take quite a while.

bash subset_alignments.sh

Functional tests

The functional testing suite is even simpler to run. While in the /test/func/ directory, run bash samplot_test.sh.

Unit tests

The unit testing suite is also simple to run. While in the /test/unit/ directory, run python samplot_test.py.