annotate change_o/define_clones.sh @ 81:b6f9a640e098 draft

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