4d — Datasets

Single-particle processing on the whole project, while the data come in · 4d User Manual

← Back to the Datasets tab · Manual Processing page · Export tab

Datasets — the particles of all images, processed together

The scripts of the Manual Processing tab work on one image at a time. The Datasets tab holds the steps that work on the project as a whole: they gather the particles that the single-particle step picked and extracted from the images, and run RELION on them — a 2D classification that keeps pace with the data collection, and an initial 3D model made from the best classes. The idea is to see, while the microscope is still running, whether the particles are what they should be and whether the session is worth continuing.

The tab is one window for the whole project; there are no per-image sub-tabs. Its scripts run in the project's merge/ directory and write into the dataset directory below it, named by the parameter dataset_dir (default MERGING). The ? button at the top right of the window opens this page; the ? next to each script in the list opens that script's own page.

The numbered markers on the screenshot point to each region; the legend that follows explains them.

The Datasets tab after a run of the RELION 2D classification, with numbered regions 1 2 3 4 5 6 7 8 9 10 11 12

The tab after a run of the RELION 2D classification with three iterations: the Images pane lists the class averages of every iteration, and the File Preview shows the tiled averages of the last one. The relaunch fields are set to a run every 60 minutes, 24 times.

#RegionWhat it is and does
1Script categoriesTasks — the steps below, numbered in the order they are meant to be run — and Utility, with an inventory of the files in merge/ and the older C-shell version of the STAR-file step.
2Script listThe scripts of the category, each with its language icon and a ? that opens its manual page. The column can be widened by dragging its right edge. Below it, the dependent scripts: the helpers of scripts/proc/ the selected script uses, e.g. StarFileGenerator.sh.
3Script nameThe title of the selected script and its file name.
4Relaunch fieldsLaunch Y times, with Relaunch every X minutes below it for more than one run — turns a run into a series; see below.
5Run and ReloadThe Run/Stop button (it shows the number of the current run of a series) and Reload & save results. A progress bar fills the title while a script runs.
6Manual sectionThe selected script's own help text; its ? opens the script's manual page. The Show manual and Advanced parameters toggles above it work as in the Manual Processing tab, and so do the divider below it and the buttons on its title line (The Manual panel).
7ParametersThe script's parameters, grouped into sections; the RELION settings are among the advanced ones. Values are project-wide.
8OutputThe live log of the running script, with the verbosity slider and the wrapping toggle. During a series, the runs' logs follow each other.
9ResultsThe values the script wrote back.
10ImagesThe result files of all runs so far, labelled with iteration and run number; red marks the important ones, the ★ toggle shows those only.
11File PreviewThe selected result: here the tiled class averages, a 2D MRC image shown flat with the contrast and brightness sliders; initial_model.mrc of the 3D step opens in the volume viewer.
12HelpThe ? button opens this page.

Everything but the relaunch fields is described region by region on the Manual Processing page. The tab is shown in every project mode except Fibril picking.

Launch Y times, relaunch every X minutes

A classification that is meant to follow the data collection has to be run again and again, each time on the images collected so far. Instead of pressing Run every quarter of an hour, let the tab do it: the pulldown next to the Run button turns a single run into a series of runs.

FieldMeaning
Launch Y times A pulldown with the number of runs in all, the first one included: 1, 2, 3, 4, 5, 10, 20, 50, 100 or ∞. Launch 1 time (the default) runs the script once, as the Run button does everywhere else. With Launch ∞ times the runs go on until you stop them.
Relaunch every X minutes Shown below the pulldown when it is set to more than one run. The time from the start of one run to the start of the next (default 20). A run that takes longer than X minutes is followed by the next one as soon as it has finished; the runs never overlap.

How a series goes. Press Run: the first run starts at once. The Run button shows the number of the current run on its icon, and its tooltip reads Run 2 of 5 (or Run 2 (no limit)). When a run ends, the Output panel notes Run 2 finished. The next run starts at 14:35:00., and the button stays pressed while the tab waits for that time. The series keeps going when you select another script or switch to another tab; the Run button follows it. Click the button to stop: a run in progress is halted, a wait is cancelled, and no further run starts.

Both settings can be changed while a series goes on. The new values are taken at the end of the current run, so lowering Y to the number of the run now going or below it (Launch 1 time, say) ends the series after that run, and raising it extends the series. The two values are remembered with the project; a number of runs set before the pulldown that is not one of its entries is taken up to the next larger one.

What the scripts make of it. The run number reaches a script as the variable run_iteration_number: 1 for the first run of a series (and for a single run), 2 for the second, and so on. The two RELION steps use it:

The relaunch fields are offered where a script module asks for them (relaunch=true in its module.ini); of the modules shipped with 4d that is the Datasets tab. Everywhere else, Run runs once.

The scripts

CategoryScriptWhat it does
TasksGenerate dataset STAR file core workflow Gathers the particles of every image of the project into one RELION STAR file, particles.star, with the particle stacks linked next to it — the dataset as a whole, for RELION or cryoSPARC outside 4d.
TasksResample Dataset (do not use) experimental Resamples an MRC file to another pixel size by Fourier cropping or padding. Kept from Focus; not working in 4d at present.
TasksRELION 2D Classification core workflow 2D classification of the particles of the most recent images, run by run while the data come in; every finished iteration appears as a tiled image of the class averages.
TasksRELION 3D Reconstruction core workflow An initial 3D model, ab initio, from the particles of the best 2D classes of the last classification, aligned to the symmetry axes and symmetrised.
UtilityImage Inventory Lists the files of merge/ in the Images pane, so that any of them can be opened in the File Preview.
UtilityGenerate dataset STAR file The older C-shell version of the STAR-file step, from Focus.

The usual order

  1. Pick particles on the images with the single-particle step of the Manual Processing or LocalQueue tab. It leaves, in every image directory, the extracted boxes spa_particles.mrc and their coordinates spa_particles.star. The Datasets steps work on these files; an image without them is left out.
  2. RELION 2D Classification with the relaunch fields set, e.g. Launch ∞ times, relaunch every 20 minutes, for as long as the collection runs. Watch the tiled class averages of the last iteration in the File Preview.
  3. RELION 3D Reconstruction once the classes look right. It picks the best classes of the last classification by itself, or takes the class numbers you give it.
  4. Generate dataset STAR file at the end, to take all particles of the session into RELION or cryoSPARC for the real processing.

What the steps need

Files in the dataset directory

Path (under merge/<dataset_dir>/)Written byContents
particles.star, Particles/Generate dataset STAR fileAll particles of the project; Particles/ holds symbolic links <group>_<image>.mrcs to the stacks in the image directories.
Class2D_RealTime/run_NNN/RELION 2D ClassificationOne directory per run: the image list, the STAR file, RELION's run_itNNN_* files, the tiled class averages, and run_output.txt with RELION's own output.
InitialModel/run_NNN/RELION 3D ReconstructionThe chosen classes (selected_classes.txt), their particles, RELION's files, and initial_model.mrc.
InitialModel.oldRELION 3D ReconstructionThe previous series, kept once.