Skip to content

Commit 2f552fe

Browse files
nienkevanunenRJMW
authored andcommitted
Add fix for the scenario where a filelist and single ms file is provided (#44)
1 parent 4a9f594 commit 2f552fe

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

dimspy/portals/paths.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ def check_paths(tsv, source):
9999
elif h5py.is_hdf5(source):
100100
peaklists = hdf5_portal.load_peaklists_from_hdf5(source)
101101
filenames = [pl.ID for pl in peaklists]
102+
elif os.path.isfile(source):
103+
if source.lower().endswith(".raw") or source.lower().endswith(".mzml"):
104+
filenames.append(source)
105+
else:
106+
raise IOError("Incorrect file format, provide .mzml or .raw files: {}".format(source))
102107
else:
103108
raise IOError("[Errno 2] No such file or directory: {} or {}".format(source, tsv))
104109
else:

0 commit comments

Comments
 (0)