Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relion5 input #229

Merged
merged 19 commits into from
Oct 16, 2024
Merged

Relion5 input #229

merged 19 commits into from
Oct 16, 2024

Conversation

McHaillet
Copy link
Collaborator

Closes #190

@Phaips @rdrighetto also adding you here, in case you have ideas about the implementation for this.

I made a PR to tackle the RELION5 metadata input. I tested it on a RELION5 project I made from the frames of the tutorial. As it is now, it runs and gives expected results. It does make the input quite easy as the job can be started like this and all 3D-CTF data is fetched from the relion metadata:

pytom_match_template.py -t Templates/80S_14A.mrc -m Templates/mask.mrc -v Tomograms/job006/tomograms/rec_tomo200528_102.mrc --particle-diameter 300 --relion5-tomograms-star Tomograms/job006/tomograms.star -d TemplateMatching/ -g 0

If one would want to loop over all the tomograms in the RELION directory you could do something like this in bash:

for tomo in Tomograms/job006/tomograms/*.mrc; do pytom_match_template.py -t Templates/80S_14A.mrc -m Templates/mask.mrc -v "$tomo" --particle-diameter 300 --relion5-tomograms-star Tomograms/job006/tomograms.star -d TemplateMatching/ -g 0; done

This PR is still a draft because I need to add unit tests and tackle the defocus handedness parameter from RELION. I am not sure if it actually applies a flip to the images.

It also made me aware that the code could be improved using some sort of TiltSeries struct internally that associates all the tilt angles, CTF and dose. But, better left for later to not convolute this.

Copy link

github-actions bot commented Sep 26, 2024

File Coverage Missing
All files 89%
src/pytom_tm/correlation.py 85% 97-98 130
src/pytom_tm/entry_points.py 80% 30 115-132 237-282 387-406 559-579 1092-1103
src/pytom_tm/extract.py 97% 264-269
src/pytom_tm/io.py 84% 20 40 56 72 85 104-110 127-131 138 144 181 186 233-235 305 451-459 484
src/pytom_tm/mask.py 80% 75 93 103-104
src/pytom_tm/parallel.py 89% 14-15 93 104-105 111 176
src/pytom_tm/plotting.py 16% 19-21 24-31 35-43 47-50 53-69 72-73 76-77 97-102 118-126 132-149 164-172 176-193 197-205 209-216 222 228 233 247-397
src/pytom_tm/tmjob.py 98% 371-372 388 482 610 659
src/pytom_tm/utils.py 78% 18-20
src/pytom_tm/weights.py 96% 58 313-317 324 534 539 544

Minimum allowed coverage is 88%

Generated by 🐒 cobertura-action against c9ffc02

@McHaillet McHaillet marked this pull request as ready for review October 15, 2024 16:49
@McHaillet
Copy link
Collaborator Author

McHaillet commented Oct 15, 2024

I added unittests and fixed reading of the tomogram handedness. It's ready for review 👍

Also just added version number update to 0.8.0

@McHaillet McHaillet requested a review from sroet October 15, 2024 16:50
Copy link
Collaborator

@sroet sroet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 missing test, couple other issues/corner cases. LGTM otherwise

pyproject.toml Outdated Show resolved Hide resolved
src/pytom_tm/io.py Outdated Show resolved Hide resolved
src/pytom_tm/io.py Outdated Show resolved Hide resolved
src/pytom_tm/io.py Outdated Show resolved Hide resolved
src/pytom_tm/io.py Outdated Show resolved Hide resolved
src/pytom_tm/io.py Outdated Show resolved Hide resolved
src/pytom_tm/io.py Outdated Show resolved Hide resolved
tests/test_io.py Outdated Show resolved Hide resolved
src/pytom_tm/extract.py Show resolved Hide resolved
@McHaillet McHaillet requested a review from sroet October 16, 2024 13:49
Copy link
Collaborator

@sroet sroet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fixes, LGTM

@McHaillet McHaillet merged commit b8a80a3 into SBC-Utrecht:main Oct 16, 2024
2 checks passed
@McHaillet McHaillet deleted the relion5_input branch October 16, 2024 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RELION-5 input compatibility
2 participants