File: exact-tandems.csh

package info (click to toggle)
mummer 3.23%2Bdfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 8,032 kB
  • sloc: cpp: 14,190; ansic: 7,537; perl: 4,176; makefile: 362; sh: 175; csh: 44; awk: 17
file content (23 lines) | stat: -rw-r--r-- 567 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!__CSH_PATH -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 = __BIN_DIR
set scriptdir = __SCRIPT_DIR

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