Skip to content

Commit

Permalink
Fix typo and add UUID to temporary chem dump names so that .mzMLs wit…
Browse files Browse the repository at this point in the history
…h the same basename but different dirname can be used
  • Loading branch information
mcbrider5002 committed Apr 23, 2024
1 parent b935151 commit a2a0b59
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion vimms/Evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def from_aligned_boxfile(cls, reader, aligned_file, min_box_ppm=None):
float(inner["RT end"]) * reader.RT_FACTOR,
float(inner["m/z min"]),
float(inner["m/z max"]),
round_digits=None)
round_digits=None
).apply_min_box_ppm(ywidth=min_box_ppm, round_digits=None)
)
else:
Expand Down
3 changes: 2 additions & 1 deletion vimms/Experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import inspect
import multiprocessing
import json
import uuid

from vimms.Common import POSITIVE, save_obj, load_obj
from vimms.Roi import RoiBuilderParams
Expand Down Expand Up @@ -304,7 +305,7 @@ def _gen_chems(fs, ionisation_mode, out_dir, point_noise_threshold, chem_noise_t
generated = cm.sample(None, 2, source_polarity=ionisation_mode)

basename = ".".join(os.path.basename(fs).split(".")[:-1])
ppath = os.path.join(out_dir, f"{basename}_temp.pkl")
ppath = os.path.join(out_dir, f"{basename}_temp_{uuid.uuid4()}.pkl")
ChemSet.dump_chems(generated, ppath)

return ppath
Expand Down

0 comments on commit a2a0b59

Please sign in to comment.