masscube 1.2.4__tar.gz → 1.2.5__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.
Files changed (27) hide show
  1. {masscube-1.2.4 → masscube-1.2.5}/PKG-INFO +14 -2
  2. {masscube-1.2.4 → masscube-1.2.5}/pyproject.toml +2 -2
  3. {masscube-1.2.4 → masscube-1.2.5}/src/masscube/annotation.py +11 -7
  4. {masscube-1.2.4 → masscube-1.2.5}/src/masscube/network.py +0 -1
  5. {masscube-1.2.4 → masscube-1.2.5}/src/masscube/raw_data_utils.py +27 -22
  6. {masscube-1.2.4 → masscube-1.2.5}/src/masscube/stats.py +3 -1
  7. {masscube-1.2.4 → masscube-1.2.5}/src/masscube/visualization.py +38 -31
  8. {masscube-1.2.4 → masscube-1.2.5}/src/masscube.egg-info/PKG-INFO +14 -2
  9. {masscube-1.2.4 → masscube-1.2.5}/LICENSE +0 -0
  10. {masscube-1.2.4 → masscube-1.2.5}/README.md +0 -0
  11. {masscube-1.2.4 → masscube-1.2.5}/setup.cfg +0 -0
  12. {masscube-1.2.4 → masscube-1.2.5}/src/masscube/__init__.py +0 -0
  13. {masscube-1.2.4 → masscube-1.2.5}/src/masscube/alignment.py +0 -0
  14. {masscube-1.2.4 → masscube-1.2.5}/src/masscube/classifier_builder.py +0 -0
  15. {masscube-1.2.4 → masscube-1.2.5}/src/masscube/feature_detection.py +0 -0
  16. {masscube-1.2.4 → masscube-1.2.5}/src/masscube/feature_evaluation.py +0 -0
  17. {masscube-1.2.4 → masscube-1.2.5}/src/masscube/feature_grouping.py +0 -0
  18. {masscube-1.2.4 → masscube-1.2.5}/src/masscube/mzpkl.py +0 -0
  19. {masscube-1.2.4 → masscube-1.2.5}/src/masscube/normalization.py +0 -0
  20. {masscube-1.2.4 → masscube-1.2.5}/src/masscube/params.py +0 -0
  21. {masscube-1.2.4 → masscube-1.2.5}/src/masscube/utils_functions.py +0 -0
  22. {masscube-1.2.4 → masscube-1.2.5}/src/masscube/workflows.py +0 -0
  23. {masscube-1.2.4 → masscube-1.2.5}/src/masscube.egg-info/SOURCES.txt +0 -0
  24. {masscube-1.2.4 → masscube-1.2.5}/src/masscube.egg-info/dependency_links.txt +0 -0
  25. {masscube-1.2.4 → masscube-1.2.5}/src/masscube.egg-info/entry_points.txt +0 -0
  26. {masscube-1.2.4 → masscube-1.2.5}/src/masscube.egg-info/requires.txt +0 -0
  27. {masscube-1.2.4 → masscube-1.2.5}/src/masscube.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: masscube
3
- Version: 1.2.4
3
+ Version: 1.2.5
4
4
  Summary: Accurate and fast data processing for metabolomics
5
5
  Author-email: Huaxu Yu <yhxchem@outlook.com>
6
6
  Maintainer-email: Huaxu Yu <yhxchem@outlook.com>
@@ -12,6 +12,18 @@ Classifier: Operating System :: OS Independent
12
12
  Requires-Python: >=3.8
13
13
  Description-Content-Type: text/markdown
14
14
  License-File: LICENSE
15
+ Requires-Dist: numpy>=1.24
16
+ Requires-Dist: pandas>=2.2.1
17
+ Requires-Dist: pyteomics==4.6.3
18
+ Requires-Dist: scipy>=1.10.1
19
+ Requires-Dist: tqdm>=4.66.1
20
+ Requires-Dist: lxml>=4.9.3
21
+ Requires-Dist: matplotlib>=3.8.2
22
+ Requires-Dist: ms_entropy==1.3.4
23
+ Requires-Dist: scikit-learn>=1.3.2
24
+ Requires-Dist: statsmodels>=0.14.2
25
+ Requires-Dist: umap-learn>=0.5.7
26
+ Dynamic: license-file
15
27
 
