-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdo_process_graphs.bash
More file actions
38 lines (32 loc) · 893 Bytes
/
do_process_graphs.bash
File metadata and controls
38 lines (32 loc) · 893 Bytes
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
35
36
37
NITER=10000000
SFREQ=1
mkdir -p output/process_graph
top_dir=`pwd`
for file in test/*.rooted.tre; do
filename=`echo $file | sed 's/^.*\///'`;
n=`echo $filename | grep -o '[0-9]-' | sed 's/-//'`;
echo $filename
dirname=`echo $filename | sed 's/\..*//'`;
dir=walks/random_walks/$n-taxa/$dirname
cd $dir
# todo: only do this once
if [ "0" = "1" ]; then
for run in run*; do
echo -en "$run\t..." 1>&2
cd $run
input_trees=${dirname}.${run}.t
input_likelihoods=${dirname}.${run}.p
grep '(' ${run}_${SFREQ}_${NITER}.t |
sed 's/^/tree /' > $input_trees
# todo: put in the real likelihoods
cat $input_trees | awk '{print $2" "$2" "$3}' > $input_likelihoods
cd ..
echo -e "done" 1>&2
done
fi
cd $top_dir
echo "#!/bin/sh
process_mrbayes_posteriors.bash $dir $dir 1.0 0;
process_graph.sh $dir 4096 -rooted" |
sbatch -t 7-0 -o output/process_graph/${dirname}
done