-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathrcl-example.sh
executable file
·35 lines (24 loc) · 1.15 KB
/
rcl-example.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
set -euo pipefail
TAG=fox # everything will be made in a directory fox.
if [[ ! -f data/falkner.mci || ! -f data/falkner.tab ]]; then
echo "Please make a directory 'data' and copy graphs/falkner.mci and graphs/falkner.tab from the mcl source to data"
exit 0
fi
# Make mcl matrix IO silent
#
export MCLXIOVERBOSITY=2
# This generates many clusterings at different levels of granularity.
#
echo "1) Generating clusterings in $TAG"; sleep 1
rcl mcl $TAG -n data/falkner.mci -I "1.3 1.4 1.5 1.6 1.8 2.0 2.2 2.5 3.0 4.0"
echo "2) Setting up directory $TAG with network and tab files"; sleep 1
rcl setup $TAG -n data/falkner.mci -t data/falkner.tab
echo "3) Creating RCL matrix and single linkage tree"; sleep 1
# -F forces overwrite; useful for small example, otherwise not necessary.
rcl tree $TAG -F
echo "4) Creating resolution-based hierarchy"; sleep 1
rcl select $TAG -r "5 10 20 40 80"
echo "5) Use data labels in the resolution-based hierarchy"; sleep 1
rcldo.pl label $TAG/rcl.tab < $TAG/rcl.sy.5-10-20-40-80.txt > $TAG/rcl.sy.5-10-20-40-80.label
echo "-- hierarchical output with labels in $TAG/rcl.sy.5-10-20-40-80.label"