masscube 1.2.2__tar.gz → 1.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {masscube-1.2.2 → masscube-1.2.3}/PKG-INFO +1 -1
- {masscube-1.2.2 → masscube-1.2.3}/pyproject.toml +1 -1
- {masscube-1.2.2 → masscube-1.2.3}/src/masscube/annotation.py +1 -1
- {masscube-1.2.2 → masscube-1.2.3}/src/masscube/params.py +20 -4
- {masscube-1.2.2 → masscube-1.2.3}/src/masscube.egg-info/PKG-INFO +1 -1
- {masscube-1.2.2 → masscube-1.2.3}/LICENSE +0 -0
- {masscube-1.2.2 → masscube-1.2.3}/README.md +0 -0
- {masscube-1.2.2 → masscube-1.2.3}/setup.cfg +0 -0
- {masscube-1.2.2 → masscube-1.2.3}/src/masscube/__init__.py +0 -0
- {masscube-1.2.2 → masscube-1.2.3}/src/masscube/alignment.py +0 -0
- {masscube-1.2.2 → masscube-1.2.3}/src/masscube/classifier_builder.py +0 -0
- {masscube-1.2.2 → masscube-1.2.3}/src/masscube/feature_detection.py +0 -0
- {masscube-1.2.2 → masscube-1.2.3}/src/masscube/feature_evaluation.py +0 -0
- {masscube-1.2.2 → masscube-1.2.3}/src/masscube/feature_grouping.py +0 -0
- {masscube-1.2.2 → masscube-1.2.3}/src/masscube/mzpkl.py +0 -0
- {masscube-1.2.2 → masscube-1.2.3}/src/masscube/network.py +0 -0
- {masscube-1.2.2 → masscube-1.2.3}/src/masscube/normalization.py +0 -0
- {masscube-1.2.2 → masscube-1.2.3}/src/masscube/raw_data_utils.py +0 -0
- {masscube-1.2.2 → masscube-1.2.3}/src/masscube/stats.py +0 -0
- {masscube-1.2.2 → masscube-1.2.3}/src/masscube/utils_functions.py +0 -0
- {masscube-1.2.2 → masscube-1.2.3}/src/masscube/visualization.py +0 -0
- {masscube-1.2.2 → masscube-1.2.3}/src/masscube/workflows.py +0 -0
- {masscube-1.2.2 → masscube-1.2.3}/src/masscube.egg-info/SOURCES.txt +0 -0
- {masscube-1.2.2 → masscube-1.2.3}/src/masscube.egg-info/dependency_links.txt +0 -0
- {masscube-1.2.2 → masscube-1.2.3}/src/masscube.egg-info/entry_points.txt +0 -0
- {masscube-1.2.2 → masscube-1.2.3}/src/masscube.egg-info/requires.txt +0 -0
- {masscube-1.2.2 → masscube-1.2.3}/src/masscube.egg-info/top_level.txt +0 -0
|
@@ -178,7 +178,7 @@ def load_ms2_db(path):
|
|
|
178
178
|
entropy_search = pickle.load(open(path, 'rb'))
|
|
179
179
|
print("\tMS2 database has been loaded.")
|
|
180
180
|
# check if intensity_weight is an attribute
|
|
181
|
-
if not hasattr(entropy_search, 'intensity_weight'):
|
|
181
|
+
if not hasattr(entropy_search.entropy_search, 'intensity_weight'):
|
|
182
182
|
raise ValueError("Please new MS/MS database is required for MassCube ver. 1.2 or later. Please download from: https://zenodo.org/records/14991522.")
|
|
183
183
|
return entropy_search
|
|
184
184
|
|
|
@@ -241,11 +241,11 @@ class Params:
|
|
|
241
241
|
# STEP 5: read the sample names and sample metadata from the sample table
|
|
242
242
|
if os.path.exists(os.path.join(self.project_dir, "sample_table.csv")):
|
|
243
243
|
self.read_sample_metadata(os.path.join(self.project_dir, "sample_table.csv"))
|
|
244
|
-
self.sample_names = list(self.sample_metadata.iloc[:, 0])
|
|
245
|
-
available_files = [f for f in os.listdir(self.sample_dir) if not f.startswith(".") and
|
|
246
|
-
(f.lower().endswith(".mzml") or f.lower().endswith(".mzxml"))]
|
|
247
244
|
# find the absolute paths of the raw MS data in order
|
|
248
|
-
self.sample_abs_paths =
|
|
245
|
+
self.sample_abs_paths, good_idx = _find_files_in_data_folder(self.sample_dir, list(self.sample_metadata.iloc[:, 0]))
|
|
246
|
+
self.sample_metadata = self.sample_metadata.iloc[good_idx, :]
|
|
247
|
+
self.sample_names = list(self.sample_metadata.iloc[:, 0])
|
|
248
|
+
|
|
249
249
|
# find the start time of the raw MS data
|
|
250
250
|
self.sample_metadata['time'] = [get_start_time(path) for path in self.sample_abs_paths]
|
|
251
251
|
self.sample_metadata['analytical_order'] = 0
|
|
@@ -376,6 +376,22 @@ def find_ms_info(file_name):
|
|
|
376
376
|
return ms_type, ion_mode, centroid
|
|
377
377
|
|
|
378
378
|
|
|
379
|
+
def _find_files_in_data_folder(folder_path, filenames):
|
|
380
|
+
found_files = []
|
|
381
|
+
|
|
382
|
+
# Get a set of all files in the folder (without extensions)
|
|
383
|
+
folder_files = {os.path.splitext(f)[0]: f for f in os.listdir(folder_path) if not f.startswith(".") and
|
|
384
|
+
(f.lower().endswith(".mzml") or f.lower().endswith(".mzxml"))}
|
|
385
|
+
|
|
386
|
+
good_idx = []
|
|
387
|
+
for i, name in enumerate(filenames):
|
|
388
|
+
if name in folder_files:
|
|
389
|
+
found_files.append(os.path.abspath(os.path.join(folder_path, folder_files[name])))
|
|
390
|
+
good_idx.append(i)
|
|
391
|
+
|
|
392
|
+
return found_files, good_idx
|
|
393
|
+
|
|
394
|
+
|
|
379
395
|
PARAMETER_RAGES = {
|
|
380
396
|
"mz_lower_limit": (0.0, 100000.0),
|
|
381
397
|
"mz_upper_limit": (0.0, 100000.0),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|