annotate change_o/define_clones.sh @ 4:5ffd52fc35c4 draft

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