0
|
1 #!/bin/bash
|
|
2 dir="$(cd "$(dirname "$0")" && pwd)"
|
|
3
|
|
4 #define_clones.sh $input $noparse $scores $regions $out_file
|
|
5
|
|
6 type=$1
|
|
7 input=$2
|
|
8
|
|
9 mkdir -p $PWD/outdir
|
|
10
|
|
11 cp $input $PWD/input.tab #file has to have a ".tab" extension
|
|
12
|
|
13 if [ "bygroup" == "$type" ] ; then
|
|
14 mode=$3
|
|
15 act=$4
|
|
16 model=$5
|
|
17 norm=$6
|
|
18 sym=$7
|
|
19 link=$8
|
|
20 dist=$9
|
|
21 output=${10}
|
|
22 output2=${11}
|
|
23
|
78
|
24 python3 $dir/DefineClones.py -d $PWD/input.tab --nproc 4 --outdir $PWD/outdir --outname output --mode $mode --act $act --model $model --dist $dist --norm $norm --sym $sym --link $link
|
0
|
25
|
|
26 Rscript $dir/define_clones.r $PWD/outdir/output_clone-pass.tab $output2 2>&1
|
|
27 else
|
|
28 method=$3
|
|
29 output=$4
|
|
30 output2=$5
|
|
31
|
78
|
32 python3 $dir/DefineClones.py hclust -d $PWD/input.tab --nproc 4 --outdir $PWD/outdir --outname output --method $method
|
0
|
33
|
|
34 Rscript $dir/define_clones.r $PWD/outdir/output_clone-pass.tab $output2 2>&1
|
|
35 fi
|
|
36
|
|
37 cp $PWD/outdir/output_clone-pass.tab $output
|
|
38
|
|
39 rm -rf $PWD/outdir/
|