ms-mint 0.3.2__tar.gz → 0.3.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.
- {ms-mint-0.3.2/ms_mint.egg-info → ms-mint-0.3.3}/PKG-INFO +1 -1
- {ms-mint-0.3.2 → ms-mint-0.3.3}/ms_mint/MintPlotter.py +23 -13
- {ms-mint-0.3.2 → ms-mint-0.3.3}/ms_mint/_version.py +3 -3
- {ms-mint-0.3.2 → ms-mint-0.3.3}/ms_mint/matplotlib_tools.py +11 -5
- {ms-mint-0.3.2 → ms-mint-0.3.3}/ms_mint/processing.py +2 -2
- {ms-mint-0.3.2 → ms-mint-0.3.3/ms_mint.egg-info}/PKG-INFO +1 -1
- {ms-mint-0.3.2 → ms-mint-0.3.3}/LICENSE +0 -0
- {ms-mint-0.3.2 → ms-mint-0.3.3}/MANIFEST.in +0 -0
- {ms-mint-0.3.2 → ms-mint-0.3.3}/README.md +0 -0
- {ms-mint-0.3.2 → ms-mint-0.3.3}/ms_mint/Chromatogram.py +0 -0
- {ms-mint-0.3.2 → ms-mint-0.3.3}/ms_mint/Mint.py +0 -0
- {ms-mint-0.3.2 → ms-mint-0.3.3}/ms_mint/TargetOptimizer.py +0 -0
- {ms-mint-0.3.2 → ms-mint-0.3.3}/ms_mint/__init__.py +0 -0
- {ms-mint-0.3.2 → ms-mint-0.3.3}/ms_mint/filelock.py +0 -0
- {ms-mint-0.3.2 → ms-mint-0.3.3}/ms_mint/filters.py +0 -0
- {ms-mint-0.3.2 → ms-mint-0.3.3}/ms_mint/io.py +0 -0
- {ms-mint-0.3.2 → ms-mint-0.3.3}/ms_mint/notebook.py +0 -0
- {ms-mint-0.3.2 → ms-mint-0.3.3}/ms_mint/pca.py +0 -0
- {ms-mint-0.3.2 → ms-mint-0.3.3}/ms_mint/plotly_tools.py +0 -0
- {ms-mint-0.3.2 → ms-mint-0.3.3}/ms_mint/standards.py +0 -0
- {ms-mint-0.3.2 → ms-mint-0.3.3}/ms_mint/targets.py +0 -0
- {ms-mint-0.3.2 → ms-mint-0.3.3}/ms_mint/tools.py +0 -0
- {ms-mint-0.3.2 → ms-mint-0.3.3}/ms_mint.egg-info/SOURCES.txt +0 -0
- {ms-mint-0.3.2 → ms-mint-0.3.3}/ms_mint.egg-info/dependency_links.txt +0 -0
- {ms-mint-0.3.2 → ms-mint-0.3.3}/ms_mint.egg-info/requires.txt +0 -0
- {ms-mint-0.3.2 → ms-mint-0.3.3}/ms_mint.egg-info/top_level.txt +0 -0
- {ms-mint-0.3.2 → ms-mint-0.3.3}/scripts/ms-mint-convert.py +0 -0
- {ms-mint-0.3.2 → ms-mint-0.3.3}/setup.cfg +0 -0
- {ms-mint-0.3.2 → ms-mint-0.3.3}/setup.py +0 -0
- {ms-mint-0.3.2 → ms-mint-0.3.3}/versioneer.py +0 -0
|
@@ -235,7 +235,7 @@ class MintPlotter:
|
|
|
235
235
|
plt.title(f'{P(fn).with_suffix("").name}\n{peak_label}')
|
|
236
236
|
return fig
|
|
237
237
|
|
|
238
|
-
def chromatogram(self, fns=None, peak_labels=None, interactive=False, filters=None, **kwargs):
|
|
238
|
+
def chromatogram(self, fns=None, peak_labels=None, interactive=False, filters=None, ax=None, **kwargs):
|
|
239
239
|
"""Plot the chromatogram extracted from one or more files.
|
|
240
240
|
|
|
241
241
|
:param fns: File names to extract chromatogram from.
|
|
@@ -283,18 +283,28 @@ class MintPlotter:
|
|
|
283
283
|
linewidth=0,
|
|
284
284
|
)
|
|
285
285
|
params.update(kwargs)
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
286
|
+
|
|
287
|
+
if ax is None:
|
|
288
|
+
g = sns.relplot(data=data, **params)
|
|
289
|
+
|
|
290
|
+
for peak_label, ax in zip(peak_labels, g.axes.flatten()):
|
|
291
|
+
_, _, rt_min, rt_max = self.mint.get_target_params(
|
|
292
|
+
peak_label
|
|
293
|
+
)
|
|
294
|
+
if rt_min is not None and rt_max is not None:
|
|
295
|
+
ax.axvspan(rt_min, rt_max, color="lightgreen", alpha=0.5, zorder=-1)
|
|
296
|
+
ax.ticklabel_format(
|
|
297
|
+
style="sci", axis="y", useOffset=False, scilimits=(0, 0)
|
|
298
|
+
)
|
|
299
|
+
g.set_titles(template="{col_name}")
|
|
300
|
+
|
|
301
|
+
else:
|
|
302
|
+
g = sns.lineplot(data=data,
|
|
303
|
+
x="scan_time",
|
|
304
|
+
y="intensity",
|
|
305
|
+
hue='ms_file_label',
|
|
306
|
+
ax=ax,
|
|
307
|
+
**kwargs)
|
|
298
308
|
return g
|
|
299
309
|
|
|
300
310
|
else:
|
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2023-08-
|
|
11
|
+
"date": "2023-08-22T11:34:29-0600",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "v0.3.
|
|
14
|
+
"full-revisionid": "64a5dc5327b4ff4c4c58498b79d6c63b534f52aa",
|
|
15
|
+
"version": "v0.3.3"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
|
@@ -212,29 +212,35 @@ def plot_peak_shapes(
|
|
|
212
212
|
"Scan time [s]": peak_rt,
|
|
213
213
|
"Intensity": peak_int,
|
|
214
214
|
"ms_file_label": ms_file_label,
|
|
215
|
-
"peak_label": peak_label
|
|
215
|
+
"peak_label": peak_label,
|
|
216
216
|
"Expected Scan time [s]": rt,
|
|
217
217
|
}
|
|
218
218
|
)
|
|
219
219
|
dfs.append(df)
|
|
220
|
-
|
|
221
|
-
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
df = pd.concat(dfs, ignore_index=True).reset_index(drop=True)
|
|
222
223
|
|
|
223
224
|
# Add metadata
|
|
224
225
|
if mint_metadata is not None:
|
|
225
|
-
df = pd.merge(df, mint_metadata, left_on='ms_file_label', right_index=True)
|
|
226
|
+
df = pd.merge(df, mint_metadata, left_on='ms_file_label', right_index=True, how='left')
|
|
226
227
|
|
|
228
|
+
_facet_kws = dict(sharex=sharex, sharey=sharey)
|
|
229
|
+
if 'facet_kws' in kwargs.keys():
|
|
230
|
+
_facet_kws.update(kwargs.pop('facet_kws'))
|
|
231
|
+
|
|
227
232
|
g = sns.relplot(
|
|
228
233
|
data=df,
|
|
229
234
|
x="Scan time [s]",
|
|
230
235
|
y="Intensity",
|
|
231
236
|
hue=hue,
|
|
232
237
|
col="peak_label",
|
|
238
|
+
col_order=peak_labels,
|
|
233
239
|
kind=kind,
|
|
234
240
|
col_wrap=col_wrap,
|
|
235
241
|
height=height,
|
|
236
242
|
aspect=aspect,
|
|
237
|
-
facet_kws=
|
|
243
|
+
facet_kws=_facet_kws,
|
|
238
244
|
legend=legend,
|
|
239
245
|
**kwargs,
|
|
240
246
|
)
|
|
@@ -231,8 +231,8 @@ def extract_ms1_properties(array, mz_mean):
|
|
|
231
231
|
peak_max = intensities.max()
|
|
232
232
|
peak_min = intensities.min()
|
|
233
233
|
peak_median = np.median(intensities)
|
|
234
|
-
|
|
235
|
-
peak_rt_of_max = times[
|
|
234
|
+
|
|
235
|
+
peak_rt_of_max = times[intensities.argmax()]
|
|
236
236
|
|
|
237
237
|
peak_delta_int = np.abs(intensities[0] - intensities[-1])
|
|
238
238
|
|
|
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
|
|
File without changes
|
|
File without changes
|