-
Notifications
You must be signed in to change notification settings - Fork 0
/
01-bbduk.sh
66 lines (51 loc) · 1.53 KB
/
01-bbduk.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
#!/bin/bash
###################################################
# #
# Perform bbduk filteration on raw reads #
# #
###################################################
cd /media/rna/INIA/benchmark/Raw_Data
##bbduk version 38.86
for i in * ;do
filename=$(echo ${i})
file=${filename}
sample=${file:7:20}
#Trimming of right end
bbduk\
in=./${file}/${sample}_R1.fastq.bz2\
in2=./${file}/${sample}_R2.fastq.bz2\
out=../Data_Filtered/${sample}_R1_trimR.fastq.bz2\
out2=../Data_Filtered/${sample}_R2_trimR.fastq.bz2\
ref=/home/rna/Downloads/bbmap/resources/adapters.fa
ktrim=r\
k=23\
mink=11\
hdist=1\
threads=11
#Trimming of left end
bbduk\
in=../Data_Filtered/${sample}_R1_trimR.fastq.bz2\
in2=../Data_Filtered/${sample}_R2_trimR.fastq.bz2\
out=../Data_Filtered/${sample}_R1_trimRL.fastq.bz2\
out2=../Data_Filtered/${sample}_R2_trimRL.fastq.bz2\
ref=/home/rna/Downloads/bbmap/resources/adapters.fa
ktrim=l\
k=23\
mink=11\
hdist=1\
threads=11
#Base Trimming, Quality filtiering, length filtering
bbduk\
in=../Data_Filtered/${sample}_R1_trimRL.fastq.bz2\
in2=../Data_Filtered/${sample}_R2_trimRL.fastq.bz2\
out=../Data_Filtered/${sample}_R1_qualtrim.fastq.bz2\
out2=../Data_Filtered/${sample}_R2_qualtrim.fastq.bz2\
qtrim=rl\
trimq=30\
minlen=35\
stats=../Data_Filtered/${sample}_stats_qualtrim.txt \
> ../Data_Filtered/${sample}_out_qualtrim.txt\
2> ../Data_Filtered/${sample}_err_qualtrim.txt\
threads=11;
done
exit