annotate change_o/define_clones.sh @ 73:825c07055d73 draft

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