3D classification¶
This tutorial shows how to convert raw tilt-series from EMPIAR-10304 (E. coli. ribosomes) into a ~4.9A resolution structure and resolve 8 different conformations.
Total running time required to complete this tutorial: 20 hrs.
Pre-calculated results are available in the demo instance of nextPYP.
We first use the command line to download and decompress a tbz file containing: 1) a script to download the raw tilt-series from EMPIAR, 2) corresponding metadata with tilt angles and acquisition order, and 3) an initial model:
# cd to a location in the shared file system and run:
wget https://nextpyp.app/files/data/nextpyp_class_tutorial.tbz
tar xfz nextpyp_class_tutorial.tbz
source download_10304.sh
Note
Depending on the speed of your network connection, downloading the raw data from EMPIAR can take several minutes.
Open your browser and navigate to the url of your nextPYP instance (e.g., https://nextpyp.myorganization.org).
Step 1: Create a new project¶
Data processing runs are organized into projects. We will create a new project for this tutorial
The first time you log into
nextPYP, you should see an empty Projects page:
Click on Create new project, give the project a name, and select Create. Optionally enable
Choose folder location (advanced)to set theFolderwhere project files are stored (otherwisenextPYPchooses a default location)Double-click the new project on the Projects page to open it, or use → Open
The newly created project will be empty. A Jobs/Run panel appears on the right
Tip
To skip manual wiring, open the empty project and use Import Workflow to load the corresponding tomography tutorial workflow shipped with nextPYP.
Step 2: Import raw tilt-series¶
Import the raw tilt-series downloaded above ( <1 min)
Click Import Data, open the Tomography tab, and choose Raw Data. This creates a Tomography (from Raw Data) block
Open the Parameters tab (double-click the block on the project page, or use Actions → Edit). Go to the Sources tab:
Click Add path and browse to the directory where you downloaded the raw tilt images
Type
tilt*.mrcin the filter box (lower right) and click on the icon to verify your selection. 12 matches should be displayedClick Choose File Pattern to add the path
If your download includes
*.mdoc(or similar) metadata, setLocation of mdoc fileson the path as neededClick on the Grouping tab
Enable
No movie frames(these are already single-image tilts)Click on the Microscope parameters tab
Set
Pixel size (A)to 2.1Set
Acceleration voltage (kV)to 300
Click Run
After the run finishes, the View tab is populated and a thumbnail is displayed inside the block on the project page. Later runs update the View tab and block thumbnail the same way
Step 3: Pre-processing¶
4 min - Movie frame alignment, CTF estimation and tomogram reconstruction
Click on
Tilt-series(output of the Tomography (from Raw Data) block) and select Pre-processing. The new block appears on the project pageOpen the Parameters tab:
(There is no Frame alignment tab here because import enabled
No movie frames.) SetMax resolution (A)to 5.0Click on the Tilt-series alignment tab
Uncheck
Reshape tilt-images into squaresClick on the Tomogram reconstruction tab
Set
Tomogram thickness (unbinned voxels)to 3072Set
Binning factorto 12Check
Erase fiducialsClick on the Resources tab
Set
Split, Threadsto 11Set other runtime parameters as needed (see Computing resources)
Click Run. Follow the status of the run on the Jobs tab. On that tab, open cluster logs with the control next to a job (tabs such as Launch, Split, and Merge); logs dock at the bottom — maximize with and restore with
Step 4: Particle picking¶
Particle detection from tomograms ( 2 min)
Click on
Tomograms(output of the Pre-processing block) and select Particle picking. The new block appears on the project pageOpen the Parameters tab. Go to the Particle detection tab:
Set
Detection methodtosize-basedSet
Particle radius (A)to 80Set
Threshold for contamination detectionto 2.0Set
Minimum contamination size (voxels)to 60Set
Minimum distance between particlesto 2Check
Local refinementSet
Z-axis detection range (binned slices)to 40Set
Particle detection thresholdto 2
Click Run
Open the Particle picking block (View tab) to inspect the coordinates
Note
In this tutorial, we use the size-based method for particle detection. Other methods are available, including manual, geometry-based, and neural network-based picking, and molecular pattern mining.
Step 5: Reference-based refinement¶
Reference-based particle alignment ( 14 hr)
Click on
Particles(output of the Particle picking block) and select Reference-based refinement. The new block appears on the project pageOpen the Parameters tab. Go to the Sample tab:
Set
Molecular weight (kDa)to 2000Set
Particle radius (A)to 150Click on the Particle extraction tab
Set
Box size (pixels)to 64Set
Image binningto 4Uncheck
Skip gold fiducialsCheck
Invert CTF handednessClick on the Particle scoring function tab
Set
First tilt for refinementto 15Set
Last tilt for refinementto 25Set
Max resolution (A)to 22.0Click on the Reference-based refinement tab
Specify the location of the
Initial model (*.mrc)by clicking on the icon , navigating to the folder where you downloaded the data for the tutorial, and selecting the file EMPIAR-10304_init_ref.mrcSet
Particle rotation Phi range (degrees),Particle rotation Psi range (degrees)andParticle rotation Theta range (degrees)to 180Set
Rotation step (degrees)to 6.0Set
Particle translation range (A)to 50Click on the Reconstruction tab
Check
Show advanced optionsSet
Max tilt-angle (degrees)to 50Set
Min tilt-angle (degrees)to -50Click on the Resources tab
Set
Split, Threadsto the maximum allowable by your system
Click Run
One round of refinement and reconstruction will be executed. Open the block’s View tab to see the results
Step 6. Filter particles¶
Identify duplicates and particles with low alignment scores ( 3 min)
Click on
Particles(output of the Reference-based refinement block) and select Particle filtering. The new block appears on the project pageOpen the Parameters tab. Go to the Particle filtering tab:
Specify the location of
Input parameter file (*.bz2)by clicking on the icon and selecting the file tomo-reference-refinement-*_r01_02.bz2Set
Score thresholdto 15Set
Min distance between particles (unbinned pixels/voxels)to 20Set
Lowest tilt-angle (degrees)to -7Set
Highest tilt-angle (degrees)to 7Check
Generate reconstruction after filteringCheck
Permanently remove particles
Click Run. You can see how many particles were left after filtering by looking at the job logs.
Step 7. Fully constrained refinement¶
Tilt-geometry parameters and particle poses are refined in this step ( 10 min)
Click on
Particles(output of the Particle filtering block) and select 3D refinement. The new block appears on the project pageOpen the Parameters tab. Go to the Particle extraction tab:
Set
Box size (pixels)to 256Set
Image binningto 1Click on the Particle scoring function tab
Set
Max resolution (A)to 18:14Click on the Refinement tab
Select the location of the
Initial parameter file (*.bz2)by clicking on the icon and selecting the filetomo-fine-refinement-*_r01_clean.bz2Set
Last iterationto 3Check
Refine tilt-geometryCheck
Refine particle alignmentsSet
Particle translation range (A)to 30.0Click on the Reconstruction tab
Check
Apply dose weightingCheck
Global weights
Click Run to execute three rounds of refinement and reconstruction
Open the View tab of the 3D refinement block to inspect the results
Step 8: Create shape mask¶
Use most recent reconstruction to create a shape mask ( <1 min)
Click on
Particles(output of 3D refinement block) and select Masking. The new block appears on the project pageOpen the Parameters tab. Go to the Masking tab:
Select the
Input map (*.mrc)by clicking on the icon and selecting the file tomo-new-coarse-refinement-*_r01_03.mrcSet
Threshold for binarizationto 0.4Set
Width of cosine edge (pixels)to 8
Click Run to run the job
On the Masking block, open , choose Show filesystem location (or Copy filesystem location), and copy the path for the next step
Open the View tab of the Masking block to inspect the results of masking
Step 9. Region-based local refinement¶
Constraints of the tilt-geometry are applied over local regions ( 25 min)
Click on
Particles(output of 3D refinement block) and select 3D refinement. The new block appears on the project pageOpen the Parameters tab. Go to the Particle scoring function tab:
Set
First tilt for refinementto 18Set
Last tilt for refinementto 22Set
Max resolution (A)to 18:14:12:10:8:6:5Set
Masking strategyto from fileSpecify the location of the
Shape mask (*.mrc)produced in Step 8 by clicking on the icon , navigating to the location of the Masking block by copying the path we saved above, and selecting the file frealign/maps/mask.mrcClick on the Refinement tab
Select the location of the
Initial parameter file (*.bz2)by clicking on the icon and selecting the filetomo-new-coarse-refinement-*_r01_03.bz2Set
Last iterationto 5Set
Number of regionsto 8,8,2
Click Run to run the job
Open the View tab of the 3D refinement block to inspect the results
Step 10: Particle-based CTF refinement¶
Per-particle CTF refinement using most recent reconstruction ( 2 hr)
Click on
Particles(output of 3D refinement block) and select 3D refinement. The new block appears on the project pageOpen the Parameters tab. Go to the Particle scoring function tab:
Set
First tilt for refinementto 15Set
Last tilt for refinementto 25Set
Max resolution (A)to 4.5Click on the Refinement tab
Select the location of the
Initial parameter file (*.bz2)by clicking on the icon and selecting the filetomo-new-coarse-refinement-*_r01_05.bz2Uncheck
Refine tilt-geometryUncheck
Refine particle alignmentsCheck
Refine CTF per-particleSet
Defocus 1 range (A)andDefocus 2 range (A)to 2000.0
Click Run
Open the View tab of the 3D refinement block to inspect the results
Step 11: Region-based refinement after CTF refinement¶
Constraints of the tilt-geometry are applied over local regions ( 20 min)
Click on
Particles(output of 3D refinement block) and select 3D refinement. The new block appears on the project pageOpen the Parameters tab. Go to the Particle scoring function tab:
Set
First tilt for refinementto 18Set
Last tilt for refinementto 22Set
Max resolution (A)to 18:14:12:10:8:6:5:4.5:6:5:4.5Click on the Refinement tab
Select the location of the
Initial parameter file (*.bz2)by clicking on the icon and selecting the filetomo-new-coarse-refinement-*_r01_02.bz2Set
Last iterationto 12Check
Refine tilt-geometryCheck
Refine particle alignmentsUncheck
Refine CTF per-particleSet
Number of regionsto 16,16,4Set
Optimizer - Max step lengthto 20.0Click on the Reconstruction tab
Set
Frame weight fractionto 2
Click Run to run the job
Open the View tab of the 3D refinement block to inspect the results
Step 12: 3D classification¶
Constrained classification ( 3 hr)
Click on
Particles(output of the last 3D refinement block) and select 3D classification. The new block appears on the project pageOpen the Parameters tab. Go to the Classification tab:
Select the location of the
Initial parameter file (*.bz2)by clicking on the icon and selecting the file tomo-new-coarse-refinement-*_r01_12.bz2Set
Last iterationto 20Set
Number of classesto 8Uncheck
Refine particle alignmentsClick on the Reconstruction tab
Specify the location of the
External weightsby clicking on the icon and selecting the filefrealign/weights/global_weight.txtfrom the file location of the previous block
Click Run
Open the View tab of the 3D classification block to inspect the results
Tip
Click on the round blue markers (top right of the page) to inspect different classes or go to the Class view or Classes Movie tabs to show all classes simultaneously
Info
Running times were measured running all tilt-series in parallel on nodes with 124 vCPUs, 720GB RAM, and 3TB of local SSDs