@@ -92,7 +92,10 @@ function load_fqs_threads!(
92
92
n_r2 = append_loop! (r2s, vr2s, tasks2; remove_first_n= n_remove_r2)
93
93
# @info "load_fqs_threads! StringChunk2FqRecord! - stop - R2"
94
94
95
- (n_r1 == 0 || n_r2 == 0 ) && throw (error (" Numbers of reads in R1 and R2 not the same!" ))
95
+ if n_r1 == n_r2 == 0 # input r1.fastq and r2.fastq are empty (no reads)
96
+ elseif n_r1 == 0 || n_r2 == 0
97
+ throw (error (" Numbers of reads in R1 and R2 not the same!" ))
98
+ end
96
99
97
100
return n_r1, n_r2, r1s, r2s, ncopyed
98
101
end
@@ -280,7 +283,10 @@ function load_fqs_threads!(
280
283
281
284
n_r2 = FqRecords. append_loop! (r2s, vr2s, tasks2; remove_first_n= n_remove_r2)
282
285
283
- (n_r1 == 0 || n_r2 == 0 ) && throw (error (" Numbers of reads in R1 and R2 not the same!" ))
286
+ if n_r1 == n_r2 == 0 # input r1.fastq and r2.fastq are empty (no reads)
287
+ elseif n_r1 == 0 || n_r2 == 0
288
+ throw (error (" Numbers of reads in R1 and R2 not the same!" ))
289
+ end
284
290
285
291
return n_r1, n_r2, r1s, r2s, in1bytes_nremain, in2bytes_nremain, ncopyed
286
292
end
@@ -446,6 +452,10 @@ Return (chunk_size1, chunk_size2):Tuple{Int,Int}
446
452
n_r1_read = n_r1 - n_r1_before
447
453
n_r2_read = n_r2 - n_r2_before
448
454
455
+ if n_r1_read == n_r2_read == 0 # input r1.fastq and r2.fastq are empty (no reads)
456
+ return length (in1bytes), length (in2bytes)
457
+ end
458
+
449
459
avg_length_r1 = length (in1bytes) / n_r1_read
450
460
avg_length_r2 = length (in2bytes) / n_r2_read
451
461
0 commit comments