annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/opt/mummer-3.23/scripts/exact-tandems.csh @ 69:33d812a61356

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 17:55:14 -0400
parents
children
rev   line source
jpayne@69 1 #!__CSH_PATH -f
jpayne@69 2 #
jpayne@69 3 # Find exact tandem repeats in specified file involving an
jpayne@69 4 # exact duplicate of at least the specified length
jpayne@69 5
jpayne@69 6 set filename = $1
jpayne@69 7 set matchlen = $2
jpayne@69 8
jpayne@69 9 set bindir = __BIN_DIR
jpayne@69 10 set scriptdir = __SCRIPT_DIR
jpayne@69 11
jpayne@69 12 if ($filename == '' || $matchlen == '') then
jpayne@69 13 echo "USAGE: $0 <file> <min-match-len>"
jpayne@69 14 exit -1
jpayne@69 15 endif
jpayne@69 16
jpayne@69 17 echo "Finding matches"
jpayne@69 18 $bindir/repeat-match -t -n $matchlen $filename | tail +3 > $$.tmp.matches
jpayne@69 19 if ($status != 0) exit -1
jpayne@69 20
jpayne@69 21 echo "Tandem repeats"
jpayne@69 22 sort -k1n -k2n $$.tmp.matches | awk -f $scriptdir/tandem-repeat.awk
jpayne@69 23 rm -f $$.tmp.matches