-
Notifications
You must be signed in to change notification settings - Fork 0
/
clustag.sh
executable file
·47 lines (38 loc) · 941 Bytes
/
clustag.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
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
# Wrapper script to run clustag tool
# Should be launched from the folder with maf/r2 files
help=$(cat << EOF
Usage: `basename $0` id
id: sample id
EOF
)
# Check input
[ -z $1 ] && { echo "Missing arguments... $help"; exit 1; }
# Initiate
id=$1
res="res.cfg"
declare -A tools
# Show input
echo "clustag"
echo "Sample: $id"
# Load resources
while IFS=',' read tool path; do
tools[${tool}]=${path}
done < $(dirname "$0")/${res}
# Create directory for output
[ ! -d out ] && mkdir out
[ ! -d temp ] && mkdir temp
# Run clustag
java -cp ${tools[clustag]}/TaggingsetChooser.jar:mail.jar \
-d64 -Xms512m -Xmx4g \
hk.hku.csis.biosphere.algorithm.TaggingSetChooser \
sim=hk.hku.csis.biosphere.similarityscore.SimilarityMatrix \
link=C \
threshold=0.8 \
data=${id}.data \
corr=${id}.r2 \
pos=${id}.maf \
result=out/${id}.txt \
map=out/${id}.html \
scale=1000 \
mem=out/${id}.members > out/${id}.out