emdbva 0.0.1.dev148__tar.gz → 0.0.1.dev150__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 (56) hide show
  1. {emdbva-0.0.1.dev148/emdbva.egg-info → emdbva-0.0.1.dev150}/PKG-INFO +1 -1
  2. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150/emdbva.egg-info}/PKG-INFO +1 -1
  3. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/emdbva.egg-info/SOURCES.txt +0 -1
  4. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/metrics/phaserandomization.py +1 -1
  5. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/prepareandrun_codon_airflow.py +0 -0
  6. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/validationanalysis.py +2 -2
  7. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/version.py +1 -1
  8. emdbva-0.0.1.dev148/va/metrics/map_map_cc.py +0 -139
  9. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/LICENSE +0 -0
  10. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/MANIFEST.in +0 -0
  11. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/README.rst +0 -0
  12. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/emdbva.egg-info/dependency_links.txt +0 -0
  13. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/emdbva.egg-info/entry_points.txt +0 -0
  14. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/emdbva.egg-info/requires.txt +0 -0
  15. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/emdbva.egg-info/top_level.txt +0 -0
  16. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/setup.cfg +0 -0
  17. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/setup.py +0 -0
  18. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/PATHS_codon_airflow.py +0 -0
  19. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/__init__.py +0 -0
  20. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/audit/__init__.py +0 -0
  21. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/audit/cif_revision.py +0 -0
  22. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/mainva.py +0 -0
  23. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/metrics/__init__.py +0 -0
  24. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/metrics/bars.py +0 -0
  25. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/metrics/connected_percentage.py +0 -0
  26. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/metrics/contour_level_predicator.py +0 -0
  27. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/metrics/emda_mmcc.py +0 -0
  28. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/metrics/emringer.py +0 -0
  29. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/metrics/inclusion.py +0 -0
  30. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/metrics/map_data_validation.py +0 -0
  31. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/metrics/overlap_percentage.py +0 -0
  32. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/metrics/phenix_cc.py +0 -0
  33. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/metrics/phenix_mm.py +0 -0
  34. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/metrics/projections.py +0 -0
  35. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/metrics/qscore.py +0 -0
  36. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/metrics/residue_locres.py +0 -0
  37. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/metrics/resmap.py +0 -0
  38. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/metrics/smoc.py +0 -0
  39. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/metrics/strudel.py +0 -0
  40. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/metrics/surfaces.py +0 -0
  41. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/metrics/threedfsc.py +0 -0
  42. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/preparation.py +0 -0
  43. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/qscores.csv +0 -0
  44. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/schemas/__init__.py +0 -0
  45. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/schemas/emdb_entry_full.schema.json +0 -0
  46. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/schemas/loader.py +0 -0
  47. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/utils/Checker.py +0 -0
  48. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/utils/ChimeraxViews.py +0 -0
  49. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/utils/MapProcessor.py +0 -0
  50. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/utils/Model.py +0 -0
  51. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/utils/__init__.py +0 -0
  52. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/utils/cl_weights.pth +0 -0
  53. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/utils/log_utils.py +0 -0
  54. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/utils/misc.py +0 -0
  55. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/utils/rescolor.py +0 -0
  56. {emdbva-0.0.1.dev148 → emdbva-0.0.1.dev150}/va/utils/stars.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: emdbva
3
- Version: 0.0.1.dev148
3
+ Version: 0.0.1.dev150
4
4
  Summary: CryoEM validation toolkit
5
5
  Home-page: https://test.pypi.org/project/va/
6
6
  Author: Zhe Wang
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: emdbva
3
- Version: 0.0.1.dev148
3
+ Version: 0.0.1.dev150
4
4
  Summary: CryoEM validation toolkit
5
5
  Home-page: https://test.pypi.org/project/va/
6
6
  Author: Zhe Wang
@@ -26,7 +26,6 @@ va/metrics/emda_mmcc.py
26
26
  va/metrics/emringer.py
27
27
  va/metrics/inclusion.py
28
28
  va/metrics/map_data_validation.py
29
- va/metrics/map_map_cc.py
30
29
  va/metrics/overlap_percentage.py
31
30
  va/metrics/phaserandomization.py
32
31
  va/metrics/phenix_cc.py
