Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion recipes/ispyb/em-spa-bfactor-wrapper.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
"node_creator": 2
},
"parameters": {
"picker_id": "{picker_id}",
"refined_class_uuid": "{refined_class_uuid}",
"refined_grp_uuid": "{refined_grp_uuid}"
},
Expand Down
1 change: 0 additions & 1 deletion recipes/ispyb/em-spa-class2d-wrapper.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"mpi_run_command": "srun -n 5",
"particle_diameter": "{particle_diameter}",
"particles_file": "{particles_file}",
"picker_id": "{picker_id}",
"relion_options": {},
"threads": 8
},
Expand Down
1 change: 0 additions & 1 deletion recipes/ispyb/em-spa-class3d-wrapper.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"mpi_run_command": "srun -n 9",
"particle_diameter": "{particle_diameter}",
"particles_file": "{particles_file}",
"picker_id": "{picker_id}",
"relion_options": {},
"symmetry": "{symmetry}",
"threads": 4
Expand Down
4 changes: 2 additions & 2 deletions recipes/ispyb/em-spa-refine-wrapper.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"3": {
"job_parameters": {
"mask_diameter": "{mask_diameter}",
"mpi_run_command": "srun -n 5",
"particle_diameter": "{particle_diameter}",
"relion_options": {},
"symmetry": "{symmetry}"
Expand Down Expand Up @@ -65,7 +66,6 @@
"refine_wrapper": 7
},
"parameters": {
"picker_id": "{picker_id}",
"refined_class_uuid": "{refined_class_uuid}",
"refined_grp_uuid": "{refined_grp_uuid}"
},
Expand All @@ -92,6 +92,7 @@
"7": {
"job_parameters": {
"mask_diameter": "{mask_diameter}",
"mpi_run_command": "srun -n 5",
"particle_diameter": "{particle_diameter}"
},
"output": {
Expand Down Expand Up @@ -134,7 +135,6 @@
"node_creator": 2
},
"parameters": {
"picker_id": "{picker_id}",
"refined_class_uuid": "{symmetry_refined_class_uuid}",
"refined_grp_uuid": "{symmetry_refined_grp_uuid}"
},
Expand Down
1 change: 0 additions & 1 deletion recipes/murfey/em-spa-bfactor.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"node_creator": 2
},
"parameters": {
"picker_id": "{picker_id}",
"refined_class_uuid": "{refined_class_uuid}",
"refined_grp_uuid": "{refined_grp_uuid}"
},
Expand Down
2 changes: 0 additions & 2 deletions recipes/murfey/em-spa-class2d.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@
"class_uuids": "{class_uuids}",
"do_icebreaker_jobs": "False",
"mask_diameter": "{mask_diameter}",
"mpi_run_command": "srun -n 5",
"particle_diameter": "{particle_diameter}",
"particles_file": "{particles_file}",
"picker_id": "{picker_id}",
"relion_options": {},
"threads": 8
},
Expand Down
2 changes: 0 additions & 2 deletions recipes/murfey/em-spa-class3d.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@
"initial_model_file": "{initial_model_file}",
"initial_model_iterations": "{initial_model_iterations}",
"mask_diameter": "{mask_diameter}",
"mpi_run_command": "srun -n 9",
"particle_diameter": "{particle_diameter}",
"particles_file": "{particles_file}",
"picker_id": "{picker_id}",
"relion_options": {},
"symmetry": "{symmetry}",
"threads": 4
Expand Down
2 changes: 0 additions & 2 deletions recipes/murfey/em-spa-refine.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"refine_wrapper": 7
},
"parameters": {
"picker_id": "{picker_id}",
"refined_class_uuid": "{refined_class_uuid}",
"refined_grp_uuid": "{refined_grp_uuid}"
},
Expand Down Expand Up @@ -83,7 +82,6 @@
"node_creator": 2
},
"parameters": {
"picker_id": "{picker_id}",
"refined_class_uuid": "{symmetry_refined_class_uuid}",
"refined_grp_uuid": "{symmetry_refined_grp_uuid}"
},
Expand Down
2 changes: 1 addition & 1 deletion src/cryoemservices/services/postprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class PostProcessParameters(BaseModel):
postprocess_lowres: float = 10
symmetry: str = "C1"
particles_file: str = ""
picker_id: int
picker_id: int | None = None
refined_grp_uuid: int
refined_class_uuid: int
relion_options: RelionServiceOptions
Expand Down
10 changes: 5 additions & 5 deletions src/cryoemservices/wrappers/class2d_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import re
import subprocess
from pathlib import Path
from typing import Callable, Optional
from typing import Callable

import numpy as np
from gemmi import cif
Expand Down Expand Up @@ -36,7 +36,7 @@ class Class2DParameters(BaseModel):
vdam_final_fraction: float = 0.1
dont_combine_weights_via_disc: bool = True
preread_images: bool = True
scratch_dir: Optional[str] = None
scratch_dir: str | None = None
nr_pool: int = 100
pad: int = 2
skip_gridding: bool = False
Expand All @@ -47,7 +47,7 @@ class Class2DParameters(BaseModel):
class2d_nr_classes: int = 50
flatten_solvent: bool = True
do_zero_mask: bool = True
highres_limit: Optional[float] = None
highres_limit: float | None = None
centre_classes: bool = True
oversampling: int = 1
skip_align: bool = False
Expand All @@ -57,10 +57,10 @@ class Class2DParameters(BaseModel):
allow_coarser: bool = False
do_norm: bool = True
do_scale: bool = True
mpi_run_command: str = "srun -n 5"
mpi_run_command: str = "mpirun -n 5"
threads: int = 8
gpus: str = "0"
picker_id: int
picker_id: int | None = None
class2d_grp_uuid: int
class_uuids: str
do_icebreaker_jobs: bool = True
Expand Down
16 changes: 8 additions & 8 deletions src/cryoemservices/wrappers/class3d_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import re
import subprocess
from pathlib import Path
from typing import Callable, Optional, Tuple
from typing import Callable, Tuple

