Skip to content

Commit

Permalink
will take over class number in apply-subset
Browse files Browse the repository at this point in the history
  • Loading branch information
bwmr committed Dec 8, 2023
1 parent 2599e02 commit bd86c4f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies = [
"tqdm"
]

[project.optinal-dependencies]
[project.optional-dependencies]
dev = [
"ruff",
]
Expand Down Expand Up @@ -68,4 +68,4 @@ extend-ignore = [

[tool.ruff.format]
quote-style = "double"
indent-style = "tab"
indent-style = "tab"
4 changes: 4 additions & 0 deletions subtomotools/particle_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ def apply_subset(subset_star, subtomo_stars):
subset_3d["rlnOriginXAngst"] = list(subset_2d["rlnOriginXAngst"])
subset_3d["rlnOriginYAngst"] = list(subset_2d["rlnOriginXAngst"])

# if group is given, take over
if "rlnClassNumber" in subset_2d:
subset_3d["rlnClassNumber"] = list(subset_2d["rlnClassNumber"])

starfile.write(
{"optics": fullset_3d["optics"], "particles": subset_3d},
Path(st_star).with_name(f"{Path(st_star).stem}_selected.star"),
Expand Down

0 comments on commit bd86c4f

Please sign in to comment.