16
28
  # MassCube
17
29
 
@@ -1,10 +1,10 @@
1
1
  [build-system]
2
- requires = ["setuptools<66", "wheel"]
2
+ requires = ["setuptools>=66.1.0"]
3
3
  build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "masscube"
7
- version = "1.2.4"
7
+ version = "1.2.5"
8
8
  authors = [
9
9
  { name="Huaxu Yu", email="yhxchem@outlook.com" },
10
10
  ]
@@ -40,6 +40,7 @@ Within each block, key is defined as:
40
40
  - INCHIKEY: the InChIKey
41
41
  - INSTRUMENTTYPE: the instrument type
42
42
  - COLLISIONENERGY: the collision energy
43
+ - DATABASE: the database name
43
44
  - COMMENT: the comment
44
45
  - Num Peaks: the number of peaks
45
46
  - [mz1 intensity1]: the m/z and intensity of each fragment
@@ -59,6 +60,7 @@ Example:
59
60
  INCHIKEY: COLNVLDHVKWLRT-QMMMGPOBSA-N
60
61
  INSTRUMENTTYPE: LC-ESI-QFT
61
62
  COLLISIONENERGY: 35.0 eV
63
+ DATABASE: EMBL-MCF_spec98214
62
64
  COMMENT: DB#=EMBL-MCF_spec98214; origin=EMBL - Metabolomics Core Facility Spectral Library
63
65
  Num Peaks: 7
64
66
  103.054 15
@@ -69,7 +71,7 @@ Example:
69
71
  149.059 16
70
72
  166.086 56
71
73
 
72
- 3. json format
74
+ 3. a list of dictionaries (or json format)
73
75
 
74
76
  A list of dictionaries, each dictionary contains the following keys:
75
77
 
@@ -84,10 +86,11 @@ A list of dictionaries, each dictionary contains the following keys:
84
86
  "ontology": the ontology of the compound
85
87
  "smiles": the SMILES string
86
88
  "inchikey": the InChIKey
87
- "instrumenttype": the instrument type
88
- "collisionenergy": the collision energy
89
+ "instrument_type": the instrument type
90
+ "collision_energy": the collision energy
91
+ "database": the database name
89
92
  "comment": the comment
90
- "num peaks": the number of peaks
93
+ "num_peaks": the number of peaks
91
94
  "peaks": a list of lists, each sublist contains two elements: m/z and intensity: [[mz1, intensity1], [mz2, intensity2], ...]
92
95
  }
93
96
 
@@ -103,10 +106,11 @@ Example:
103
106
  "ontology": "Phenylalanine and derivatives",
104
107
  "smiles": "C1=CC=C(C=C1)C[C@@H](C(=O)O)N",
105
108
  "inchikey": "COLNVLDHVKWLRT-QMMMGPOBSA-N",
106
- "instrumenttype": "LC-ESI-QFT",
107
- "collisionenergy": "35.0 eV",
109
+ "instrument_type": "LC-ESI-QFT",
110
+ "collision_energy": "35.0 eV",
111
+ "database": "EMBL-MCF_spec98214"
108
112
  "comment": "DB#=EMBL-MCF_spec98214; origin=EMBL - Metabolomics Core Facility Spectral Library",
109
- "num peaks": "7",
113
+ "num_peaks": "7",
110
114
  "peaks": [["103.054", "15"], ["107.049", "14"], ["120.081", "1000"], ["121.084", "16"], ["131.049", "41"], ["149.059", "16"], ["166.086", "56"]],
111
115
  }
112
116
 
