Skip to content

Commit c77d0ae

Browse files
committed
Restructure forming of mz groups for LC Metabref query
Fixes #182
1 parent b453b3d commit c77d0ae

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

corems/molecular_id/search/database_interfaces.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ def query_by_precursor(self, mz_list, polarity, mz_tol_ppm, mz_tol_da_api=0.2):
705705
mz_list.sort()
706706
mz_groups = [[mz_list[0]]]
707707
for x in mz_list[1:]:
708-
if abs(x - mz_groups[-1][-1]) <= mz_tol_da_api:
708+
if abs(x - mz_groups[-1][0]) <= mz_tol_da_api:
709709
mz_groups[-1].append(x)
710710
else:
711711
mz_groups.append([x])

0 commit comments

Comments
 (0)