From a1311ff02af587c680e6cb3ff06f97b75b99f7be Mon Sep 17 00:00:00 2001 From: Roberto Rossini <71787608+robomics@users.noreply.github.com> Date: Mon, 4 Dec 2023 16:16:17 +0100 Subject: [PATCH] Update integration tests for hictk dump --- test/scripts/hictk_dump_trans.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/test/scripts/hictk_dump_trans.sh b/test/scripts/hictk_dump_trans.sh index 33842c3f..40706f12 100755 --- a/test/scripts/hictk_dump_trans.sh +++ b/test/scripts/hictk_dump_trans.sh @@ -102,7 +102,7 @@ if ! compare_files "$outdir/expected.pixels" "$outdir/out.hic9.pixels"; then status=1 fi -# Test --trans-only matrix +# Test --trans-only matrix (sorted) cooler dump --join "$ref_cooler::/resolutions/100000" | awk -F '\t' '$1!=$4' | tee "$outdir/expected.pixels" > /dev/null "$hictk_bin" dump --join "$ref_cooler::/resolutions/100000" --trans-only | tee "$outdir/out.cooler.pixels" > /dev/null "$hictk_bin" dump --join --resolution 100000 "$ref_hic8" --trans-only | tee "$outdir/out.hic8.pixels" > /dev/null @@ -120,6 +120,23 @@ if ! compare_files "$outdir/expected.pixels" "$outdir/out.hic9.pixels"; then status=1 fi +# Test --trans-only matrix (unsorted) +"$hictk_bin" dump --join "$ref_cooler::/resolutions/100000" --trans-only --unsorted | sort -V | tee "$outdir/out.cooler.pixels" > /dev/null +"$hictk_bin" dump --join --resolution 100000 "$ref_hic8" --trans-only --unsorted | sort -V | tee "$outdir/out.hic8.pixels" > /dev/null +"$hictk_bin" dump --join --resolution 100000 "$ref_hic9" --trans-only --unsorted | sort -V | tee "$outdir/out.hic9.pixels" > /dev/null + +if ! compare_files "$outdir/expected.pixels" "$outdir/out.cooler.pixels"; then + status=1 +fi + +if ! compare_files "$outdir/expected.pixels" "$outdir/out.hic8.pixels"; then + status=1 +fi + +if ! compare_files "$outdir/expected.pixels" "$outdir/out.hic9.pixels"; then + status=1 +fi + if [ "$status" -eq 0 ]; then printf '\n### PASS ###\n' else