Skip to content
Open
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
11 changes: 0 additions & 11 deletions src/murfey/server/api/workflow.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import asyncio
import os
from datetime import datetime
from logging import getLogger
from pathlib import Path
Expand Down Expand Up @@ -609,10 +608,6 @@ async def request_spa_preprocessing(

db.close()

if not mrc_out.parent.exists():
mrc_out_dir = Path(secure_filename(str(mrc_out))).parent
mrc_out_dir.mkdir(parents=True, exist_ok=True)
os.chmod(mrc_out_dir, mode=machine_config.mkdir_chmod)
recipe_name = machine_config.recipes.get(
"em-spa-preprocess", "em-spa-preprocess"
)
Expand Down Expand Up @@ -837,9 +832,6 @@ async def request_tomography_preprocessing(
dcid = data_collection[0][1].id
appid = data_collection[0][3].id
murfey_ids = _murfey_id(appid, db, number=1, close=False)
if not mrc_out.parent.exists():
mrc_out.parent.mkdir(parents=True, exist_ok=True)
os.chmod(mrc_out.parent, mode=machine_config.mkdir_chmod)

session_processing_parameters = db.exec(
select(SessionProcessingParameters).where(
Expand Down Expand Up @@ -990,9 +982,6 @@ def register_completed_tilt_series(
/ "tomograms"
/ f"{ts.tag}_stack.mrc"
)
if not stack_file.parent.exists():
stack_file.parent.mkdir(parents=True)
os.chmod(stack_file.parent, mode=machine_config.mkdir_chmod)
tilt_offset = midpoint([float(get_angle(t)) for t in tilts])
zocalo_message = {
"recipes": ["em-tomo-align"],
Expand Down
8 changes: 0 additions & 8 deletions src/murfey/server/feedback.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import logging
import math
import os
import subprocess
import time
from datetime import datetime
Expand Down Expand Up @@ -1409,10 +1408,6 @@ def _flush_tomography_preprocessing(message: dict, _db):
detached_ids = [c.id for c in collected_ids]

murfey_ids = _murfey_id(detached_ids[3], _db, number=1, close=False)
p = Path(f.mrc_out)
if not p.parent.exists():
p.parent.mkdir(parents=True)
os.chmod(p.parent, mode=machine_config.mkdir_chmod)
movie = db.Movie(
murfey_id=murfey_ids[0],
data_collection_id=detached_ids[1],
Expand Down Expand Up @@ -1886,9 +1881,6 @@ def feedback_callback(header: dict, message: dict, _db=murfey_db) -> None:
/ "tomograms"
/ f"{relevant_tilt_series.tag}_stack.mrc"
)
if not stack_file.parent.exists():
stack_file.parent.mkdir(parents=True)
os.chmod(stack_file.parent, machine_config.mkdir_chmod)
tilt_offset = midpoint([float(get_angle(t)) for t in tilts])
zocalo_message = {
"recipes": ["em-tomo-align"],
Expand Down
2 changes: 1 addition & 1 deletion src/murfey/util/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class MachineConfig(BaseModel): # type: ignore
"directories": [],
"files": [],
}
mkdir_chmod: int = 0o750
mkdir_chmod: int = 0o2750

# Rsync setup
rsync_url: str = ""
Expand Down
5 changes: 0 additions & 5 deletions src/murfey/workflows/spa/flush_spa_preprocess.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import logging
import os
from pathlib import Path
from typing import Optional

Expand Down Expand Up @@ -544,11 +543,7 @@ def flush_spa_preprocess(message: dict, murfey_db: Session) -> dict[str, bool]:
)
foil_hole_id = None

mrcp = Path(f.mrc_out)
ppath = Path(f.file_path)
if not mrcp.parent.exists():
mrcp.parent.mkdir(parents=True)
os.chmod(mrcp.parent, mode=machine_config.mkdir_chmod)
movie = Movie(
murfey_id=murfey_ids[2 * i],
data_collection_id=collected_ids[1].id,
Expand Down