Skip to content

Commit 2ba791b

Browse files
committed
Fix mzml_portal for 'empty' scans
1 parent affa85c commit 2ba791b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dimspy/portals/mzml_portal.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ def peaklist(self, scan_id, function_noise="median"):
7171
for scan in self.run():
7272
if scan["id"] == scan_id:
7373

74-
mzs, ints = zip(*scan.peaks)
74+
if len(scan.peaks) > 0:
75+
mzs, ints = zip(*scan.peaks)
76+
else:
77+
mss, ints = [], []
7578

7679
scan_time = scan["MS:1000016"]
7780
tic = scan["total ion current"]

0 commit comments

Comments
 (0)