@@ -84,7 +84,6 @@ def network_analysis(feature_list, annotation_type="hybrid_and_identity", featur
84
84
  # hide outer frame
85
85
  plt.box(False)
86
86
  plt.rcParams['font.size'] = 12
87
- plt.rcParams['font.family'] = 'Arial'
88
87
  # add legend with arial font
89
88
  plt.legend(handles=[plt.Line2D([0], [0], color="#BC6C25", marker="o", lw=0, markersize=7, label="Identity", markeredgewidth=0.5, markeredgecolor="black", alpha=0.5),
90
89
  plt.Line2D([0], [0], color="#FEFAE0", marker="o", lw=0, markersize=7, label="Hybrid", markeredgewidth=0.5, markeredgecolor="black", alpha=0.5),
@@ -5,9 +5,10 @@
5
5
  # imports
6
6
  from pyteomics import mzml, mzxml
7
7
  import numpy as np
8
+ import pandas as pd
8
9
  import os
9
10
  import matplotlib.pyplot as plt
10
- import pandas as pd
11
+ import matplotlib.font_manager as fm
11
12
 
12
13
  from .params import Params, find_ms_info
13
14
  from .feature_detection import detect_features, segment_feature
@@ -382,11 +383,12 @@ class MSData:
382
383
 
383
384
  plt.figure(figsize=(10, 3))
384
385
  plt.rcParams['font.size'] = 14
385
- plt.rcParams['font.family'] = 'Arial'
386
- plt.xlabel("Retention Time (min)", fontsize=18, fontname='Arial')
387
- plt.ylabel("Intensity", fontsize=18, fontname='Arial')
388
- plt.xticks(fontsize=14, fontname='Arial')
389
- plt.yticks(fontsize=14, fontname='Arial')
386
+ if 'Arial' in [f.name for f in fm.fontManager.ttflist]:
387
+ plt.rcParams['font.family'] = 'Arial'
388
+ plt.xlabel("Retention Time (min)", fontsize=18)
389
+ plt.ylabel("Intensity", fontsize=18)
390
+ plt.xticks(fontsize=14)
391
+ plt.yticks(fontsize=14)
390
392
 
391
393
  if time_range is None:
392
394
  plt.plot(self.ms1_time_arr, self.base_peak_arr[:, 1], linewidth=1, color="black")
@@ -395,7 +397,7 @@ class MSData:
395
397
  plt.plot(self.ms1_time_arr[v], self.base_peak_arr[v, 1], linewidth=1, color="black")
396
398
 
397
399
  if label_name:
398
- plt.text(self.ms1_time_arr[0], np.max(self.base_peak_arr[:,1])*0.9, self.params.file_name, fontsize=12, fontname='Arial', color="gray")
400
+ plt.text(self.ms1_time_arr[0], np.max(self.base_peak_arr[:,1])*0.9, self.params.file_name, fontsize=12, color="gray")
399
401
 
400
402
  if output_dir is not None:
401
403
  plt.savefig(output_dir, dpi=300, bbox_inches="tight")
@@ -540,9 +542,10 @@ class MSData:
540
542
 
541
543
  plt.figure(figsize=(10, 3))
542
544
  plt.rcParams['font.size'] = 14
543
- plt.rcParams['font.family'] = 'Arial'
544
- plt.xlabel("Retention Time (min)", fontsize=18, fontname='Arial')
545
- plt.ylabel("Intensity", fontsize=18, fontname='Arial')
545
+ if 'Arial' in [f.name for f in fm.fontManager.ttflist]:
546
+ plt.rcParams['font.family'] = 'Arial'
547
+ plt.xlabel("Retention Time (min)", fontsize=18)
548
+ plt.ylabel("Intensity", fontsize=18)
546
549
 
547
550
  if ylim is not None:
548
551
  plt.ylim(ylim[0], ylim[1])
@@ -700,13 +703,14 @@ class MSData:
700
703
 
701
704
  plt.figure(figsize=(7, 3))
702
705
  plt.rcParams['font.size'] = 14
703
- plt.rcParams['font.family'] = 'Arial'
706
+ if 'Arial' in [f.name for f in fm.fontManager.ttflist]:
707
+ plt.rcParams['font.family'] = 'Arial'
704
708
  plt.plot(eic_rt, eic_int, linewidth=1, color="black")
705
709
  plt.fill_between(eic_rt[idx_start:idx_end], eic_int[idx_start:idx_end], color="black", alpha=0.4)
706
- plt.xlabel("Retention Time (min)", fontsize=18, fontname='Arial')
707
- plt.ylabel("Intensity", fontsize=18, fontname='Arial')
708
- plt.xticks(fontsize=14, fontname='Arial')
709
- plt.yticks(fontsize=14, fontname='Arial')
710
+ plt.xlabel("Retention Time (min)", fontsize=18)
711
+ plt.ylabel("Intensity", fontsize=18)
712
+ plt.xticks(fontsize=14)
713
+ plt.yticks(fontsize=14)
710
714
 
711
715
  if output:
712
716
  plt.savefig(output, dpi=300, bbox_inches="tight")
@@ -830,20 +834,21 @@ class Scan:
830
834
  # plot the scan
831
835
  plt.figure(figsize=(10, 3))
832
836
  plt.rcParams['font.size'] = 14
833
- plt.rcParams['font.family'] = 'Arial'
837
+ if 'Arial' in [f.name for f in fm.fontManager.ttflist]:
838
+ plt.rcParams['font.family'] = 'Arial'
834
839
  plt.ylim(0, max_int*1.2)
835
840
  plt.xlim(mz_range[0], mz_range[1])
836
841
  plt.vlines(x = signals[:,0], ymin = 0, ymax = signals[:,1], color="black", linewidth=1.5)
837
842
  plt.hlines(y = 0, xmin = mz_range[0], xmax = mz_range[1], color="black", linewidth=1.5)
838
- plt.xlabel("m/z, Dalton", fontsize=18, fontname='Arial')
839
- plt.ylabel("Intensity", fontsize=18, fontname='Arial')
840
- plt.xticks(fontsize=14, fontname='Arial')
841
- plt.yticks(fontsize=14, fontname='Arial')
843
+ plt.xlabel("m/z, Dalton", fontsize=18)
844
+ plt.ylabel("Intensity", fontsize=18)
845
+ plt.xticks(fontsize=14)
846
+ plt.yticks(fontsize=14)
842
847
  plt.text(mz_range[0]+(mz_range[1]-mz_range[0])*0.4, max_int*1.1,
843
- "Time = {:.3f} min".format(self.time), fontsize=11, fontname='Arial')
848
+ "Time = {:.3f} min".format(self.time), fontsize=11)
844
849
  if self.level == 2:
845
850
  plt.text(mz_range[0]+(mz_range[1]-mz_range[0])*0.05, max_int*1.1,
846
- "Precursor m/z = {:.4f}".format(self.precursor_mz), fontsize=11, fontname='Arial')
851
+ "Precursor m/z = {:.4f}".format(self.precursor_mz), fontsize=11)
847
852
  plt.show()
848
853
 
849
854
  if return_data:
@@ -11,6 +11,7 @@ from sklearn.decomposition import PCA
11
11
  from umap import UMAP
12
12
  from sklearn.preprocessing import StandardScaler
13
13
  import matplotlib.pyplot as plt
14
+ import matplotlib.font_manager as fm
14
15
  import random
15
16
 
16
17
  from .visualization import plot_pca
@@ -218,7 +219,8 @@ def umap_analysis(feature_table, params):
218
219
  # plot the UMAP
219
220
  plt.figure(figsize=(10, 10))
220
221
  plt.rcParams['font.size'] = 20
221
- plt.rcParams['font.family'] = 'Arial'
222
+ if 'Arial' in [f.name for f in fm.fontManager.ttflist]:
223
+ plt.rcParams['font.family'] = 'Arial'
222
224
  # remove frame, x and y axis
223
225
  plt.box(False)
224
226
  plt.xticks([])
@@ -13,6 +13,7 @@ import matplotlib.pyplot as plt
13
13
  import matplotlib.colors as mcolors
14
14
  import matplotlib.transforms as transforms
15
15
  from matplotlib.patches import Ellipse
16
+ import matplotlib.font_manager as fm
16
17
 
17
18
  from .annotation import extract_signals_from_string
18
19
 
@@ -41,14 +42,16 @@ def plot_bpcs(data_list=None, autocolor=False, show_legend=True, output_path=Non
41
42
 
42
43
  plt.figure(figsize=(10, 4))
43
44
  plt.rcParams['font.size'] = 14
44
- plt.rcParams['font.family'] = 'Arial'
45
+ # check if arial font is available
46
+ if 'Arial' in [f.name for f in fm.fontManager.ttflist]:
47
+ plt.rcParams['font.family'] = 'Arial'
45
48
 
46
49
  for i, d in enumerate(data_list):
47
50
  plt.plot(d.ms1_rt_seq, d.bpc_int, color=color_list[i], linewidth=0.5)
48
- plt.xlabel("Retention Time (min)", fontsize=18, fontname='Arial')
49
- plt.ylabel("Intensity", fontsize=18, fontname='Arial')
50
- plt.xticks(fontsize=14, fontname='Arial')
51
- plt.yticks(fontsize=14, fontname='Arial')
51
+ plt.xlabel("Retention Time (min)", fontsize=18)
52
+ plt.ylabel("Intensity", fontsize=18)
53
+ plt.xticks(fontsize=14)
54
+ plt.yticks(fontsize=14)
52
55
 
53
56
  if show_legend:
54
57
  plt.legend([d.params.file_name for d in data_list], fontsize=10)
@@ -100,7 +103,8 @@ def plot_feature(d, feature, mz_tol=0.005, rt_tol=0.3, rt_range=None, output=Fal
100
103
 
101
104
  plt.figure(figsize=(9, 3))
102
105
  plt.rcParams['font.size'] = 14
103
- plt.rcParams['font.family'] = 'Arial'
106
+ if 'Arial' in [f.name for f in fm.fontManager.ttflist]:
107
+ plt.rcParams['font.family'] = 'Arial'
104
108
  plt.plot(eic_rt, eic_int, linewidth=0.5, color="black")
105
109
  plt.ylim(0, max_int*1.2)
106
110
 
@@ -113,13 +117,13 @@ def plot_feature(d, feature, mz_tol=0.005, rt_tol=0.3, rt_range=None, output=Fal
113
117
  # label the left and right of the feature
114
118
  plt.axvline(x = feature.rt_seq[0], color = 'black', linestyle = '--', linewidth=0.5, ymax=0.8)
115
119
  plt.axvline(x = feature.rt_seq[-1], color = 'black', linestyle = '--', linewidth=0.5, ymax=0.8)
116
- plt.xlabel("Retention Time (min)", fontsize=18, fontname='Arial')
117
- plt.ylabel("Intensity", fontsize=18, fontname='Arial')
118
- plt.text(eic_rt[0], max_int*1.1, "m/z = {:.4f}".format(feature.mz), fontsize=11, fontname='Arial')
119
- plt.text(eic_rt[0]+(eic_rt[-1]-eic_rt[0])*0.2, max_int*1.1, "G-score = {:.2f}".format(feature.gaussian_similarity), fontsize=11, fontname='Arial', color="blue")
120
- plt.text(eic_rt[0]+(eic_rt[-1]-eic_rt[0])*0.4, max_int*1.1, "N-score = {:.2f}".format(feature.noise_score), fontsize=11, fontname='Arial', color="red")
121
- plt.text(eic_rt[0]+(eic_rt[-1]-eic_rt[0])*0.6, max_int*1.1, "A-score = {:.2f}".format(feature.asymmetry_factor), fontsize=11, fontname='Arial', color="darkgreen")
122
- plt.text(eic_rt[0]+(eic_rt[-1]-eic_rt[0])*0.8,max_int*1.1, d.params.file_name, fontsize=7, fontname='Arial', color="gray")
120
+ plt.xlabel("Retention Time (min)", fontsize=18)
121
+ plt.ylabel("Intensity", fontsize=18)
122
+ plt.text(eic_rt[0], max_int*1.1, "m/z = {:.4f}".format(feature.mz), fontsize=11)
123
+ plt.text(eic_rt[0]+(eic_rt[-1]-eic_rt[0])*0.2, max_int*1.1, "G-score = {:.2f}".format(feature.gaussian_similarity), fontsize=11, color="blue")
124
+ plt.text(eic_rt[0]+(eic_rt[-1]-eic_rt[0])*0.4, max_int*1.1, "N-score = {:.2f}".format(feature.noise_score), fontsize=11, color="red")
125
+ plt.text(eic_rt[0]+(eic_rt[-1]-eic_rt[0])*0.6, max_int*1.1, "A-score = {:.2f}".format(feature.asymmetry_factor), fontsize=11, color="darkgreen")
126
+ plt.text(eic_rt[0]+(eic_rt[-1]-eic_rt[0])*0.8,max_int*1.1, d.params.file_name, fontsize=7, color="gray")
123
127
 
124
128
  if output:
125
129
  plt.savefig(output, dpi=600, bbox_inches="tight")
@@ -170,7 +174,8 @@ def mirror_ms2(precursor_mz1, precursor_mz2, signals1, signals2, annotation=None
170
174
 
171
175
  plt.figure(figsize=(10, 3))
172
176
  plt.rcParams['font.size'] = 14
173
- plt.rcParams['font.family'] = 'Arial'
177
+ if 'Arial' in [f.name for f in fm.fontManager.ttflist]:
178
+ plt.rcParams['font.family'] = 'Arial'
174
179
  # plot precursor
175
180
  plt.vlines(x = precursor_mz1, ymin = 0, ymax = 1, color="cornflowerblue", linewidth=1.5, linestyles='dashed')
176
181
  plt.vlines(x = precursor_mz2, ymin = 0, ymax = -1, color="lightcoral", linewidth=1.5, linestyles='dashed')
@@ -182,18 +187,18 @@ def mirror_ms2(precursor_mz1, precursor_mz2, signals1, signals2, annotation=None
182
187
  xmax = max([precursor_mz1, precursor_mz2])*1.2
183
188
  # plot zero line
184
189
  plt.hlines(y = 0, xmin = 0, xmax = xmax, color="black", linewidth=1.5)
185
- plt.xlabel("m/z, Dalton", fontsize=18, fontname='Arial')
186
- plt.ylabel("Intensity", fontsize=18, fontname='Arial')
187
- plt.xticks(fontsize=14, fontname='Arial')
188
- plt.yticks(fontsize=14, fontname='Arial')
190
+ plt.xlabel("m/z, Dalton", fontsize=18)
191
+ plt.ylabel("Intensity", fontsize=18)
192
+ plt.xticks(fontsize=14)
193
+ plt.yticks(fontsize=14)
189
194
 
190
195
  # note name and similarity score
191
- plt.text(xmax*0.9, 0.9, "Experiment", fontsize=12, fontname='Arial', color="grey")
192
- plt.text(xmax*0.9, -0.9, "Database", fontsize=12, fontname='Arial', color="grey")
196
+ plt.text(xmax*0.9, 0.9, "Experiment", fontsize=12, color="grey")
197
+ plt.text(xmax*0.9, -0.9, "Database", fontsize=12, color="grey")
193
198
  if score is not None:
194
- plt.text(0, 0.9, "similarity = {:.3f}".format(score), fontsize=12, fontname='Arial', color="blue")
199
+ plt.text(0, 0.9, "similarity = {:.3f}".format(score), fontsize=12, color="blue")
195
200
  if annotation is not None:
196
- plt.text(0, -0.95, annotation, fontsize=12, fontname='Arial', color="black")
201
+ plt.text(0, -0.95, annotation, fontsize=12, color="black")
197
202
 
198
203
  if output_path is not None:
199
204
  plt.savefig(output_path, dpi=600, bbox_inches="tight")
@@ -273,12 +278,13 @@ def plot_lowess_normalization(arr, fit_curve, arr_new, sample_idx, qc_idx, n, id
273
278
  v = np.arange(n)
274
279
 
275
280
  plt.rcParams['font.size'] = 20
276
- plt.rcParams['font.family'] = 'Arial'
281
+ if 'Arial' in [f.name for f in fm.fontManager.ttflist]:
282
+ plt.rcParams['font.family'] = 'Arial'
277
283
  plt.figure(figsize=(20,8))
278
284
 
279
285
  plt.subplot(2, 1, 1)
280
286
  plt.title("Before normalization")
281
- plt.ylabel("Intensity", fontname='Arial')
287
+ plt.ylabel("Intensity")
282
288
  plt.plot(v[sample_idx], arr[sample_idx], 'o', markersize=4, color='grey')
283
289
  plt.plot(v[qc_idx], arr[qc_idx], 'o', markersize=6, color='red')
284
290
  plt.plot(v, fit_curve, '--', color='blue', linewidth=2)
@@ -291,8 +297,8 @@ def plot_lowess_normalization(arr, fit_curve, arr_new, sample_idx, qc_idx, n, id
291
297
 
292
298
  plt.subplot(2, 1, 2)
293
299
  plt.title("After normalization")
294
- plt.xlabel("Analytical order", fontname='Arial')
295
- plt.ylabel("Intensity", fontname='Arial')
300
+ plt.xlabel("Analytical order")
301
+ plt.ylabel("Intensity")
296
302
  plt.plot(v[sample_idx], arr_new[sample_idx], 'o', markersize=4, color='grey')
297
303
  plt.plot(v[qc_idx], arr_new[qc_idx], 'o', markersize=6, color='red')
298
304
  plt.ylim(-300, np.max(arr_new[qc_idx]) * 1.1)
@@ -319,7 +325,8 @@ def plot_pca(vecPC1, vecPC2, var_PC1, var_PC2, group_names, colors=None, plot_or
319
325
 
320
326
  fig, ax = plt.subplots(figsize=(10,10))
321
327
  # set font to arial
322
- plt.rcParams['font.family'] = 'Arial'
328
+ if 'Arial' in [f.name for f in fm.fontManager.ttflist]:
329
+ plt.rcParams['font.family'] = 'Arial'
323
330
  groups = np.unique(np.array(group_names))
324
331
  if colors is None:
325
332
  colors = COLORS[:len(groups)]
@@ -340,10 +347,10 @@ def plot_pca(vecPC1, vecPC2, var_PC1, var_PC2, group_names, colors=None, plot_or
340
347
  ax.spines[axis].set_linewidth(2)
341
348
  ax.tick_params(width=2, length=8)
342
349
 
343
- plt.xlabel("PC 1 ({:.1f} %)".format(var_PC1*100), fontname='Arial', fontsize=30, labelpad=25)
344
- plt.ylabel("PC 2 ({:.1f} %)".format(var_PC2*100), fontname='Arial', fontsize=30, labelpad=25)
345
- plt.xticks(fontname='Arial', fontsize=24)
346
- plt.yticks(fontname='Arial', fontsize=24)
350
+ plt.xlabel("PC 1 ({:.1f} %)".format(var_PC1*100), fontsize=30, labelpad=25)
351
+ plt.ylabel("PC 2 ({:.1f} %)".format(var_PC2*100), fontsize=30, labelpad=25)
352
+ plt.xticks(fontsize=24)
353
+ plt.yticks(fontsize=24)
347
354
  plt.grid(linestyle=':')
348
355
  plt.legend(fontsize=20, loc='upper right', frameon=True)
349
356
  plt.rcParams.update({'font.size': 24})
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: masscube
3
- Version: 1.2.4
3
+ Version: 1.2.5
4
4
  Summary: Accurate and fast data processing for metabolomics
5
5
  Author-email: Huaxu Yu <yhxchem@outlook.com>
6
6
  Maintainer-email: Huaxu Yu <yhxchem@outlook.com>
@@ -12,6 +12,18 @@ Classifier: Operating System :: OS Independent
12
12
  Requires-Python: >=3.8
13
13
  Description-Content-Type: text/markdown
14
14
  License-File: LICENSE
15
+ Requires-Dist: numpy>=1.24
16
+ Requires-Dist: pandas>=2.2.1
17
+ Requires-Dist: pyteomics==4.6.3
18
+ Requires-Dist: scipy>=1.10.1
19
+ Requires-Dist: tqdm>=4.66.1
20
+ Requires-Dist: lxml>=4.9.3
21
+ Requires-Dist: matplotlib>=3.8.2
22
+ Requires-Dist: ms_entropy==1.3.4
23
+ Requires-Dist: scikit-learn>=1.3.2
24
+ Requires-Dist: statsmodels>=0.14.2
25
+ Requires-Dist: umap-learn>=0.5.7
26
+ Dynamic: license-file
15
27
 
16
28
  # MassCube
17
29
 
File without changes
File without changes
File without changes
File without changes