https://www.dynamo-em.org//w/index.php?title=Starters_guide_(EMBO2021)&feed=atom&action=historyStarters guide (EMBO2021) - Revision history2024-03-29T02:19:22ZRevision history for this page on the wikiMediaWiki 1.34.0https://www.dynamo-em.org//w/index.php?title=Starters_guide_(EMBO2021)&diff=4228&oldid=prevStefano Scaramuzza at 14:17, 13 September 20212021-09-13T14:17:39Z<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 14:17, 13 September 2021</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l100" >Line 100:</td>
<td colspan="2" class="diff-lineno">Line 100:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==Alignment projects==</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==Alignment projects==</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Iterative alignment of subtomograms to their average is performed by ''dynamo'' projects that you can run in various high-performance computational environments. To run an alignment project you need the particles, an initial reference and a table. All of these files we generated before. <del class="diffchange diffchange-inline">Start </del>the alignment project GUI by typing</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Iterative alignment of subtomograms to their average is performed by ''dynamo'' projects that you can run in various high-performance computational environments. To run an alignment project you need the particles, an initial reference and a table. All of these files we generated before. <ins class="diffchange diffchange-inline">You can close all the previous GUIs and start </ins>the alignment project GUI by typing</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> <tt> dcp</tt></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> <tt> dcp</tt></div></td></tr>
</table>Stefano Scaramuzzahttps://www.dynamo-em.org//w/index.php?title=Starters_guide_(EMBO2021)&diff=4180&oldid=prevStefano Scaramuzza: /* Alignment projects */2021-09-06T15:04:35Z<p><span dir="auto"><span class="autocomment">Alignment projects</span></span></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 15:04, 6 September 2021</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l127" >Line 127:</td>
<td colspan="2" class="diff-lineno">Line 127:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[File:StartersGuideFigure10.png|thumb|center|600px|]]</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[File:StartersGuideFigure10.png|thumb|center|600px|]]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Click on ''Computing environment'' and select ''standalone''. Set ''CPU cores'' and ''parallelize averaging step'' to the maximum available (see the [[EMBO_workshop_2021 | workshop page]] to check how many processors you have). Leave the rest as it is and click ''ok''. In the alignment GUI click ''check'' and ''unfold''. To run the project open a new terminal (in a new tab), load ''Dynamo'' <del class="diffchange diffchange-inline">(</del>but do not run it) and run the project by typing <tt>./drun1.exe</tt>.</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Click on ''Computing environment'' and select ''standalone''. Set ''CPU cores'' and ''parallelize averaging step'' to the maximum available (see the [[EMBO_workshop_2021 | workshop page]] to check how many processors you have). Leave the rest as it is and click ''ok''. In the alignment GUI click ''check'' and ''unfold''. To run the project open a new terminal (in a new tab), load ''Dynamo'' but do not run it <ins class="diffchange diffchange-inline">(see [[EMBO_workshop_2021 | workshop page]] on how to load/run ''Dynamo''</ins>) and run the project by typing <tt>./drun1.exe</tt>.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>While the project is running, go back to the terminal with ''Dynamo'' running and you can monitor the progress of the alignment project by typing:</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>While the project is running, go back to the terminal with ''Dynamo'' running and you can monitor the progress of the alignment project by typing:</div></td></tr>
</table>Stefano Scaramuzzahttps://www.dynamo-em.org//w/index.php?title=Starters_guide_(EMBO2021)&diff=4177&oldid=prevStefano Scaramuzza at 14:45, 6 September 20212021-09-06T14:45:23Z<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 14:45, 6 September 2021</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l127" >Line 127:</td>
<td colspan="2" class="diff-lineno">Line 127:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[File:StartersGuideFigure10.png|thumb|center|600px|]]</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[File:StartersGuideFigure10.png|thumb|center|600px|]]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Click on ''Computing environment'' and select <del class="diffchange diffchange-inline">your computing environment (choose </del>''standalone'' <del class="diffchange diffchange-inline">if you are working on the standalone version during a workshop)</del>. Set ''CPU cores'' and ''parallelize averaging step'' to the maximum available (<del class="diffchange diffchange-inline">e.g., 24</del>). Leave the rest as it is and click ''ok''. In the alignment GUI click ''check'' and ''unfold''. To run the project</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Click on ''Computing environment'' and select ''standalone''. Set ''CPU cores'' and ''parallelize averaging step'' to the maximum available (<ins class="diffchange diffchange-inline">see the [[EMBO_workshop_2021 | workshop page]] to check how many processors you have</ins>). Leave the rest as it is and click ''ok''. In the alignment GUI click ''check'' and ''unfold''. To run the project <ins class="diffchange diffchange-inline">open a new terminal (in a new tab), load ''Dynamo'' (but do not run it) and run the project by typing <tt>./drun1.exe</tt>.</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">* in a Matlab session, you can just click on “run”. </del></div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>While the project is running, <ins class="diffchange diffchange-inline">go back to the </ins>terminal with ''Dynamo'' running and you can monitor the progress of the alignment project by typing:</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">* in a standalone project it is more convenient to open a new terminal, load ''Dynamo'' (but do not run it) and run the project by typing <tt>./drun1.exe</tt>.</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>While the project is running, <del class="diffchange diffchange-inline">open another Matlab window (or in standalone open another </del>terminal with ''Dynamo'' running<del class="diffchange diffchange-inline">) </del>and you can monitor the progress of the alignment project by typing:</div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> <tt>dvstatus drun1</tt></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> <tt>dvstatus drun1</tt></div></td></tr>
</table>Stefano Scaramuzzahttps://www.dynamo-em.org//w/index.php?title=Starters_guide_(EMBO2021)&diff=4176&oldid=prevStefano Scaramuzza: Created page with "This tutorial shows how to manually pick particles in a tomogram, extract them, align and classify them. This tutorial is a shortened version of the original Starters_guide..."2021-09-06T14:40:00Z<p>Created page with "This tutorial shows how to manually pick particles in a tomogram, extract them, align and classify them. This tutorial is a shortened version of the original Starters_guide..."</p>
<p><b>New page</b></p><div>This tutorial shows how to manually pick particles in a tomogram, extract them, align and classify them. This tutorial is a shortened version of the original [[Starters_guide | starters guide]] that was adapted for the use in ''Dynamo'' workshops.<br />
<br />
=Manual particle picking and ''Dynamo'' catalogues=<br />
The ''Dynamo'' catalogues are databases that manage tomograms and link the tomographic data to the extracted particles. Start the catalogue manager by typing the command:<br />
<br />
<tt>dcm</tt><br />
After the catalogue manager opens, we create 3 synthetic tomograms that include our particles (thermosomes) in the following way:<br />
<br />
[[File:StartersGuideFigure1.png|thumb|center|600px| Figure 1: creating a set of synthetic tomograms with ''Dynamo'' Catalogue Manager]]<br />
<br />
You can see the list of your tomograms and their metadata in a table in the bottom of your catalogue manager. When workin on your own projects, you can add tomograms to the catalogue by ''Catalogue -> Browse for new volume''. The tomograms are situated in the directory <tt>testCatalogue</tt>. They contain a small amount of noise and a missing wedge associated to rotation around Y-axis. We added the information about location of the particles in the tomograms in an additional catalogue called <tt>testCatalogue_withmodels</tt>. If needed, it can be opened from the current folder with ''Catalogue -> look for local catalogues'' in the catalogue manager window.<br />
<br />
==Viewing tomograms==<br />
Select the first tomogram in the list and go to ''View volume>Full tomogram file in tomoslice''. <br />
<br />
[[ File:StartersSelectTomoSliceInCatalogue.png |thumb| center |600px| Figure 2: Selecting a volume in the catalogue manager to be inspected in <tt>dpreview</tt>]]<br />
<br />
The volume browser tomoslicer loads the entire tomograms into memory and allows making annotations to the regions of interest. The tomograms in this tutorial are small, and you can load them directly into memory. For real life tomograms, bear in mind that you will need to [[Prebinned tomograms| prebin]] the files before loading them into memory. Tomoslice has a simple set of controls and is suitable for visualization tasks that require oblique sections through the tomogram. It uses the same tool as other ''Dynamo'' browsers to keep track of your annotations: a pool of models. You might need to adjust the contrast (blue arrow). To move through the tomogram slices, you can either use the mouse wheel, click and drag the tomogram slice up and down (orange arrows), or move the position control left and right (orange box).<br />
<br />
<br />
[[ File:StartersTomoSlice.png |thumb| center |600px|]]<br />
<br />
==Picking and extracting particles in tomograms==<br />
Coordinates of picked particles are represented by data types called models. In the tomoslicer window go to ''Model Pool -> Create new model in pool (choose type) -> General''. This is the simplest type of [[model]] where each clicked/model point corresponds to a single isolated particle. Now you can navigate up and down the tomogram, place the mouse on the center of a particle and press the [c] key on your keyboard to add a new model point. (Note the ''Help -> all hot keys'' options that lists the different the actions of the different keystrokes). Backspace button deletes the last clicked point (you can also use the right-click to delete single points).<br />
<br />
[[File:StartersGuideFigure4.png|thumb|center|600px| Generating a new model]]<br />
<br />
After you are done clicking about 10 particles click on ''Active model > Update Crop points'' in the tomoslice window.<br />
<br />
<br />
[[File:StartersGuideUpdate.png|thumb|center|600px|]]<br />
<br />
Save the model into the catalogue by ''Active model -> Save active model into catalogue (disk)'' and close the slicer window.<br />
<br />
[[File:StartersGuideFigure6.png|thumb|center|600px| ]]<br />
<br />
Pick particles for tomograms 2 and 3. In total, there are around 30-40 particles in the generated dataset. When you open a new tomogram, make sure that you delete the pool of models from memory when asked. This will have no effect onto the models stored in disk, and it is necessary in order to ensure that you are not mixing models from different tomograms.<br />
<br />
==An alternate visualization: orthogonal projections==<br />
<br />
Clicking in the menu on ''Projection -> project full shown fragment along z'' (still in dtmslice) and you will get a screen where the x-y projection of the tomogram is shown. Use the secondary click on it to launch the orthogonal views of x-z and y-z planes that traverse that point. These views can also be used to click particles, in case the standard view is not sufficient.<br />
<br />
{|style="margin: 0 auto;"<br />
| [[File:orthoPickMain.png|thumb|upright|250px| click on the main projection determines two orthogonal slices]]<br />
| [[File:orthoPickX.png|thumb|upright|250px| Slice xz ]]<br />
| [[File:orthoPickY.png|thumb|upright|250px| Slice xy]]<br />
|}<br />
<br />
=Extracting particles from tomograms=<br />
In the catalogue manager window select the rows for tomograms from which you want to extract particles from. You can either select them one by one with a mouse click and holding the [ctrl] key or by clicking the ''Select all'' button. Then, go to ''Crop Particles -> Open Volume List Manager''.<br />
<br />
[[File:StartersGuideopenVolumeList.png|thumb|center|600px|]]<br />
<br />
A new window opens with all the models in the catalogue listed in the bottom. Pick (by checking boxes) the models of type ''general'' that you have just clicked. Click ''Create list'' and then ''Crop particle''.<br />
<br />
[[File:StartersGuideSelectModels.png|thumb|center|600px|]]<br />
<br />
In the new window, change the data name to something meaningful, such as ''thermosomeParticles'', change the sidelength from 32 to 48 and click start cropping.<br />
<br />
[[File:StartersGuideCrop.png|thumb|center|600px|]]<br />
<br />
After cropping is done, explore your cropped particles by clicking ''ddbrowse'' (in the window above). A new window opens where you can simply click on ''show''.<br />
<br />
[[File:StartersGuideShow.png|thumb|center|500px|]]<br />
<br />
You see a 2D representation (projections) of all cropped 3D subtomograms. Make sure your particles are well centered and fit the box.<br />
<br />
[[File:StartersGuideParticles.png|thumb|center|500px|]]<br />
<br />
We also introduce the concept of the ''dynamo'' table: The information about each particle is stored in tables. Each particle has an entry in the table that contains shifts and rotations to describe its orientation (by default these values are initialized as zeroes). It also contains the particle ID (tag), the orientation of the missing wedge and others. For full info type the command <tt>dthelp</tt>. The ''Dynamo'' catalogue generates an initial table during particle extraction. Its location is in <tt>particles/crop.tbl </tt>. <br />
<br />
=Subtomogram alignment and averaging=<br />
<br />
==Initial reference generation==<br />
We want to align the extracted tomograms to a common reference. For that, we need an initial reference (which will later be refined during the iterative alignment). Here, we create such an initial reference by manually align a few particles and average them. We use the command <tt>dgallery</tt> to generate initial orientations for some of our particles that will be used to generate the initial reference. Close all open ''Dynamo'' windows and type into the ''Dynamo'' command line:<br />
<br />
<tt>dgallery('data','thermosomeParticles.Data');</tt><br />
<br />
The gallery opens. Click on ''load'' to load all aprticles in memory, move the ''shown'' bar to display the particles and use the x-, y- and z-buttons to see different views:<br />
<br />
[[File:StartersGuideGallery.png|thumb|center|600px|]]<br />
<br />
To manually align the particles, do the following for about 10 particles:<br />
# Place the mouse over the particle center and press the key [c] (this centers the particle).<br />
# Place the mouse over its top (or bottom) part and press the key [n] (this aligns the particle).<br />
# Click on the particle to make sure its number turns from red to blue (blue means it is selected for further processing). To de-select a particle use the right-click.<br />
Change between the x-, y- and z-views to correct the orientations if necessary. This is just done to create an initial reference, so orientations don't need to be very exact.<br />
<br />
[[File:StartersGuideGallery2.png|thumb|center|500px|]]<br />
<br />
Save the selected tags and corresponding table by clicking ''quick save'' button in the top right. It saves a quickbuffer.tbl and quickbuffer.tags to the hard drive that will be used later. To generate the average you need to apply the table on the particles. For this click the ''average'' button in the Particle selection field.<br />
<br />
[[File:StartersGuideGallery3.png|thumb|center|500px|]]<br />
<br />
It opens a new window with a lot of controls. Click ''compute average'' in the bottom of the window. Then, right-lick on the output filename and click ''ok'' in the next window to see the result. If you are not satisfied with the result, close the window and refine your manual alignment and/or add more particles to the average.<br />
<br />
[[File:StartersGuideGallery4.png|thumb|center|600px|]]<br />
<br />
[[File:StartersGuideGallery5.png|thumb|center|500px|]]<br />
<br />
==Alignment projects==<br />
Iterative alignment of subtomograms to their average is performed by ''dynamo'' projects that you can run in various high-performance computational environments. To run an alignment project you need the particles, an initial reference and a table. All of these files we generated before. Start the alignment project GUI by typing<br />
<br />
<tt> dcp</tt><br />
<br />
In thw new window, do the following:<br />
# Add the project name ''drun1'', press the ''enter'' key and select ''create a new project'' in the pop-up window.<br />
# Click on ''particles'' and provide the particle folder name ''thermosomeParticles.Data''. Click ok.<br />
# Click on ''table'' and provide the table name ''thermosomeParticles.Data/crop.tbl''. Click ok.<br />
# Click on ''template'' and provide the initial reference name ''my_average.em''. Click ok.<br />
# Click on ''masks'' and simply click on ''use default masks''. Click ok. You could also specify the semi-axis of the ellipsoid masks or go to “Mask editor” to make more sophisticated masks. Note that ''Dynamo'' by default uses Rossman correlation which eliminates the artefacts associated with hard (non-soft) mask. <br />
<br />
[[File:StartersGuideAli1.png|thumb|center|500px|]]<br />
<br />
Click on ''numerical parameters'' to set all parameters and details about the different iterations of the alignment project. You can select any parameter in the table with a mouse and click the ''?'' button on the top right of the parameter window to see a description of the parameters. The most important parameters to consider are:<br />
<br />
* ''Number of iterations'': Make 3 rounds with 2 iterations each. The first round will be a global search with a coarse angular step and the following rounds will be used for refinement.<br />
* ''Angular search ranges'': Cone aperture is the scan range for the first two Euler angles around the initial orientation defined in the table. 360 degrees is the full scan range. Azimuth rotation range defines the rotation range around the new vertical axis of the particle.<br />
* ''High- and lowpass values'': Fourier voxels to limit the used frequency range.<br />
*''Particle dimensions'': Defined as sidelength of your subvolume. If you put a lower value, the particles will be downsampled for the particular round. This will speed up the process.<br />
* ''Refine'': After each angular scan, the search step is reduced by the ''refine factor''. This is repeated ''refine'' times. I.e., if your cone sampling is 10 degrees, ''refine'' is 3 and ''refine factor'' is 2, then 10, 5, 2.5 and 1.25 degrees will be sampled. This is the optimization of angular search space.<br />
*''Shift limits'': Limits the translation of particles from the center of the box (if shifts limiting way is 1) or from the previously estimated center (if shifts limiting way is 2). The previous estimates for the shifts and rotations are taken from input tables and are updated at the end of each iteration.<br />
*''Symmetry'': If you know the symmetry of your protein it will speed up the convergence and result in higher resolution.<br />
<br />
Set the parameters as follows and click ''ok'':<br />
<br />
[[File:StartersGuideFigure10.png|thumb|center|600px|]]<br />
<br />
Click on ''Computing environment'' and select your computing environment (choose ''standalone'' if you are working on the standalone version during a workshop). Set ''CPU cores'' and ''parallelize averaging step'' to the maximum available (e.g., 24). Leave the rest as it is and click ''ok''. In the alignment GUI click ''check'' and ''unfold''. To run the project<br />
<br />
* in a Matlab session, you can just click on “run”. <br />
* in a standalone project it is more convenient to open a new terminal, load ''Dynamo'' (but do not run it) and run the project by typing <tt>./drun1.exe</tt>.<br />
<br />
While the project is running, open another Matlab window (or in standalone open another terminal with ''Dynamo'' running) and you can monitor the progress of the alignment project by typing:<br />
<br />
<tt>dvstatus drun1</tt><br />
<br />
While the project is running, you can look at projections of the intermediate results by typing:<br />
<br />
<tt>ddb drun1:a:ite=* -j c10</tt><br />
<br />
or at the latest average by typing:<br />
<br />
<tt>ddb drun1:a -v </tt><br />
<br />
The final result should look similar to:<br />
<br />
[[File:StartersGuideResultsAlignment.png|thumb|center|400px| Results of alignment.]]<br />
<br />
<br />
=Subtomogram classification=<br />
To demonstrate a classification example we provide particles with 2 slightly different sizes. We can then classify them with a simple Multi-reference Analysis (MRA). To do that, we first generate a dataset which has 2 populations of particles. For this, type:<br />
<br />
<tt>dynamo_tutorial('data_classification','M',8,'N',8);</tt><br />
<br />
It generates two sets of particles, 8 particles in each including their table. The idea behind [[Multireference Analysis|MRA]] is the following: The particles are aligned to several references (here only 2). After each iteration, each particle is assigned to only one single reference where it fits the best. This procedure is repeated iteratively. Similar particles will have higher correlation to similar references and will eventually group together. For classification into N classes we will need N initial references and N initially identical tables.Follow these steps to run the MRA:<br />
<br />
# Create a new project by typing “drun2” in the project name of the alignment GUI.<br />
# Set number of references to 2.<br />
# Activate the ''Swap particles'' button.<br />
# Go to ''particles'' and add <tt>data_classification/data</tt> to the particle data. Click ok.<br />
# Go to ''table'' and type <tt>data_classification/real.tbl</tt> into the field ''clone this'' and press ''copy''. Click ok.<br />
# Go to ''template'' and clone <tt>data_classification/original_template.em</tt> with addition of some extra noise with amplitude 1. <br />
# Click on ''masks'' and click on ''use default masks''. Click ok.<br />
# Click on ''numerical parameters'' and set the following parameters. Click ok.<br />
<br />
[[File:StartersGuideResultsClassification2.png|thumb|center|400px|]]<br />
<br />
Choose the same computing environment as in the previous alignment project and run the project in the same way too. MRA projects usually run longer, because each particle will be aligned to two references. Here, however, we chose the parameters in a way that the process is still fast (e.g., small dimensions). Monitor the progress of the project same as before:<br />
<br />
<tt>dvstatus drun2</tt><br />
<br />
And visualize the results using the command:<br />
<br />
<tt>ddb drun2:a:ref=* -j c5</tt><br />
<br />
You should get two averages with particle in one slightly class larger than in the other.<br />
<br />
[[File:StartersGuideResultsClassification.png|thumb|center|600px| Results of classification.]]</div>Stefano Scaramuzza