Skip to content

Commit 77e186c

Browse files
authored
Merge pull request #689 from CGATOxford/{IS}_dos_line_ends
Strip fastq lines, rather than explicitly removing last char.
2 parents 2c0cecf + d380e8d commit 77e186c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

umi_tools/umi_methods.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,19 +103,19 @@ def removeReadIDSuffix(line):
103103
break
104104
if not line1.startswith('@'):
105105
U.error("parsing error: expected '@' in line %s" % line1)
106-
line2 = convert2string(infile.readline())
107-
line3 = convert2string(infile.readline())
106+
line2 = convert2string(infile.readline()).rstrip()
107+
line3 = convert2string(infile.readline()).rstrip()
108108
if not line3.startswith('+'):
109109
U.error("parsing error: expected '+' in line %s" % line3)
110-
line4 = convert2string(infile.readline())
110+
line4 = convert2string(infile.readline()).rstrip()
111111
# incomplete entry
112112
if not line4:
113113
U.error("incomplete entry for %s" % line1)
114114

115115
if remove_suffix:
116116
line1 = removeReadIDSuffix(line1)
117117

118-
yield Record(line1[1:], line2[:-1], line4[:-1])
118+
yield Record(line1[1:], line2, line4)
119119

120120
# End of FastqIterate()
121121
###############################################################################

0 commit comments

Comments
 (0)