import numpy as np
from gemmi import cif
Expand Down Expand Up @@ -50,14 +50,14 @@ class Class3DParameters(BaseModel):
particle_diameter: float = 0
mask_diameter: float = 190
do_initial_model: bool = False
initial_model_file: Optional[str] = None
initial_model_file: str | None = None
initial_model_iterations: int = 200
initial_model_offset_range: float = 6
initial_model_offset_step: float = 2
start_initial_model_C1: bool = True
dont_combine_weights_via_disc: bool = True
preread_images: bool = True
scratch_dir: Optional[str] = None
scratch_dir: str | None = None
nr_pool: int = 10
pad: int = 2
skip_gridding: bool = False
Expand All @@ -71,8 +71,8 @@ class Class3DParameters(BaseModel):
class3d_nr_classes: int = 4
flatten_solvent: bool = True
do_zero_mask: bool = True
highres_limit: Optional[float] = None
fn_mask: Optional[str] = None
highres_limit: float | None = None
fn_mask: str | None = None
oversampling: int = 1
skip_align: bool = False
healpix_order: int = 2
Expand All @@ -82,11 +82,11 @@ class Class3DParameters(BaseModel):
symmetry: str = "C1"
do_norm: bool = True
do_scale: bool = True
mpi_run_command: str = "srun -n 5"
threads: int = 8
mpi_run_command: str = "mpirun -n 9"
threads: int = 4
gpus: str = "0:1:2:3"
initial_model_gpus: str = "0,1,2,3"
picker_id: int
picker_id: int | None = None
class3d_grp_uuid: int
class_uuids: str
relion_options: RelionServiceOptions
Expand Down
2 changes: 1 addition & 1 deletion src/cryoemservices/wrappers/refine3d_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class RefineParameters(BaseModel):
mask_lowpass: float = 15
mask_extend: int = 3
mask_soft_edge: int = 3
mpi_run_command: str = "srun -n 5"
mpi_run_command: str = "mpirun -n 5"
Comment thread
tieneupin marked this conversation as resolved.
dont_correct_greyscale: bool = True
initial_lowpass: float = 20.0
dont_combine_weights_via_disc: bool = True
Expand Down
2 changes: 1 addition & 1 deletion tests/services/test_class2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def test_class2d_service_complete_batch(mock_subprocess, offline_transport, tmp_

# Check the expected command was run
class2d_command = [
"srun",
"mpirun",
"-n",
"5",
"relion_refine_mpi",
Expand Down
9 changes: 5 additions & 4 deletions tests/services/test_class3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ def test_class3d_service_has_initial_model(
# Check the expected 3D classifcation command was run
assert mock_subprocess.call_count == 4
class3d_command = [
"srun",
"mpirun",
"-n",
"5",
"9",
"relion_refine_mpi",
"--i",
"Select/job013/particles_100000.star",
Expand Down Expand Up @@ -146,7 +146,7 @@ def test_class3d_service_has_initial_model(
"--norm",
"--scale",
"--j",
"8",
"4",
"--gpu",
"0:1:2:3",
"--pipeline_control",
Expand Down Expand Up @@ -282,6 +282,7 @@ def test_class3d_service_rerun(
"do_initial_model": False,
"initial_model_file": f"{tmp_path}/initial_model.mrc",
"mask_diameter": "190.0",
"mpi_run_command": "srun -n 5",
"particle_diameter": "180",
"particles_file": f"{tmp_path}/Select/job013/particles_100000.star",
"picker_id": "6",
Expand Down Expand Up @@ -376,7 +377,7 @@ def test_class3d_service_rerun(
"--norm",
"--scale",
"--j",
"8",
"4",
"--gpu",
"0:1:2:3",
"--pipeline_control",
Expand Down
2 changes: 1 addition & 1 deletion tests/wrappers/test_class2d_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def test_class2d_wrapper_complete_batch(

# Check the expected command was run
class2d_command = [
"srun",
"mpirun",
"-n",
"5",
"relion_refine_mpi",
Expand Down
6 changes: 3 additions & 3 deletions tests/wrappers/test_class3d_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,9 +499,9 @@ def test_class3d_wrapper_has_initial_model(
# Check the expected 3D classifcation command was run
assert mock_subprocess.call_count == 4
class3d_command = [
"srun",
"mpirun",
"-n",
"5",
"9",
"relion_refine_mpi",
"--i",
"Select/job013/particles_100000.star",
Expand Down Expand Up @@ -542,7 +542,7 @@ def test_class3d_wrapper_has_initial_model(
"--norm",
"--scale",
"--j",
"8",
"4",
"--gpu",
"0:1:2:3",
"--pipeline_control",
Expand Down
2 changes: 1 addition & 1 deletion tests/wrappers/test_refine3d_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ def test_refine3d_wrapper_no_mask(
)

refine3d_command = [
"srun",
"mpirun",
"-n",
"5",
"relion_refine_mpi",
Expand Down
Loading