@@ -221,7 +221,7 @@ def relion_auto_mask_fast(data, threshold, extend_pixels, edge_width, verbose=Tr
221
221
  steps = []
222
222
  if verbose:
223
223
  steps = tqdm(total=3, desc="Masking Steps", unit="step")
224
-
224
+
225
225
  # Step 1: Initial binary mask
226
226
  mask = (data >= threshold).astype(np.float32)
227
227
  if verbose:
@@ -228,8 +228,8 @@ class ValidationAnalysis:
228
228
  self.get_resolution()
229
229
  self.relion_mask = None
230
230
  self.masked_rawmap = None
231
- # if self.rawmap:
232
- # self.relion_mask = self.get_relion_mask()
231
+ if self.rawmap:
232
+ self.relion_mask = self.get_relion_mask()
233
233
  # make a symbolic link for relion_mask in the va folder
234
234
  if self.relion_mask:
235
235
  mask_name = os.path.basename(self.relion_mask)
@@ -18,5 +18,5 @@ under the License.
18
18
 
19
19
  """
20
20
 
21
- __version__ = '0.0.1.dev148'
21
+ __version__ = '0.0.1.dev150'
22
22
  __em_statistics_version__ = '202505.v01'
@@ -1,139 +0,0 @@
1
- """PHENIX map-map correlation metric helpers."""
2
-
3
- import os
4
- import re
5
- import subprocess
6
- from distutils.spawn import find_executable
7
-
8
-
9
- _MAP_MAP_CC_PATTERN = re.compile(
10
- r"Map-map CC is\s+([-+]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][-+]?\d+)?)"
11
- )
12
-
13
-
14
- def parse_map_map_cc_output(stdout_text):
15
- """Extract the map-map correlation value from PHENIX output.
16
-
17
- Args:
18
- stdout_text (str): Combined standard output and error text from
19
- ``phenix.map_correlations``.
20
-
21
- Returns:
22
- float or None: The parsed correlation, or ``None`` when the expected
23
- result line is absent or cannot be converted to a number.
24
- """
25
- if not isinstance(stdout_text, str):
26
- return None
27
- match = _MAP_MAP_CC_PATTERN.search(stdout_text)
28
- if match is None:
29
- return None
30
- try:
31
- return float(match.group(1))
32
- except (TypeError, ValueError):
33
- return None
34
-
35
-
36
- def run_map_map_cc(map1_path, map2_path, output_path, echo=True):
37
- """Run PHENIX map-map correlation for two map files.
38
-
39
- Args:
40
- map1_path (str): Path to the first map.
41
- map2_path (str): Path to the second map.
42
- output_path (str): Directory for the PHENIX stdout diagnostic file.
43
- echo (bool): Whether to print captured PHENIX output.
44
-
45
- Returns:
46
- tuple: ``(errlist, result, stdout_text)``. ``result`` is empty when
47
- the executable, inputs, subprocess, or parser fails.
48
- """
49
- errlist = []
50
- result = {}
51
- stdout_text = ""
52
-
53
- phenix_path = find_executable("phenix.map_correlations")
54
- if phenix_path is None:
55
- return ["Phenix executable phenix.map_correlations is not available."], result, stdout_text
56
-
57
- if not os.path.isfile(map1_path):
58
- errlist.append("Map file does not exist: {}".format(map1_path))
59
- if not os.path.isfile(map2_path):
60
- errlist.append("Map file does not exist: {}".format(map2_path))
61
- if errlist:
62
- return errlist, result, stdout_text
63
-
64
- try:
65
- os.makedirs(output_path, exist_ok=True)
66
- except OSError as exc:
67
- return ["Could not create output directory {}: {}".format(output_path, exc)], result, stdout_text
68
-
69
- command = [phenix_path, map1_path, map2_path]
70
- try:
71
- completed = subprocess.run(
72
- command,
73
- cwd=output_path,
74
- stdout=subprocess.PIPE,
75
- stderr=subprocess.STDOUT,
76
- text=True,
77
- check=False,
78
- )
79
- stdout_text = completed.stdout or ""
80
- except OSError as exc:
81
- return ["Failed to run phenix.map_correlations: {}".format(exc)], result, stdout_text
82
- finally:
83
- log_path = os.path.join(output_path, "map_correlations.stdout")
84
- try:
85
- with open(log_path, "w", encoding="utf-8") as log_file:
86
- log_file.write(stdout_text)
87
- except OSError as exc:
88
- errlist.append("Could not write {}: {}".format(log_path, exc))
89
-
90
- if echo:
91
- print(stdout_text, end="")
92
- if completed.returncode != 0:
93
- errlist.append("phenix.map_correlations exited with code {}".format(completed.returncode))
94
- if "error" in stdout_text.lower():
95
- errlist.extend(
96
- line.strip() for line in stdout_text.splitlines() if "error" in line.lower()
97
- )
98
-
99
- correlation = parse_map_map_cc_output(stdout_text)
100
- if correlation is None:
101
- errlist.append("Could not parse 'Map-map CC is ...' from PHENIX output.")
102
-
103
- if not errlist:
104
- map1_name = os.path.basename(map1_path)
105
- map2_name = os.path.basename(map2_path)
106
- result = {"name": [map1_name, map2_name], "value": correlation}
107
- return errlist, result, stdout_text
108
-
109
-
110
- def write_map_map_cc_json(map1_path, map2_path, correlation, output_path):
111
- """Write a successful map-map correlation result as a JSON fragment.
112
-
113
- Args:
114
- map1_path (str): Path to the first map.
115
- map2_path (str): Path to the second map.
116
- correlation (float): Parsed map-map correlation value.
117
- output_path (str): Directory in which to write the fragment.
118
-
119
- Returns:
120
- str: Path to the written JSON file.
121
- """
122
- import json
123
-
124
- os.makedirs(output_path, exist_ok=True)
125
- map1_name = os.path.basename(map1_path)
126
- map2_name = os.path.basename(map2_path)
127
- pair_name = "{}_{}".format(map1_name, map2_name)
128
- output_file = os.path.join(output_path, pair_name + "_cc.json")
129
- data = {
130
- "map_map_cc": {
131
- pair_name: {
132
- "names": [map1_name, map2_name],
133
- "value": correlation,
134
- }
135
- }
136
- }
137
- with open(output_file, "w", encoding="utf-8") as handle:
138
- json.dump(data, handle, indent=2)
139
- return output_file
File without changes
File without changes
File without changes
File without changes
File without changes