libgunshotmatch 0.7.1__py3-none-any.whl → 0.7.3__py3-none-any.whl
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.
Potentially problematic release.
This version of libgunshotmatch might be problematic. Click here for more details.
- libgunshotmatch/__init__.py +1 -1
- libgunshotmatch/datafile.py +2 -2
- libgunshotmatch/gzip_util.py +2 -2
- libgunshotmatch/method/__init__.py +1 -1
- libgunshotmatch/peak.py +6 -3
- libgunshotmatch/project.py +1 -1
- {libgunshotmatch-0.7.1.dist-info → libgunshotmatch-0.7.3.dist-info}/METADATA +2 -2
- libgunshotmatch-0.7.3.dist-info/RECORD +18 -0
- libgunshotmatch-0.7.1.dist-info/RECORD +0 -18
- {libgunshotmatch-0.7.1.dist-info → libgunshotmatch-0.7.3.dist-info}/LICENSE +0 -0
- {libgunshotmatch-0.7.1.dist-info → libgunshotmatch-0.7.3.dist-info}/WHEEL +0 -0
- {libgunshotmatch-0.7.1.dist-info → libgunshotmatch-0.7.3.dist-info}/entry_points.txt +0 -0
libgunshotmatch/__init__.py
CHANGED
|
@@ -29,5 +29,5 @@ Base library for GunShotMatch.
|
|
|
29
29
|
__author__: str = "Dominic Davis-Foster"
|
|
30
30
|
__copyright__: str = "2020-2023 Dominic Davis-Foster"
|
|
31
31
|
__license__: str = "MIT License"
|
|
32
|
-
__version__: str = "0.7.
|
|
32
|
+
__version__: str = "0.7.3"
|
|
33
33
|
__email__: str = "dominic@davis-foster.co.uk"
|
libgunshotmatch/datafile.py
CHANGED
|
@@ -327,7 +327,7 @@ class Datafile:
|
|
|
327
327
|
"""
|
|
328
328
|
|
|
329
329
|
export_filename = os.path.join(output_dir, f"{self.name}.gsmd")
|
|
330
|
-
gzip_util.write_gzip_json(export_filename, self.to_dict(), indent=
|
|
330
|
+
gzip_util.write_gzip_json(export_filename, self.to_dict(), indent=None)
|
|
331
331
|
return export_filename
|
|
332
332
|
|
|
333
333
|
@classmethod
|
|
@@ -509,7 +509,7 @@ class Repeat:
|
|
|
509
509
|
"""
|
|
510
510
|
|
|
511
511
|
export_filename = os.path.join(output_dir, f"{self.name}.gsmr")
|
|
512
|
-
gzip_util.write_gzip_json(export_filename, self.to_dict(), indent=
|
|
512
|
+
gzip_util.write_gzip_json(export_filename, self.to_dict(), indent=None)
|
|
513
513
|
return export_filename
|
|
514
514
|
|
|
515
515
|
@classmethod
|
libgunshotmatch/gzip_util.py
CHANGED
|
@@ -28,7 +28,7 @@ Read and write gzipped JSON.
|
|
|
28
28
|
|
|
29
29
|
# stdlib
|
|
30
30
|
import gzip
|
|
31
|
-
from typing import Any, Dict, List, OrderedDict, Tuple, Union
|
|
31
|
+
from typing import Any, Dict, List, Optional, OrderedDict, Tuple, Union
|
|
32
32
|
|
|
33
33
|
# 3rd party
|
|
34
34
|
import sdjson
|
|
@@ -54,7 +54,7 @@ def read_gzip_json(path: PathLike) -> JSONOutput:
|
|
|
54
54
|
return sdjson.load(f)
|
|
55
55
|
|
|
56
56
|
|
|
57
|
-
def write_gzip_json(path: PathLike, data: JSONInput, indent: int = 2) -> None:
|
|
57
|
+
def write_gzip_json(path: PathLike, data: JSONInput, indent: Optional[int] = 2) -> None:
|
|
58
58
|
"""
|
|
59
59
|
Write JSON to a gzip file.
|
|
60
60
|
|
libgunshotmatch/peak.py
CHANGED
|
@@ -475,15 +475,18 @@ def filter_aligned_peaks(
|
|
|
475
475
|
|
|
476
476
|
# print("tail of area_alignment=", area_alignment.tail(top_n_peaks))
|
|
477
477
|
|
|
478
|
-
# Limit to the largest `
|
|
478
|
+
# Limit to the largest `top_n_peaks` peaks
|
|
479
479
|
for peak_no, areas in area_alignment.tail(top_n_peaks).iterrows():
|
|
480
480
|
# Ignore peak if average peak area is less then min_peak_area
|
|
481
481
|
if areas["mean"] >= min_peak_area:
|
|
482
482
|
top_peaks_indices.append(peak_no)
|
|
483
483
|
|
|
484
484
|
else:
|
|
485
|
-
|
|
486
|
-
|
|
485
|
+
print(f"Filtering to peaks with an average peak area above {min_peak_area}")
|
|
486
|
+
for peak_no, areas in area_alignment.iterrows():
|
|
487
|
+
# Ignore peak if average peak area is less then min_peak_area
|
|
488
|
+
if areas["mean"] >= min_peak_area:
|
|
489
|
+
top_peaks_indices.append(peak_no)
|
|
487
490
|
|
|
488
491
|
# Remove peaks from rt_alignment if they are not in top_peaks_indices,
|
|
489
492
|
# i.e. they are one of the largest n largest peaks
|
libgunshotmatch/project.py
CHANGED
|
@@ -108,7 +108,7 @@ class Project:
|
|
|
108
108
|
"""
|
|
109
109
|
|
|
110
110
|
export_filename = os.path.join(output_dir, f"{self.name}.gsmp")
|
|
111
|
-
gzip_util.write_gzip_json(export_filename, self.to_dict(), indent=
|
|
111
|
+
gzip_util.write_gzip_json(export_filename, self.to_dict(), indent=None)
|
|
112
112
|
return export_filename
|
|
113
113
|
|
|
114
114
|
@classmethod
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: libgunshotmatch
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.3
|
|
4
4
|
Summary: Base library for GunShotMatch.
|
|
5
5
|
Author-email: Dominic Davis-Foster <dominic@davis-foster.co.uk>
|
|
6
6
|
License: MIT
|
|
@@ -135,7 +135,7 @@ libgunshotmatch
|
|
|
135
135
|
.. |language| image:: https://img.shields.io/github/languages/top/GunShotMatch/libgunshotmatch
|
|
136
136
|
:alt: GitHub top language
|
|
137
137
|
|
|
138
|
-
.. |commits-since| image:: https://img.shields.io/github/commits-since/GunShotMatch/libgunshotmatch/v0.7.
|
|
138
|
+
.. |commits-since| image:: https://img.shields.io/github/commits-since/GunShotMatch/libgunshotmatch/v0.7.3
|
|
139
139
|
:target: https://github.com/GunShotMatch/libgunshotmatch/pulse
|
|
140
140
|
:alt: GitHub commits since tagged version
|
|
141
141
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
libgunshotmatch/consolidate/__init__.py,sha256=gOqPqFcoSkVob8hKOpcNobK84yADyCwB3UNBPJM3vAc,22834
|
|
2
|
+
libgunshotmatch/consolidate/_fields.py,sha256=7gPIQaFaFySLZFrIuSMjwS84WEBHxZhCNhpXATlYjVw,2691
|
|
3
|
+
libgunshotmatch/consolidate/_spectra.py,sha256=7q_xVPN_oASayLdyMDjwaBLG4maIybHCqkGhiMIO940,2343
|
|
4
|
+
libgunshotmatch/method/__init__.py,sha256=138s5xt_E-WbCf1_H366crhT0PNptB7hD1uOJt2CV8o,9429
|
|
5
|
+
libgunshotmatch/method/_fields.py,sha256=GQNw9GdGhy9c_-0U_31eJDTXr1sG5_t5Lh0Z_nzE0RE,5025
|
|
6
|
+
libgunshotmatch/__init__.py,sha256=pv1kJbZIqxC9x7Ugvh0m05M9LhvAFJGM5kI-2Z1oTzc,1433
|
|
7
|
+
libgunshotmatch/datafile.py,sha256=r20e9fJ5oMx5hTpvPvau4m_ut_CQf0bu6IMU06Ml1mE,16282
|
|
8
|
+
libgunshotmatch/gzip_util.py,sha256=mQuiQI2pCb1Ba5J_HA5TfeMEEQ_lSF_dNDDSRQWoaqo,2270
|
|
9
|
+
libgunshotmatch/peak.py,sha256=X8aDKJctRbYyvnOqXa9saUQLAv04F6mc-oxntsDbyaY,16960
|
|
10
|
+
libgunshotmatch/project.py,sha256=2dvbWA4OHIxJQPjIgEglBbLB6NEQMxvgZA21Qgcb70c,6477
|
|
11
|
+
libgunshotmatch/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
|
+
libgunshotmatch/search.py,sha256=qjIXuTo3OqvC_zSLdwZkEDHfza064iYCTZzGeAZoW5s,3137
|
|
13
|
+
libgunshotmatch/utils.py,sha256=H-Ikm6oEGCgRoPvuCo3H5p1iKz3B9PuUqcpcH-rhgYA,4917
|
|
14
|
+
libgunshotmatch-0.7.3.dist-info/LICENSE,sha256=bFtJt-lyVJHV-88FeFa_r3BEOsmpna5qG2KOl9JUNfU,1064
|
|
15
|
+
libgunshotmatch-0.7.3.dist-info/METADATA,sha256=gOSO8CvLDpl5xnJRnIskkdSRtCb5GjX-XUmlfQ-9Kko,6392
|
|
16
|
+
libgunshotmatch-0.7.3.dist-info/WHEEL,sha256=3vSnEhs48RUlSXcCXKCl4DOHs_qqaP2dU3IGkMqN2oI,84
|
|
17
|
+
libgunshotmatch-0.7.3.dist-info/entry_points.txt,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
|
+
libgunshotmatch-0.7.3.dist-info/RECORD,,
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
libgunshotmatch/consolidate/__init__.py,sha256=gOqPqFcoSkVob8hKOpcNobK84yADyCwB3UNBPJM3vAc,22834
|
|
2
|
-
libgunshotmatch/consolidate/_fields.py,sha256=7gPIQaFaFySLZFrIuSMjwS84WEBHxZhCNhpXATlYjVw,2691
|
|
3
|
-
libgunshotmatch/consolidate/_spectra.py,sha256=7q_xVPN_oASayLdyMDjwaBLG4maIybHCqkGhiMIO940,2343
|
|
4
|
-
libgunshotmatch/method/__init__.py,sha256=k0Hs3c5Q13CENQHGtHVeDW2jQtR6UtiB1IVf_77lCT4,9432
|
|
5
|
-
libgunshotmatch/method/_fields.py,sha256=GQNw9GdGhy9c_-0U_31eJDTXr1sG5_t5Lh0Z_nzE0RE,5025
|
|
6
|
-
libgunshotmatch/__init__.py,sha256=7QhxNRtPqOz7VBUPCKPF9uaMe4uR0nnuoshgiINneig,1433
|
|
7
|
-
libgunshotmatch/datafile.py,sha256=sKCatM0F3fmceHQYObwgYr3EX9whKA0U2lOj-xqLt4c,16276
|
|
8
|
-
libgunshotmatch/gzip_util.py,sha256=vVGZLAhW1WmENt2kDXMY68UR72MHvsCBPaB-xCyVYbg,2250
|
|
9
|
-
libgunshotmatch/peak.py,sha256=pn8eYS8dfBOCjCRr-rciU3v9k1EREvH6jYqQibdjdok,16777
|
|
10
|
-
libgunshotmatch/project.py,sha256=t4YLCTKA1YYeRMiaXNz1-k21wYTtidN9FJM4aN9-rbw,6474
|
|
11
|
-
libgunshotmatch/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
|
-
libgunshotmatch/search.py,sha256=qjIXuTo3OqvC_zSLdwZkEDHfza064iYCTZzGeAZoW5s,3137
|
|
13
|
-
libgunshotmatch/utils.py,sha256=H-Ikm6oEGCgRoPvuCo3H5p1iKz3B9PuUqcpcH-rhgYA,4917
|
|
14
|
-
libgunshotmatch-0.7.1.dist-info/LICENSE,sha256=bFtJt-lyVJHV-88FeFa_r3BEOsmpna5qG2KOl9JUNfU,1064
|
|
15
|
-
libgunshotmatch-0.7.1.dist-info/METADATA,sha256=rvRV47dgFsu7xqyZQ6OukhBY9icHJ7KpqD3QvjXwVEc,6392
|
|
16
|
-
libgunshotmatch-0.7.1.dist-info/WHEEL,sha256=3vSnEhs48RUlSXcCXKCl4DOHs_qqaP2dU3IGkMqN2oI,84
|
|
17
|
-
libgunshotmatch-0.7.1.dist-info/entry_points.txt,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
|
-
libgunshotmatch-0.7.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|