Skip to content

Commit 2a268df

Browse files
GenomicRegion: Fixing very old bug in parsing a 6 column BED file presented as a characer array
1 parent 9f22175 commit 2a268df

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

GenomicRegion.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,16 +264,14 @@ GenomicRegion::GenomicRegion(const char *s, const size_t len) {
264264
// score of the region (floating point)
265265
while (isspace(s[i]) && i < len) ++i;
266266
j = i;
267-
end = atoi(s + j);
268-
while (!isspace(s[i]) && i < len) ++i;
269267
score = atof(s + j);
268+
while (!isspace(s[i]) && i < len) ++i;
270269

271270
// strand
272271
while (isspace(s[i]) && i < len) ++i;
273272
j = i;
274-
end = atoi(s + j);
275-
while (!isspace(s[i]) && i < len) ++i;
276273
strand = *(s + j);
274+
while (!isspace(s[i]) && i < len) ++i;
277275

278276
// ADS: This is a hack!!!
279277
if (strand != '-') strand = '+';

0 commit comments

Comments
 (0)