-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalign.sh
executable file
·62 lines (56 loc) · 1.2 KB
/
align.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/bash
excu="/home/ljw/new_fold/old_desktop/shoujia/Graph_Projects/GAP/build/GAP"
genome="/home/ljw/hg19_with_bowtie2_index/hg19.fa.True.True.True.True.concat"
msn=1
tz=24
cd "/home/ljw/new_fold/old_desktop/shoujia/test_time_loop3"
mr=5
for round in $(seq 0 $mr); do
rm -r tmp$round
done
rm -r tmplast
Ti=-5
dT=-5
for round in $(seq 0 $mr); do
mkdir tmp$round
cd tmp$round
if [ $round == 0 ]; then
read_file="../read_file.fa"
else
read_file="../tmp$(($round - 1))/fail"
fi
echo $read_file
if [ ! -s $read_file ]; then
break
fi
T=$(($Ti + $dT * $round))
$excu --threads_sz $tz --input $read_file --min_seg_num 1 --max_seg_num $msn --nodes node0,1,1 --longs $genome,node0,node0,,,,,$T
cd ..
done
mkdir tmplast
cd tmplast
read_file="../tmp$mr/fail"
echo $read_file
nodes=""
for i in $(seq 0 $msn); do
if [ $i == 0 ]; then
is_root=1
else
is_root=0
fi
if [ $i == $msn ]; then
is_target=1
else
is_target=0
fi
nodes=$nodes" node"$i","$is_root","$is_target
done
echo $nodes
longs=""
for i in $(seq 0 $(($msn-1))); do
longs=$longs" "$genome",node"$i",node"$(($i+1))",,,,,0"
done
echo $longs
if [ -s $read_file ]; then
$excu --threads_sz $tz --input $read_file --nodes $nodes --longs $longs
fi