Templates contain your entire analysis, minus the FCS files. They are the most efficient tool for repeated analyses. 

A template is a replica of your workspace file without data.  It preserves groups, gates, table definitions, and layouts and allows all of that to be applied to the next data set.  A template can be created simply by choosing the ‘Export as a template’ option from the File band after analyzing an initial data set.   This will create a .WSPT file in the location you specify.   Templates can be used to apply the complete analysis to any subsequent data sets with a matching set of parameters.

There are several tips that can improve the templates you create.

1) Organize samples into groups

This is the most important part of designing the template.  Individual samples are not preserved in a template, so only gates that have been associated with a group will be retained.  Additional automation can be achieved by ensuring that the ‘Live group’ check box is selected and that criteria have been attributed to define group membership. 



Additional information on creating groups is available on the Creating and Editing Groups page. 

If the group is live and has criteria, when new data are added to the template they will be automatically assigned to all groups with matching criteria, receive the gates associated with those groups, and connect to layouts and tables associated with those groups.  Quality group creation is the key to automation. 


2) Compensation is independent of the template

Compensation matrices will vary from experiment to experiment, even if the same panel has been used.  For that reason, we do not include compensation matrices as part of a template.  If gates, graphs or statistics reference the compensated version of collected parameters and uncompensated data are added to the template, none of the group associated gates will appear until the data are compensated.  If you encounter this, simply compensate the data in FlowJo and the gates will automatically appear on the data once compensation is applied and the compensated version of the parameters exist. 


3) Nuances to gating and algorithmic approaches to automation

Gates in templates are applied uniformly to all the samples in a group; they will not adjust to the individual samples by default.  Individual gates for samples that vary can be adjusted by hand, but several tools exist that may aid in automation.

  • Synchronizing groups gates: If the synchronize box is checked, the user can edit one samples gates, the negative control for example, and thereby adjust all of the gates in the group.   This is particularly useful for experiments that may vary from data set to data set, but are highly consistent within a data set. 
  • Magnetic gates: a gate may be made magnetic, meaning that it will shift to center itself over the densest part of a population automatically, when creating a template.  When new data are added, magnetic gates will adjust position on a per sample basis.  They will not adjust shape.
  • The ezDafi Plugin: ezDafi is an algorithm that will modify manually drawn gates using clustering to adjust their shape and position, incorporating information from other parameters than the parameters the gate has been drawn on the help parse the borderline cases.   For more information on plugins see either the plugin documentation page, or the FlowJo Exchange.

One last note on gates, is that parameter names must match exactly for gates from a template to be applied to a newly added data file.  As an example, to a computer 7-AAD, 7AAD, and 7 AAD are completely different parameters.  If should should encounter a naming difference like this and the gates do not apply, this can be remedied by adjusting the parameter names to match.  Template gates should then automatically appear for all samples in a group that have newly matching parameter names. 


4) Set the iteration conditions for batching tables and layouts

Table definitions are included when a template is saved, though the output table is not.  This includes the iteration and output settings.  After loading new data into a template and opening up the Table Editor, you can click Create Table to produce an output using the same group, iteration setting, and output destination as the original workspace.   Make sure you set those values to your preferred choices to make you template more efficient.


The Layout Editor functions slightly differently because there is an ‘Off’ iteration choice.  This is included to allow the user to create a layout that stands alone with no specific order or orientation of samples during discovery.  However,    when FlowJo encounters a layout page in a template with Iterate set to ‘Off’ it follows this instruction, does not iterate and produces a layout page with empty plots and warning messages that the data files are not present.  Additionally, there is a batch option to create new layout pages within that workspace.  As these graphs have already been batched, their iteration immediately defaults to ‘Off’ and when they are opened in a template they will contain empty plots.  They will also contain the number of plots the original experiment required, which may not be the number of plots a subsequent experiment with a different number of files requires.   For these reasons we recommend choosing an iteration setting on all layout pages, removing already batched pages from the template before exporting as a template, and batching fresh when adding new data.  

If any layouts in your template to contain an ‘Off’ iteration setting you can change the iteration setting after adding data and the plots will immediately repopulate. 

Also see: Layout Editor Batching and Table Editor Batching


5) Name the template something different than the original analysis. 

When you export as a template the default name will match the original analysis, but will have a .WSPT extension allowing it to be created without overwriting the original analysis.  However, the default extension when you save an analysis that was started from a template is a .WSP file.  An incautious user could overwrite their initial analysis through this process.   We recommend adding an _template to all template names.