annotate define_clones.sh @ 0:183edf446dcf draft default tip

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