annotate change_o/define_clones.sh @ 0:8a5a2abbb870 draft default tip

Uploaded
author davidvanzessen
date Mon, 29 Aug 2016 05:36:10 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
1 #!/bin/bash
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
2 dir="$(cd "$(dirname "$0")" && pwd)"
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
3
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
4 #define_clones.sh $input $noparse $scores $regions $out_file
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
5
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
6 type=$1
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
7 input=$2
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
8
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
9 mkdir -p $PWD/outdir
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
10
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
11 cp $input $PWD/input.tab #file has to have a ".tab" extension
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
12
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
13 if [ "bygroup" == "$type" ] ; then
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
14 mode=$3
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
15 act=$4
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
16 model=$5
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
17 norm=$6
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
18 sym=$7
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
19 link=$8
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
20 dist=$9
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
21 output=${10}
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
22 output2=${11}
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
23
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
24 python3 $dir/DefineClones.py bygroup -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
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
25 #/data/users/david/anaconda3/bin/python $dir/DefineClones.py bygroup -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
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
26 #/home/galaxy/anaconda3/bin/python $dir/DefineClones.py bygroup -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
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
27
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
28 Rscript $dir/define_clones.r $PWD/outdir/output_clone-pass.tab $output2 2>&1
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
29 else
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
30 method=$3
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
31 output=$4
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
32 output2=$5
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
33
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
34 python3 $dir/DefineClones.py hclust -d $PWD/input.tab --nproc 4 --outdir $PWD/outdir --outname output --method $method
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
35 #/data/users/david/anaconda3/bin/python $dir/DefineClones.py hclust -d $PWD/input.tab --nproc 4 --outdir $PWD/outdir --outname output --method $method
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
36 #/home/galaxy/anaconda3/bin/python $dir/DefineClones.py hclust -d $PWD/input.tab --nproc 4 --outdir $PWD/outdir --outname output --method $method
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
37
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
38 Rscript $dir/define_clones.r $PWD/outdir/output_clone-pass.tab $output2 2>&1
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
39 fi
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
40
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
41 cp $PWD/outdir/output_clone-pass.tab $output
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
42
8a5a2abbb870 Uploaded
davidvanzessen
parents:
diff changeset
43 rm -rf $PWD/outdir/