view CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/opt/mummer-3.23/exact-tandems @ 69:33d812a61356

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 17:55:14 -0400
parents
children
line wrap: on
line source
#! -f
#
# Find exact tandem repeats in specified file involving an
# exact duplicate of at least the specified length

set filename = $1
set matchlen = $2

set bindir = /mnt/c/Users/crash/Documents/BobLiterman/CSP2_Galaxy/CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/opt/mummer-3.23
set scriptdir = /mnt/c/Users/crash/Documents/BobLiterman/CSP2_Galaxy/CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/opt/mummer-3.23/scripts

if  ($filename == '' || $matchlen == '')  then
    echo "USAGE:  $0 <file> <min-match-len>"
    exit -1
endif

echo "Finding matches"
$bindir/repeat-match -t -n $matchlen $filename | tail +3 > $$.tmp.matches
if  ($status != 0)  exit -1

echo "Tandem repeats"
sort -k1n -k2n $$.tmp.matches | awk -f $scriptdir/tandem-repeat.awk
rm -f $$.tmp.matches