Skip to content

Commit f35705f

Browse files
committed
Fix bug where empty chimeric read causes entire read remainder to be output
1 parent 8b69ec4 commit f35705f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

flexiplex.c++

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ void print_read(string read_id, string read, string qual,
533533

534534
for (int f = 0; f < vec_size; f++) {
535535
int temp_read_length = vec_bc.at(f).flank_start - read_start;
536-
if (temp_read_length > 0 && temp_read_length < read_length)
536+
if (temp_read_length >= 0 && temp_read_length < read_length)
537537
read_length = temp_read_length;
538538
}
539539
string qual_new = ""; // don't trim the quality scores if it's a fasta file

tests/output.fastq

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ DABC
1414
AAA
1515
+GGGG_#seq5_+2of2 CB:Z:GGGG UB:Z:
1616
DAB
17-
@GGGG_#seq6_+1of1 CB:Z:GGGG UB:Z:
17+
@GGGG_#seq6_+2of2 CB:Z:GGGG UB:Z:
1818
C
19-
+GGGG_#seq6_+1of1 CB:Z:GGGG UB:Z:
19+
+GGGG_#seq6_+2of2 CB:Z:GGGG UB:Z:
2020
=
2121
@GGGG_#seq7_+1of2 CB:Z:GGGG UB:Z:
2222
A

0 commit comments

Comments
 (0)