From 5e508d19fb2927574229df09b64c3fbfc2b752eb Mon Sep 17 00:00:00 2001 From: Justin Bedo Date: Wed, 19 Dec 2018 16:46:19 +1100 Subject: examples: added example tumour-normal calling pipeline script --- examples/tnpair | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100755 examples/tnpair (limited to 'examples/tnpair') diff --git a/examples/tnpair b/examples/tnpair new file mode 100755 index 0000000..5b84d5c --- /dev/null +++ b/examples/tnpair @@ -0,0 +1,58 @@ +#!/bin/sh + +set -e + +if [[ $# -ne 5 ]] ; then + echo "Usage: $0 ref normal1 normal2 tumour1 tumour2" + exit 1 +fi + +function cleanup { + if [[ -e tnpair-$$ ]]; then + rm tnpair-$$ + fi +} +trap cleanup INT TERM EXIT + +ref=`readlink -f $1` +norm1=`readlink -f $2` +norm2=`readlink -f $3` +tumour1=`readlink -f $4` +tumour2=`readlink -f $5` + +refhash=`nix-hash --base32 --type sha256 --flat $ref` +norm1hash=`nix-hash --base32 --type sha256 --flat $norm1` +norm2hash=`nix-hash --base32 --type sha256 --flat $norm2` +tumour1hash=`nix-hash --base32 --type sha256 --flat $tumour1` +tumour2hash=`nix-hash --base32 --type sha256 --flat $tumour2` + +cat > tnpair-$$ <