Debian Codegraph @

snapper/eval/domap14.sh

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2 #$ -p -666
3 #$ -j y
4 #$ -o domap14.$TASK_ID.out
5 #$ -cwd
6 #$ -N snapper2test
7 #$ -A snapper2test
8
9 # gn -- pick one of 1 different genome sequences
10 # fg -- pick one of 8 different fragment sets
11 # ms -- fixed at 28
12 # mk -- pick one of 19 different mer skips
13 # ig -- pick one of 14 different mer thresholds
14 #
15 # input sequences are assumed to be in the workdirectory below, and all
16 # output ends up there.
17
18 workd=/project/huref0/assembly/chr14scip-shell filesystem . . `/project/huref0/assembly/chr14`.
19
20 decodeJobscip-shell shell shell-project 0.0.0 decodeJob().() {
21 nn=$1
22
23 xx=`exprscip-shell system . . expr. $nn % 1 + 1`
24 gn=`echoscip-shell system . . echo. chr14 | cutscip-shell system . . cut. -d' ' -f $xx`
25 nn=`exprscip-shell system . . expr. $nn /scip-shell filesystem . . `/`. 1`
26
27 xx=`exprscip-shell system . . expr. $nn % 8 + 1`
28 fg=`echoscip-shell system . . echo. f1 f2 f3 f4 f5 f6 f7 f8 | cutscip-shell system . . cut. -d' ' -f $xx`
29 nn=`exprscip-shell system . . expr. $nn /scip-shell filesystem . . `/`. 8`
30
31 xx=`exprscip-shell system . . expr. $nn % 1 + 1`
32 ms=`echoscip-shell system . . echo. 28 | cutscip-shell system . . cut. -d' ' -f $xx`
33 nn=`exprscip-shell system . . expr. $nn /scip-shell filesystem . . `/`. 1`
34
35 xx=`exprscip-shell system . . expr. $nn % 19 + 1`
36 mk=`echoscip-shell system . . echo. 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 | cutscip-shell system . . cut. -d' ' -f $xx`
37 nn=`exprscip-shell system . . expr. $nn /scip-shell filesystem . . `/`. 19`
38
39 xx=`exprscip-shell system . . expr. $nn % 14 + 1`
40 ig=`echoscip-shell system . . echo. 0000 0001 0002 0004 0008 0016 0032 0064 0128 0256 0512 1024 2048 4096 | cutscip-shell system . . cut. -d' ' -f $xx`
41 nn=`exprscip-shell system . . expr. $nn /scip-shell filesystem . . `/`. 14`
42
43 name=`echoscip-shell system . . echo. $gn.$fg.ms$ms.mk$mk.ig$ig`
44 }
45
46
47
48 if [scip-shell system . . `[`. x$1 = "xcheck" ] ; then
49 shift
50 mm=1
51 jj=`exprscip-shell system . . expr. 1 \* 8 \* 1 \* 19 \* 14`
52 echoscip-shell system . . echo. "Checking $jj jobs."
53 while [scip-shell system . . `[`. $mm -lt $jj ] ; do
54 decodeJobscip-shell shell shell-project 0.0.0 decodeJob(). $mm
55 if [scip-shell system . . `[`. ! -e $workd/$name.stats ] ; then
56 echoscip-shell system . . echo. qsub -t $mm domap14.sh
57 fi
58 mm=`exprscip-shell system . . expr. $mm + 1`
59 done
60 exit
61 fi
62
63
64
65 nn=`exprscip-shell system . . expr. $SGE_TASK_ID - 1`
66 decodeJobscip-shell shell shell-project 0.0.0 decodeJob(). $nn
67
68 if [scip-shell system . . `[`. ! -e $workd/$name.stats ] ; then
69 $workd/src/genomics/snapper/snapper2 \
70 -verbose \
71 -queries $workd/$fg.fasta \
72 -genomic $workd/$gn.fasta \
73 -mersize $ms \
74 -merskip $mk \
75 -ignore $ig \
76 -minmatchidentity 95 \
77 -minmatchcoverage 50 \
78 -numthreads 2 \
79 -noaligns \
80 -output /scratch/$name.sim4db \
81 -validate /scratch/$name.validate \
82 -stats /scratch/$name.stats \
83 && \
84 bzip2 -9v /scratch/$name.sim4db \
85 && \
86 mv /scratch/$name.sim4db.bz2 $workd/$name.sim4db.bz2 \
87 && \
88 mv /scratch/$name.validate $workd/$name.validate \
89 && \
90 mv /scratch/$name.stats $workd/$name.stats
91 fi