masscube 1.2.7__tar.gz → 1.2.8__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.7 → masscube-1.2.8}/PKG-INFO +1 -1
- {masscube-1.2.7 → masscube-1.2.8}/pyproject.toml +1 -1
- {masscube-1.2.7 → masscube-1.2.8}/src/masscube/alignment.py +5 -2
- {masscube-1.2.7 → masscube-1.2.8}/src/masscube/stats.py +2 -1
- {masscube-1.2.7 → masscube-1.2.8}/src/masscube/workflows.py +1 -1
- {masscube-1.2.7 → masscube-1.2.8}/src/masscube.egg-info/PKG-INFO +1 -1
- {masscube-1.2.7 → masscube-1.2.8}/LICENSE +0 -0
- {masscube-1.2.7 → masscube-1.2.8}/README.md +0 -0
- {masscube-1.2.7 → masscube-1.2.8}/setup.cfg +0 -0
- {masscube-1.2.7 → masscube-1.2.8}/src/masscube/__init__.py +0 -0
- {masscube-1.2.7 → masscube-1.2.8}/src/masscube/annotation.py +0 -0
- {masscube-1.2.7 → masscube-1.2.8}/src/masscube/classifier_builder.py +0 -0
- {masscube-1.2.7 → masscube-1.2.8}/src/masscube/feature_detection.py +0 -0
- {masscube-1.2.7 → masscube-1.2.8}/src/masscube/feature_evaluation.py +0 -0
- {masscube-1.2.7 → masscube-1.2.8}/src/masscube/feature_grouping.py +0 -0
- {masscube-1.2.7 → masscube-1.2.8}/src/masscube/mzpkl.py +0 -0
- {masscube-1.2.7 → masscube-1.2.8}/src/masscube/network.py +0 -0
- {masscube-1.2.7 → masscube-1.2.8}/src/masscube/normalization.py +0 -0
- {masscube-1.2.7 → masscube-1.2.8}/src/masscube/params.py +0 -0
- {masscube-1.2.7 → masscube-1.2.8}/src/masscube/raw_data_utils.py +0 -0
- {masscube-1.2.7 → masscube-1.2.8}/src/masscube/utils_functions.py +0 -0
- {masscube-1.2.7 → masscube-1.2.8}/src/masscube/visualization.py +0 -0
- {masscube-1.2.7 → masscube-1.2.8}/src/masscube.egg-info/SOURCES.txt +0 -0
- {masscube-1.2.7 → masscube-1.2.8}/src/masscube.egg-info/dependency_links.txt +0 -0
- {masscube-1.2.7 → masscube-1.2.8}/src/masscube.egg-info/entry_points.txt +0 -0
- {masscube-1.2.7 → masscube-1.2.8}/src/masscube.egg-info/requires.txt +0 -0
- {masscube-1.2.7 → masscube-1.2.8}/src/masscube.egg-info/top_level.txt +0 -0
|
@@ -412,13 +412,16 @@ def output_feature_to_msp(feature_table, output_path):
|
|
|
412
412
|
f.write("\n")
|
|
413
413
|
continue
|
|
414
414
|
|
|
415
|
-
if feature_table['annotation'][i] is None:
|
|
415
|
+
if feature_table['annotation'][i] is None or feature_table['annotation'][i] != feature_table['annotation'][i]:
|
|
416
416
|
name = "Unknown"
|
|
417
417
|
else:
|
|
418
418
|
name = str(feature_table['annotation'][i])
|
|
419
419
|
|
|
420
420
|
peaks = re.findall(r"\d+\.\d+", feature_table['MS2'][i])
|
|
421
|
-
|
|
421
|
+
try:
|
|
422
|
+
f.write("NAME: " + name + "\n")
|
|
423
|
+
except:
|
|
424
|
+
f.write("NAME: Unknown\n")
|
|
422
425
|
f.write("PRECURSORMZ: " + str(feature_table['m/z'][i]) + "\n")
|
|
423
426
|
f.write("PRECURSORTYPE: " + str(feature_table['adduct'][i]) + "\n")
|
|
424
427
|
f.write("RETENTIONTIME: " + str(feature_table['RT'][i]) + "\n")
|
|
@@ -194,7 +194,7 @@ def umap_analysis(feature_table, params):
|
|
|
194
194
|
df = df[(~df['is_qc']) & (~df['is_blank'])]
|
|
195
195
|
n = df.iloc[:, 0].values
|
|
196
196
|
data_arr = feature_table[n].values # samples in columns and features in rows
|
|
197
|
-
keys = [i for i in df.columns[1:] if i not in
|
|
197
|
+
keys = [i for i in df.columns[1:] if i not in PROJECT_KEYS]
|
|
198
198
|
|
|
199
199
|
# UMAP analysis
|
|
200
200
|
data_arr = data_arr.T
|
|
@@ -270,3 +270,4 @@ def generate_random_color(num):
|
|
|
270
270
|
|
|
271
271
|
|
|
272
272
|
COLORS = ["#FF5050", "#0078F0", "#00B050", "#FFC000", "#7030A0", "#FF00FF", "#00B0F0", "#FF0000", "#00FF00", "#0000FF"]
|
|
273
|
+
PROJECT_KEYS = ['is_qc', 'is_blank', 'analytical_order', 'time', 'ABSOLUTE_PATH', 'VALID', 'batch_id', 'SINGLE_FILE_PATH']
|
|
@@ -254,10 +254,10 @@ def untargeted_metabolomics_workflow(path=None, return_results=False, only_proce
|
|
|
254
254
|
output_feature_table(feature_table, output_path)
|
|
255
255
|
# output the acquired MS2 spectra to a MSP file (designed for MassWiki)
|
|
256
256
|
output_path = os.path.join(params.project_file_dir, "features.msp")
|
|
257
|
+
output_feature_to_msp(feature_table, output_path)
|
|
257
258
|
# output features as pickle file to the project directory
|
|
258
259
|
with open(os.path.join(params.project_file_dir, "aligned_features.pkl"), "wb") as f:
|
|
259
260
|
pickle.dump(features, f)
|
|
260
|
-
output_feature_to_msp(feature_table, output_path)
|
|
261
261
|
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
|
|
262
262
|
else:
|
|
263
263
|
print("Step 3: Feature alignment is skipped. Using the existing aligned feature table.")
|
|
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
|