Skip to content

wieczoreklab/MiCSPARC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MiCSPARC, a cryo-EM processing pipeline developed around CryoSPARC, which leverages automated particle picking and fast 3D refinement to determine structures of both decorated and undecorated microtubules.

If MiCSPARC is useful in your work, please cite us.

Daniel Zhang, Hugo Munoz-Hernandez, Pavel Filipcik, Kushal Sejwal, Yixin Xu, Sung Ryul Choi, Michel Steinmetz, Michal Wieczorek Acta Cryst D 82, 411–420 (2026); doi: https://doi.org/10.1107/S2059798326003062

Installation

  1. Install conda / mamba [https://github.com/conda-forge/miniforge]

curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"

bash Miniforge3-$(uname)-$(uname -m).sh

  1. Open new terminal

  2. Download and install MiCSPARC requirements

cd <your_destination_directory>

git clone git@github.com:wieczoreklab/MiCSPARC.git

cd MiCSPARC

mamba create -f environment.yml

mamba activate micsparc

The pipeline and instructions have been developed and tested with CryoSPARC v4.7.1. All MiCSPARC scripts accept a --help argument for description of required inputs.

Picking

  1. Motion correction, CTF estimation, curate exposures

Generate initial templates for filament tracer

  1. Filament tracer — ~300 Å*, 82 Å separation in diameters (e.g. 0.27 for 300 Å diameter), 300–400 Å template-free diameter. If the filament tracer is not picking any microtubules at this stage, increasing the sd of gaussian blur (e.g. to 2.0) and/or increasing both hysteresis values in increments of 1 can help.
  2. Inspect picks, extract — ~550–600 Å box*, bin to 4–5 Å/px
  3. 2D classification
  4. Select classes with single clear tube
    • If tube edges are close to circular mask (esp. with large decorators), expand box size in later extractions

Generate initial picks

  1. Filament tracer — Templates from step 5, ~300 Å*, 82 Å separation
  2. Inspect picks, extract - Ideally, choose a box size that's a multiple of 4
  3. 2D classification, Select 2D — 50–100 classes depending on number of picks, 2 final iterations
  4. 2D classification, Select 2D — 50 classes, 2 final iterations, disable sigma annealing (start annealing sigma at iteration 200)
  5. 2D classification — 1 class → export particles group

Extrapolate initial picks

The filament tracer will generally not pick along the entire microtubule, and may introduce errors in filament grouping. This can be rectified using the filament extrapolation script.

  1. Run filament extrapolation script
    Enter the exported directory (it is easiest to run the scripts directly within the exported directory in order to be able to reimport the results group)
    $ python /path/to/csparc_extrapolate_filaments.py --i JX_particles_exported.cs --j <number-of-cpus>
  2. Import new results group (/path/to/CS-project/exports/groups/JX_particles/JX_particles_extrapolated.csg)
  3. Extract — bin to ~2 Å/px
  4. 2D classification, Select 2D — 50–100 classes depending on number of picks, 2 final iterations
  5. 2D classification, Select 2D — 50 classes, 2 final iterations, disable sigma annealing

Protofilament number sorting

Generate references (potentially optional if suitable references already exist, but highly recommended)

References are required for the classification in 3D into groups of different protofilament numbers. This classification tends to be very dependent on references with the correct factors such as decoration state, positioning, and heterogeneity, and potentially even expansion or compression of the tube due to factors such as GMPCPP. Thus, it is recommended to create synthetic references directly from the dataset, as follows:

  1. Helical refinements with theoretical helical parameters corresponding to potential protofilament numbers in the dataset
    Theoretical helical parameters are calculated in the form:

    $$\begin{align*} \text{rise} &= \frac{\text{n-start} \times \text{tubulin spacing}}{\text{protofilament no.}} \\\ \text{twist} &= \frac{360^\circ + \text{supertwist}}{\text{protofilament no.}} \end{align*}$$

    Supertwist can generally be taken as 0 at this stage. Common theoretical microtubule parameters:

    pfn rise (Å) twist (°)
    11-3 11.2 -32.7
    12-3 10.3 -30.0
    13-3 9.46 -27.7
    14-3 8.79 -25.7
    15-4 10.9 -24.0
    16-4 10.3 -22.5
  2. Symmetry expand the best helical refinement by refined helical parameters
    The "best" refinement is not necessarily that with the highest resolution, due to the high symmetry applied, but rather the one with the visually best-resolved protofilaments (no smearing around the tube, ideally distinct tubulin dimers)

  3. Recenter on a protofilament (volume alignment tools with recentering to mask CoM)
    Creating a protofilament mask with ChimeraX segmentation:

    • Volume tools lowpass 15 Å, download map, open in ChimeraX, set an appropriate masking threshold
    • Tools > Volume Data > Segment Map (In 'Segmenting Options', set 'Display at most' to 600)
    • Select a single protofilament, group
    • File (in the Segment window) > Save selected regions to .mrc file (this is temporary, it does not matter where they are saved)
    • Command: volume resample [new volume] onGrid #1
    • Save the resampled volume, import into CryoSPARC
    • Volume tools lowpass 15 Å, output as mask, initial threshold of full map
    • Volume alignment tools, Input volume from best helical refine, symmetry expanded particles, new mask. Re-center to mask centre of mass.
  4. Downsample — 1/2 box size exactly. Do not change to optimise computation.

  5. Homogeneous Reconstruct Only, Local Refinement — Default parameters for reconstruction, for refinement enable 'Use pose/shift gaussian prior during alignment', use default sd rotations and shifts, allow recentering.

  6. Inverse mask around single protofilament (volume tools real space crop to 1/2 box size exactly and invert mask from step 18)

  7. Particle subtraction - particles from step 20, mask from step 21

  8. Reconstruct, local refinement — default sd rotations and shifts, allow recentering, enforce non-negativity → export volume group

  9. Run reference generation script

    $ python /path/to/csparc_create_pfn_references.py --i JX_volume_exported.cs ...

    The --recenter coords are those reported by CryoSPARC in the volume alignment step 18 "New center will be located at voxel coordinates:". These should be input in the format --recenter "x, y, z"

Protofilament number assignment

  1. Import reference pf volumes - check that the reference volumes look correct, if not double check --recenter coords from step 24, box sizes must be exactly 1/2 of original helical refine
  2. Heterogeneous refinement — force hard classification (if any of the output classes has 0 particles assigned to it, remove the corresponding reference and rerun the job) → export particles group
  3. Run pf number assignment script
    $ python /path/to/csparc_assign_pfns.py --i ...
  4. Import new results group
  5. Heterogeneous reconstruction
  6. Split volume groups

Rough MT alignment

Having each particle along the microtubule in the same orientation is important for later symmetry expansion and seam searching steps, as it allows us to assign each group of expansions as the same protofilament along the microtubule.

For each good class:

  1. Helical refinement of particles with theoretical helical parameters — minimise per-particle scale, use NU refinement
    1. Particles may need to be unbinned if they hit binned nyquist
  2. CTF refinement
  3. Helical refinement w/ no helical symmetry — minimise per-particle scale, use NU refinement → export particles group
  4. Run psi unification script
    $ python /path/to/csparc_unify_psi.py ...
  5. Import new results group
  6. Local refinement — C1 helical volume and mask, 5sd rotations, 3sd shifts, allow rotation recentering → export particles group
  7. Run phi unification script
    $ python /path/to/csparc_unify_phi.py ...
  8. Import new results group
  9. Local refinement — C1 helical volume and mask, 5sd rotations, 3sd shifts, allow rotation recentering → export particles group
  10. Run phi unification script
    $ python /path/to/csparc_unify_phi.py ...
  11. Import new results group
  12. Local refinement — C1 helical volume and mask, 3sd rotations, 2sd shifts, don't allow recentering
  13. Symmetry expansion — refined helical parameters, order = pfn
  14. Local refinement — 3sd rotations, 2sd shifts, don't allow recentering
    • Undecorated: If this does not reach <4 Å resolution, later steps may prove difficult/impossible. Decorated particles will be more lenient depending on the size of the decorator.

Protofilament alignment

  1. Create mask around single protofilament — if refining multiple pfns, it can be helpful to select the protofilament that coincides best across all pfns
    With large decorators, select the protofilament with the most mixed population of decorator registers to ensure no gaps in the mask (or use a high dilation). Selecting the "worst" protofilament will also give the best split for the register classification, which will generally also allow seam search to work better.
  2. Volume alignment tools — recenter to mask CoM
  3. Volume tools — crop realigned mask to 1/2 box size, invert
  4. Extract realigned particles — 1/2 box size, recenter using aligned shifts
  5. Reconstruct, local refinement — 3sd rotations, 2sd shifts, don't allow recentering
  6. Particle subtraction — inverted mask
  7. Reconstruct, local refinement — 3sd rotations, 2sd shifts, allow recentering, enforce non-negativity

If refining multiple classes:

  1. Pick a base refinement, align other pfns with align 3D maps (may need to be roughly aligned manually with volume alignment and ChimeraX)
  2. Local refinement — combine all pfns, 3sd rotations, 2sd shifts, allow rotation recentering, enforce non-negativity

Register correction

  1. 3D classification — 10 classes, no per-particle scale, filter 4 Å for undecorated, up to 12 Å for large decorators
    Lower resolution limits (closer to 12 than 4) will allow the classification to work better for decorators.
  2. Identify good references
    For undecorated: at least one class with distinct $\alpha$-tubulin S9-S10 loop, ideally at least two which exhibit a difference in register
    For decorated: at least one class with clear and convincing spacing of decorator, ideally at least two which exhibit a difference in register (if applicable)
  3. Reconstruct, local refinement for each register, combining particles from appropriate classes — 3sd rotations, 2sd shifts, allow rotation recentering, enforce non-negativity
  4. If only one register was observed, create the other register using volume alignment — recenter in Z by 41 Å
  5. 3D classification w/ both refined registers — 2 classes, input initialization mode, filter 4 Å for undecorated, up to 12 Å for large decorators, force hard classification, no per-particle scale
    This step should result in a ~50/50 split of particles
  6. Local refinement both classes separately — 3sd rotations, 2sd shifts, allow recentering, enforce non-negativity
  7. Volume alignment — Shift worse class by 4 Å in Z
  8. Align 3D both maps w/ particles from shifted class
  9. Local refine both classes together — 3sd rotations, 2sd shifts, allow recentering, enforce non-negativity
  10. CTF refinement
  11. Local refinement — 3sd rotations, 2sd shifts, allow recentering, enforce non-negativity

For a final highest-resolution average of a protofilament:

  1. Duplicate removal
  2. Reference-based motion refinement
  3. Local refinement — 3sd rotations, 2sd shifts, allow recentering, enforce non-negativity

MT reconstruction

  1. Heterogeneous reconstruction using pre-duplicate removal particles (step 64) and alignments3D_multi field of the 2-class 3D classification → export particles group
  2. Run seam search script
    $ python /path/to/csparc_seam_search.py ...
    Using the recenter coords from step 46
  3. Import results group(s if multiple pfns) (e.g. /path/to/CS-project/exports/groups/JX_particles/JX_particles_seamed_50_13pf.csg)
  4. Volume alignment — recenter on center coords provided by step 69
  5. Extract — return to original MT box size
  6. Local refinement — volume and mask of symmetrised helical refinement, 3sd rotations, 2sd shifts, don't allow recentering
  7. CTF refinement
  8. Local refinement — 3sd rotations, 2sd shifts, don't allow recentering
  9. Duplicate removal
  10. Reference-based motion refinement
  11. Local refinement — 3sd rotations, 2sd shifts, don't allow recentering

Abbreviations & Tricks

* Increase size as appropriate for large decorations

sd - standard deviation

pfn - protofilament number

w/ - with

All scripts can be used with python /path/to/script.py --help to show required and optional parameters.

Create a new conda environment with the provided environment.yml.

For all reconstructions that are followed by local refinements, use the particles, volume, and mask generated by the reconstruction as input for the refinement.

All local refinements may benefit from having "FSC noise substitution" enabled, but this has not been vigorously tested.

About

Microtubule Image Processing in CryoSPARC Pipeline

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages