-
Notifications
You must be signed in to change notification settings - Fork 0
/
PIPELINE.sh
executable file
·80 lines (38 loc) · 1.24 KB
/
PIPELINE.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash
#////////////////////////////////////////////////////////////
directory_rawdata="$1table.txt"
#$1 is the directory of the input folder
ls $1 > $directory_rawdata
readarray names < $directory_rawdata
nlen=${#names[@]}-1
for (( i=0; i<${nlen}; i++ ));
do
a=${names[$i]}
b=${a:0:$len-1}
dir2="$1$b/zztable"
echo $dir2
ls "$1$b" > $dir2
readarray names_f < $dir2
n1len=${#names_f[@]}-1
j=0
q="Rscript --vanilla Wrapper.R $1$b/${names_f[$j]} $1$b/${names_f[$j+1]} $2 $1$b/leftOver"
eval $q
done
#/////////////////////////////////////////////////////////////
for (( i=0; i<${nlen}; i++ ));
do
a=${names[$i]}
b=${a:0:$len-1}
dir2="$1$b/leftOver/zztable"
echo $dir2
ls "$1$b/leftOver" > $dir2
readarray names_c < $dir2
n1len=${#names_c[@]}-1
j=0
q="./interleave_fastq.sh $1$b/leftOver/${names_c[$j]} $1$b/leftOver/${names_c[$j+1]} > $1$b/leftOver/interleave"
eval $q
q="VelvetOptimiser.pl --d $1$b/leftOver/Results/assembly_result -s 25 -e 51 --k 'n50' --c 'tbp' --f '-fastq -shortPaired $1$b/leftOver/interleave' "
eval $q
q="Rscript LongContig.R $1$b/leftOver/Results/assembly_result/"
eval $q
done