Skip to content

Commit d8ef1ab

Browse files
committed
[hotfix] remove logical error for correcting inferredpeptide
1 parent 01949a4 commit d8ef1ab

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/progistar/pXg/data/parser/pXgParser.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ public int compare (String s1, String s2) {
243243
ArrayList<Integer> ptmStarts = new ArrayList<Integer>();
244244
ArrayList<Integer> ptmEnds = new ArrayList<Integer>();
245245
while(matcher.find()) {
246-
ptmStarts.add(matcher.regionStart()); // inclusive
247-
ptmEnds.add(matcher.regionEnd()); // exclusive
246+
ptmStarts.add(matcher.start()); // inclusive
247+
ptmEnds.add(matcher.end()); // exclusive
248248
}
249249

250250

@@ -259,7 +259,7 @@ public int compare (String s1, String s2) {
259259
int s = ptmStarts.get(j);
260260
int e = ptmEnds.get(j);
261261

262-
if(i <= s && i < e) {
262+
if(s <= i && i < e) {
263263
isPTMSite = true;
264264
break;
265265
}
@@ -296,4 +296,5 @@ public int compare (String s1, String s2) {
296296
}
297297

298298
}
299+
299300
}

0 commit comments

Comments
 (0)