Walkthrough on command line based tilt series alignment

From Dynamo
Revision as of 14:38, 27 August 2019 by Daniel Castaño (talk | contribs)
Jump to navigation Jump to search

This is the command line based version of the GUI based alignment walkthrough

Create the workflow

name = 'hivCommandLine';
folder = 'workflows';
u = dtsa(name,'--nogui','-path',folder,'fp',1); 

Here, we instruct Dynamo to skip opening the GUI. We also create the workflow in a different folder.

Entering the data

The u object contains several areas to interact with the workflow. They can be found by autocompletion using the tab key. Here, we will proceed step by step; remember that you can write all the command lines in a single .m script.

Basic data



If you want to reject some of the hight tilts (or any other view that appears to have been damages,) u.enter.discardedTiltIndices([1,40]);

Acquisition settings


Computation settings


Detection settings

These here are the actual design decisions when running an alignment workflow:

u.enter.settingDetection.beadRadius(16); u.enter.settingDetection.maskRadius(28);


The bin level is mainly used to accelerate the detection procedure. Needs to be chosen in a way that a binned gold bead still can be recognisable as such, with a radius of at least 4 pixels.


Changing generic parameters

Yo can find handles to the parameters of the individuals steps through auto ompletion on the area, then step items.


Running the workflow


On the fly reconstruction of particles

Grep coordinates in the binned tomogram

Open the binned reconstruction with dtmslice dtmslice 'workflows/hivCommandLine.AWF/reconstruction/binnedReconstructionWBP.mrc';

Now we can save the table as a file: write(temp_table,'binnedGoldbeads.tbl');

Cropping the gold bead particles

tomo = 'workflows/workshop.AWF/reconstruction/binnedReconstructionWBP.mrc'; tbl = 'binnedGoldbeads.tbl'; targetBinnedParticles = 'binnedGoldBeads.Data'; sidelength = 32; o = dtcrop(tomo,tbl,target,sidelength);

And then we visualise a projection along z of each cropped particle


Reconstruct particles on the fly

The command that reconstructs full sized particles from an aligned stack is dynama_table_trec. This is an independent function, not part of the workflow, implying that we will need to perform some format conversion.

tbl = dread('binnedGoldbeads.tbl');

We scale the table

alignmentBinLevel = 2;

tblFull = dynamo_table_rescale(tbl,'factor',2^alignmentBinLevel);

source  = 'workflows/new.AWF/align/alignedFullStack.mrc';

We create a data folder to contain the particles reconstructed on the fly.

targetDirectory = 'tempCrop.Data';

if exist(targetDirectory,'dir')==7

   o.e('Deleting directory');


Angles are contained in the

angles =  'workflows/new.AWF/align/reconstructionTiltAngles.tlt';

sidelength = 160;

% % shift tomogram center % % if the binned visualization tomogram would contain a shift % we would have to scale it visualizationTomogram = 'workflows/ hivCommandLine.AWF/reconstruction/binnedReconstructionWBP.mrc'; sizeTomogram = dynamo_read_size(visualizationTomogram); sizeTomogramFull = sizeTomogram*2^alignmentBinLevel;

% % shift tomogram center % % if the binned visualization tomogram would contain a shift % we would have to scale it shiftTomogramCenter = [0,0,0];

% % command executions % dynamo_table_rec(tblFull,source,angles,targetDirectory,sidelength,....


figure;dslices(targetDirectory,'proj','c');shg; disp('done');

autocompletion of user object
autocompletion of further fields of user object
view of tilt lines
dtmslice of binned reconstruction
dtmslice contrast control
dtmslice after contrast correction
create a new model
show a full projection
full projection of binned reconstruction
right click on a point
x view of clicked point
main click to fix the 3d coordinates
click around ten markers
export a table into the matlab workspace
the command line shows the variable name assigned to the created table
dslices on binned gold beads
dslices on full sized gold beads