Extracting Subtomograms
In this part, we will familiarize ourselves with STOPGAP's approach to generating a parameter file using a parser, then running that file. STOPGAP jobs are run by using a task-specific parser script (named stopgap_*_parser.sh) to generate a parameter file (named *_param.star) and then running that parameter file using the run_stopgap.sh script.
The first STOPGAP task we will perform is extracting subtomograms.
Preparing Extraction Parameter File
With the lists and run script prepared, we are now ready to extract our subtomograms.
-
Open
stopgap_extract_parser.shin a text editor. -
There are four blocks of options here: "Parser Options" which contains the path to the output parameter file; "Folder Options" which provides paths to folders; "File options" which are the input files for extraction; and "Extraction Parameters" which are settings for the output subtomograms.
-
In the Parser Options, the default
param_nameis fine. -
Under Folder options, update the rootdir to the absolute path of the
init_ref/directory. The other directory parameters can be left alone; they are overrides to the standard STOPGAP structure. -
Under File options, update the lists.
-
motl_name='allmotl_tomo1_obj1_1.star' -
wedgelist_name='wedgelist.star' -
tomolist_name='sg_tomolist.txt'
Since these are all lists, they are assumed to be in the listdir.
NOTE: since we are providing a tomolist,
tomodiris ignored and can be left as'none'. -
-
Set the extraction parameters. The default subtomo_name is
'subtomo'. Forboxsize,32should be sufficient here. Setpixelsizeto10.8since we binned our 1.35 Å pixels by a factor of 8. Foroutput_format, we find that'mrc8'works well, this saves the subtomogram as an 8-bit .mrc file.NOTE: While 8-bit only provides 256 gradations, we generally find this is sufficient for the local information contained within a subtomogram. During extraction, the subtomogram is cropped and its values are floated between 0 and 255, rounded, and saved.
-
Save and close the file. Run in the terminal.
./stopgap_extract_parser.sh
This will generate a new parameter file in the params/ folder.
Feel free to preview it if you're curious.
Preparing to Run STOPGAP with MPI
-
Open
run_stopgap.shin any text editor, for example, gedit using a terminal window:gedit run_stopgap.shThe main parameters here are the "run options" which manage parallelization and the "directories" block, which manages directories and paths.
-
For parallelization parameters, set
run_typeto'local',nodesto1,n_coresto1, andcopy_localto0. The rest of the run options are SLURM-specific and can be ignored. -
Set
rootdirto the absolute path of yourinit_ref/folder (e.g.~/HIV_dataset/subtomo/init_ref/). We will updateparamfilenamebefore running each job.NOTE: Remember to end your
rootdirpath with a/! -
Set
paramfilenametoparams/extract_param.star. Save the file and run STOPGAP by runningrun_stopgap.shin a terminal../run_stopgap.shNOTE: STOPGAP is setup here to run through the stopgap_watcher, which is a separate program to track STOPGAP progress. This is not required; for running on clusters where programs are not allowed to be run on submission nodes, stopgap_watcher can be run on any computer that has access to the working directory.