-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcombine_dsSPD8b_fastq.pl
executable file
·46 lines (37 loc) · 1.09 KB
/
combine_dsSPD8b_fastq.pl
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
# A script to combine fastq files for dsSPD8b pair end reads in rhind data
# Initialize ouput file for single read data
open(OUT1, ">/home/borrmant/scratch/rhind/dsSPD8b_1.fastq");
# Cycle through fastq files
for $i(1..17) {
if($i < 10) {
open(IN1, "/home/borrmant/scratch/rhind/Fastq_files/DS_SPD8_NoIndex_L006_R1_00$i.fastq");
while($_ = <IN1>) {
print OUT1 $_;
}
} else {
open(IN1, "/home/borrmant/scratch/rhind/Fastq_files/DS_SPD8_NoIndex_L006_R1_0$i.fastq");
while($_ = <IN1>) {
print OUT1 $_;
}
}
close IN1;
}
close OUT1;
# Initialize ouput file for mate read data
open(OUT2, ">/home/borrmant/scratch/rhind/dsSPD8b_2.fastq");
# Cycle through fastq files
for $i(1..17) {
if($i < 10) {
open(IN2, "/home/borrmant/scratch/rhind/Fastq_files/DS_SPD8_NoIndex_L006_R2_00$i.fastq");
while($_ = <IN2>) {
print OUT2 $_;
}
} else {
open(IN2, "/home/borrmant/scratch/rhind/Fastq_files/DS_SPD8_NoIndex_L006_R2_0$i.fastq");
while($_ = <IN2>) {
print OUT2 $_;
}
}
close IN2;
}
close OUT2;