1#!/bin/sh -e
2
3##########################################################################
4#   Function description:
5#       Pause until user presses return
6##########################################################################
7
8pause()
9{
10    local junk
11
12    printf "Press return to continue..."
13    read junk
14}
15
16if [ $0 != ./small-test.sh ]; then
17    printf "Must be run as ./small-test.sh"
18    exit
19fi
20
21rm -f small-test-augmented*.bed small-test-overlaps.tsv
22cd ..
23make clean all
24cd Small-test
25
26printf "Viewing pruned GFF input...\n"
27pause
28awk '{ if ( $0 ~ "^#" ) print $0; else printf("%s\t%u\t%u\t%u\t%s(%s)\n",
29    $1, $4, $5, $5 - $4, $3, $7); }' small-test.gff3 | more
30
31printf "Running peak-classifier...\n"
32pause
33../peak-classifier small-test.bed small-test.gff3 small-test-overlaps.tsv
34
35printf "Viewing augmented GFF data...\n"
36pause
37more small-test-augmented.bed
38
39printf "Viewing sorted GFF data...\n"
40pause
41more small-test-augmented+sorted.bed
42
43printf "Viewing overlaps...\n"
44pause
45more small-test-overlaps.tsv
46
47printf "Filtering overlaps...\n"
48pause
49../filter-overlaps small-test-overlaps.tsv small-test-filtered.tsv intron exon
50more small-test-filtered.tsv
51