annotate change_o/define_clones.sh @ 96:385dea3c6cb5 draft

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