DHVI workshop (day 1)¶
On this session, we will import raw data from two datasets from the EMPIAR database:
Immature Gag protein from HIV-1 VLPs (EMPIAR-10164)
Spike protein from SARS-CoV-2 virions (EMPIAR-10453)
Session 1 - Data import and pre-processing¶
For this session, we will use the HIV-1 dataset that was collected on a 300kV Titan Krios TEM using a Gatan K2 detector at 1.35A per pixel. Each tilt-series has 41 images recorded between -60 and 60 degrees with a spacing of 3 degrees. Each tilt image was collected as a sequence of 8-10 frames.
Step 1: Create a project
Data processing runs are organized into projects. We will create a new project for this tutorial:
Click on Create new project, give the project a name, and select Create
Select the new project from the Projects page and click Open
The newly created project will be empty and a Jobs panel will appear on the right
Step 2: Import raw tilt-series
Go to Import Data and select the Tomography tab, then Raw Data
On the Sources tab:
Set the
Locationof the raw data by clicking on the icon and browse to /nfs/bartesaghilab/nextpyp/workshop/10164/Type
*.tifinto the filter box (lower right) and click the icon. You should see 123 matches.Click Choose File Pattern to add the path
On the Grouping tab:
Leave
No movie framesunchecked (this dataset has movie frames)
On the Microscope Parameters tab:
Set
Pixel size (A)to 1.35Set
Acceleration voltage (kV)to 300Set
Tilt-axis angle (degrees)to 85.3
The block appears on the Graph immediately. Open Parameters (edits autosave). The block is in the modified state (indicated by the sign) and is ready to run
Click Run on the block status bar to launch the job
You can follow its progress from the Jobs tab of the Jobs/Run panel.
Once the job finishes, click on the image inside the block to see a larger version of the result.
Step 3: Pre-processing
Click on
Tilt-series(output of the Tomography (from Raw Data) block) and select Pre-processingOn the Frame alignment tab:
Grouping was set on the import Grouping tab. Use
unblurforAlignment method(the default).
On the Tilt-series alignment tab
Our
Alignment methodwill be IMOD (fiducials) which is the default so make no changes.
On the CTF determination tab
Set
Max resolutionto 5
On the Tomogram reconstruction tab
Our
Reconstruction methodwill be IMOD, this is the default so make no changes.
On the Resources tab
Set
Split, Threadsto 11
Click Run. Follow the status of the run in the Jobs panel
When the block finishes running, examine the Tilt-series, Plots, Table, and Gallery tabs inside the block.
Session 2 - Tomogram denoising and segmentation¶
For this session, we will use the SARS-CoV-2 dataset that was collected on a 300kV Titan Krios TEM using a Gatan K2 detector. Each tilt-series has 41 images recorded between -60 and 60 degrees with a spacing of 3 degrees. We won’t use movie frames in this case.
Import data and pre-processing¶
Step 1: Import raw tilt-series
Click Import Data and select the Tomography tab, then Raw Data
On the Sources tab:
Set the
Locationby clicking on the icon and browsing to /nfs/bartesaghilab/nextpyp/workshop_dhvi/10453/Type
*.mrcinto the filter box (lower right) and click the icon. You should see 10 matches.Click Choose File Pattern to add the path
On the Grouping tab:
Enable
No movie frames(these are already single-image tilts)
On the Microscope parameters tab:
Set
Pixel size (A)to 1.329Set
Acceleration voltage (kV)to 300Set
Tilt-axis angle (degrees)to 84.8
Click Run on the block status bar.
Step 2: Pre-processing
Click on
Tilt-series(output of the Tomography (from Raw Data) block) and select Pre-processingThere is no Frame alignment tab because import enabled
No movie frames.On the Tilt-series alignment tab:
Disable
Reshape tilt-images into squares
On the CTF determination tab:
Set
Max resolution (A)to 5
On the Tomogram reconstruction tab:
Set
Tomogram thickness (unbinned voxels)to 1536Set
2D filteringto noneEnable
Erase fiducialsEnable
Generate half-tomograms
On the Resources tab
Set
Split, Threadsto 11
Click Run. Follow the status of the run in the Jobs panel
Tomogram segmentation¶
For segmenting tomograms, we will use a pre-trained MemBrain-Seg model that can be directly applied to tomograms produced by the pre-processing block. In addition, we will clean up the segmentation results using geometric criteria.
Step 3: Segmentation
Click on
Tomograms(output of the Pre-processing block) and select Segmentation (pre-trained models)On the Tomogram segmentation tab:
Enable
Pre-process tomogramsSet
Pixel size rescalingto 11Enable
Deconvolution filter
Set
Pre-trained model (*.ckpt)to /nfs/bartesaghilab/membrain-seg-models/MemBrain_seg_v10_alpha.ckptSet
Filter connected componentsto by numberSet
Components to keepto 16
Set
Thickness of slab to keep (unbinned voxels)to 1228Enable
Test time augmentationSet
Sliding window sizeto 96
On the Resources tab (make sure Show advanced options is enabled):
Set
Split, Bundle sizeto 10
Click Run. Follow the status of the run in the Jobs panel
nextPYP can also use the TARDIS package for tomogram segmentation. The workflow is similar, with the exception that some of the parameters are different.
Tomogram denoising¶
For denoising tomograms, we will demonstrate the use of IsoNet2. Unlike segmentation models that can generalize well to different types of data, denoising models typically require re-training to achieve the best performance.
Step 1: Evaluation
Click on
Tomograms(output of the Pre-processing block) and select Denoising (eval)On the Tomogram denoising tab:
Set
Methodto isonet2Set
Trained modelto /nfs/bartesaghilab/nextpyp/workshop_dhvi/10453/isonet_network_isonet2-n2n_unet-medium_96_full.pt
On the Resources tab:
Set
Split, Bundle sizeto 10
Click Run. Follow the status of the run in the Jobs panel
Step 1: Training
Click on
Tomograms(output of the Pre-processing block) and select Denoising (train)On the Tomogram denoising tab:
Set
Methodto isonet2Enable
Use maskingSet
Epochs for trainingto 30Set
Loss functionto HuberSet
CTF modeto “None”Set
B-factorto 200
Set
Epochs for trainingto 30Set
Loss functionto HuberSet
Missing wedge weight in lossto 200Set
B-factorto 200
Click Run. Follow the status of the run in the Jobs panel
Step 2: Evaluation
Click on
Denoising model(output of the Denoising (train) block) and select Denoising (eval)On the Tomogram denoising tab:
Set
Methodto isonet2Set
Trained modelto isonet2/isonet_network_isonet2-n2n_unet-medium_96_full.pt
On the Resources tab:
Set
Split, Bundle sizeto 10
Click Run. Follow the status of the run in the Jobs panel
nextPYP also supports other denoising algorithms, including Topaz-Denoise, IsoNet, Noise2Map, and cryoCARE. The workflow for these algorithms follows a similar sequence of steps to the ones we saw here.
Day 1 summary¶
What we learned today
How to import raw tilt-series data into
nextPYPHow to pre-process tilt-series (frame alignment, tilt-series alignment, tilted CTF estimation)
How to reconstruct tomograms (adjust thickness, erase fiducials, increase contrast)
How to segment tomograms using MemBrain-Seg
How to denoise tomograms using IsoNet2
On day 2 we will demonstrate the use of particle picking tools in nextPYP.