Skip to content

Commit

Permalink
Update integration tests for hictk dump
Browse files Browse the repository at this point in the history
  • Loading branch information
robomics committed Dec 4, 2023
1 parent 9acf1a6 commit a1311ff
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion test/scripts/hictk_dump_trans.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit a1311ff

Please sign in to comment.