From a2a0b59165d710d94c430c36ce52b00dbeec870c Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 23 Apr 2024 07:17:57 +0100 Subject: [PATCH] Fix typo and add UUID to temporary chem dump names so that .mzMLs with the same basename but different dirname can be used --- vimms/Evaluation.py | 2 +- vimms/Experiment.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/vimms/Evaluation.py b/vimms/Evaluation.py index c5df766..249ea44 100644 --- a/vimms/Evaluation.py +++ b/vimms/Evaluation.py @@ -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: diff --git a/vimms/Experiment.py b/vimms/Experiment.py index 87de8db..4420d6a 100644 --- a/vimms/Experiment.py +++ b/vimms/Experiment.py @@ -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 @@ -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