-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mkdocs site for pytom-match-pick (#199)
* feature: add deploy docs workflow for main * initial mkdocs setup * fix: update README to contain info for website * update: add wiki files to docs * fix: make images and latex work in tutorial * fix: entry point docs could not be snipped due to a syntax issue * fix execution of argparse code in markdown exec * add: snippet points to all argument parsers in entry points * fix: weird formatting * feature: working version that can render the argparse help to the docs page * fix: move usage of template and mask creation to the new page * fix: move template matching info to Usage page * fix: add the extracting particles section * reduce docs * fix: move the merging annotations docds * fix: remove the previous Home page * fix: move the particle handedness page to the FAQ * feature: add relion5 starfile header to Developers page * fix: remove redundant header * fix: grammar * fix: update some docs in the workflow * add conditional to only trigger for pushes to main of sbc-utrecht/pytom-match-pick * update math * Apply suggestions from code review Co-authored-by: Sander Roet <[email protected]> * fix: remove unused images to prevent unnecessary storage; correct a link * fix: add install dependencies for website * update: readme for mkdocs local test * fix: angstrom symbol in math --------- Co-authored-by: Sander Roet <[email protected]>
- Loading branch information
Showing
20 changed files
with
3,935 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
# This job installs dependencies, builds the docs, and pushes it to | ||
# the `gh-pages` branch of the same repository. | ||
jobs: | ||
deploy-book: | ||
if: github.repository == ‘SBC-Utrecht/pytom-match-pick’ | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.x | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install mkdocs mkdocs-material markdown-exec | ||
# Build the book | ||
- name: Build the book | ||
run: | | ||
mkdocs build | ||
# Push the site to github-pages | ||
- name: GitHub Pages action | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
publish_dir: ./site | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
Star files written out by pytom-match-pick should be easily integratable with other software as it follows RELION star file conventions. The only difference are three column headers with extraction statistics, which are important to maintain for annotations. | ||
|
||
The exact header is: | ||
|
||
``` | ||
# Created by the starfile Python package (version x.x.x) at xx:xx:xx on xx/xx/xxxx | ||
data_ | ||
loop_ | ||
_rlnCoordinateX #1 | ||
_rlnCoordinateY #2 | ||
_rlnCoordinateZ #3 | ||
_rlnAngleRot #4 | ||
_rlnAngleTilt #5 | ||
_rlnAnglePsi #6 | ||
_rlnLCCmax #7 | ||
_rlnCutOff #8 | ||
_rlnSearchStd #9 | ||
_rlnDetectorPixelSize #10 | ||
_rlnMicrographName #11 | ||
``` | ||
|
||
With RELION5 compatibility mode in `pytom_extract_candidates.py` the star file | ||
columns are this (correcting the position in to Angstrom and relative to the | ||
tomogram center): | ||
|
||
``` | ||
# Created by the starfile Python package (version x.x.x) at xx:xx:xx on xx/xx/xxxx | ||
data_ | ||
loop_ | ||
_rlnCenteredCoordinateXAngst #1 | ||
_rlnCenteredCoordinateYAngst #2 | ||
_rlnCenteredCoordinateZAngst #3 | ||
_rlnAngleRot #4 | ||
_rlnAngleTilt #5 | ||
_rlnAnglePsi #6 | ||
_rlnLCCmax #7 | ||
_rlnCutOff #8 | ||
_rlnSearchStd #9 | ||
_rlnDetectorPixelSize #10 | ||
_rlnTomoName #11 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
## How to deal with gold beads? | ||
|
||
Gold beads (and other artifacts) can often interfer in template matching due to their high electron scattering potential. The easiest way to deal with them is by removing them on the micrograph level prior to reconstruction. The following IMOD commands can do the trick: | ||
|
||
``` | ||
imodfindbeads -size [GOLD_BEAD_DIAMETER_IN_PIXELS] -input TS_ID.st -output TS_ID.fid -spacing 0.8 | ||
ccderaser --input TS_ID.st --output TS_ID_erased.st -model TS_ID.fid -order 0 -circle / -better [1.5 * GOLD_BEAD_RADIUS_IN_PIXELS] -merge 1 -exclude -skip 1 -expand 3 | ||
``` | ||
|
||
## What template box size should I use? | ||
|
||
For the simple missing wedge model a box size that tightly fits the template and mask is easiest (and slightly faster). | ||
|
||
For the full per-tilt-weighting model its better to have some overhang, a rought estimate could be a box size of `4 * particle_diameter`. This aids in sampling the CTF function and the individual tilts in Fourier space. However, the mask radius should still snuggly fit the template. Although the larger box size slows down rotations slightly, the search benefits more from better sampling of the weighting function. | ||
|
||
## Is my particle handedness correct? | ||
|
||
If template matching is giving unexpectedly poor results for the particle of interest, it might that the template has the wrong handedness. In that case, the `pytom_create_template.py` has the option `--mirror` to produce a mirrored version of the template. We advice to create a mirrored and non-mirrored version of the template and to run template matching with both. After extracting ~1000 particle from both jobs, while setting the `--cut-off` to -1 (in `pytom_extract_candidates.py`). You can plot the results with the following python code: | ||
|
||
``` | ||
import starfile | ||
import matplotlib.pyplot as plt | ||
raw = starfile.read('[TOMO_ID]_particles.star') | ||
mirror = starfile.read('[TOMO_ID]_mirror_particles.star') | ||
fig, ax = plt.subplots(figsize=(5,5)) | ||
ax.plot(raw['ptmLCCmax'], label='raw') | ||
ax.plot(mirror['ptmLCCmax'], label='mirror') | ||
ax.set_xlabel('Particle index') | ||
ax.set_ylabel('LCCmax') | ||
ax.legend() | ||
plt.show() | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
This page provides a quick overview of software timings. All were run on a tomogram with dimension (462x478x250) and a template box size of 34x34x34. | ||
|
||
``` | ||
Single GPU (GTX 1080 Ti) | ||
12.85 (deg) - 193 sec. (3.22 min.) | ||
``` | ||
|
||
``` | ||
4 GPU's (GTX 1080 Ti) | ||
12.85 (deg) - 48 sec. (0.80 min.) | ||
7.00 (deg) - 306 sec. (5.10 min.) | ||
3.00 (deg) - 3801 sec. (63.35 min.) | ||
``` |
Oops, something went wrong.