Mercurial > repos > rliterman > csp2
diff CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/opt/mummer-3.23/scripts/tandem-repeat.awk @ 69:33d812a61356
planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author | jpayne |
---|---|
date | Tue, 18 Mar 2025 17:55:14 -0400 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/opt/mummer-3.23/scripts/tandem-repeat.awk Tue Mar 18 17:55:14 2025 -0400 @@ -0,0 +1,23 @@ +# Usage: awk -f tandem-repeat.awk +# Outputs tandem repeat regions based on repeat matches found +# by repeat-match program. That program should be run with +# the -t option (for tandem repeats) or at least the -f +# option (fo forward strand only), and the output +# sorted by first and then second column (with the first two +# header lines removed). + +BEGIN { + printf "%8s %8s %8s %10s\n", "Start", "Extent", "UnitLen", "Copies"; + } + + { + if ($1 + $3 < $2) + next; + if ($1 == prev) + next; + start = $1; + extent = $2 + $3 - $1; + unitlen = $2 - $1; + printf "%8d %8d %8d %10.1f\n", start, extent, unitlen, extent / unitlen; + prev = $1; + }