Last time, we covered a linear template - where all tubes get the same gating treatment. This time, we'll focus on sequential templates. A sequential template is meant for experiments with "panels" - ie. each "patient" gets a certain amount of "tubes" each of which has some specific reagent combination. As always, the most important part of designing templates is that your metadata (in this case, the patient info, and reagent info) be consistent and not change over time.
This document will be the boiled-down, logic walkthrough of the advanced tutorial (100+ pages, no thanks. I'll do it in 3.) If you feel like I'm skipping steps, you should go over both the basic and advanced tutorial - this document assumes you are familiar with the concepts of group -creation, batching, etc...
Let's begin with a view of the data we will "templatize". Shown below are 16 "tubes" for 4 "patients":
Here's how FlowJo needs to see it - broken down into iterators and discriminators.
Our goal in designing this template will be to analyze only the first "iterator", or "patient", and let flowjo batch-apply that analysis to the remaining 3 (or however many!) This finished "template" will contain all the gates, layouts, tables etc.. for a single iterator, but will be capable of analyzing as many different patients as you have RAM capacity :)
the iterator will be used to separate tubes into groups (ex. by patient ID, time point, etc..)
the discriminator will be used to cycle within each iterator (ex. tubes)
To begin setting up this kind of template, we need to prepare the workspace. Load up one iteration of data (ex. a single patient), and allocate each discriminator into its own group. We then make that group "live" - this means any other samples added to the workspace which match the group definition will be included on the fly. There are several ways to do this:
Group dialog - you can use the group dialog to define groups based on either "staining protocol" or keyword values.
By making a group with a "staining protocol" of "L selectin, CD45RA, CD8" - we are including all samples matching this reagent combo. If you check the "live" box - samples will also be added to this group if you add more data to this template later.
"make groups from keywords" - click this option from workspace menu, select a keyword - the program will make a series of groups based on available values of the keyword. Although this method takes less time than going through group dialog, the resulting groups are not live.
After each discriminator is in its own live group, create gates and attach them to the group. These are called group-owned gates. Hints:
- if you have a bunch of gates, you can alt-drag (drag with mouse while alt key is pressed on keyboard) the top-most gate, which will include all of its dependents.
- if you already have some group-owned gates and wish to add some more, be sure to drag them to the proper level up in the group view of the workspace!
This concludes setting up the workspace. Try your template out - click File >> save as template. Then open your template and drag in the first iteration's worth of samples - all of them should end up in their own group, with their own gates.
In step 2, we might want to make a layout (or a few layouts.) I recommend one layout for checking gates, one for making "reports" or printouts, whatever. Some advantages of working on your gates in the layout include:
- plots take up less space (fewer pixels) in the layout vs. the graph window. So, it's easier to see all your gates at once.
- you can still check / modify gates from the layout. In windows, select a plot, hit "esc". In mac, select a plot, hit [cmd]+[r]
If you design a layout without considering iteration, it will not work once you save/reopen the workspace. There are two types of layouts- layouts with a single FCS file, and layouts with multiple FCS files.
Note: if you design a layout in FlowJo where more than one FCS file is being represented, be sure to set iteration prior to dragging plots into the canvas of the layout.
Note: layouts are intimately tied to the workspace. If you design a layout while selecting a specific group in the workspace, you should only use that layout with that group (or a group which contains similar samples, ie. identical gates and stain names)
Example: let's make a gate-checking layout for the sample data above. I want to check one patient's set of tubes at a time. Begin this by selecting "all samples" group, and setting iteration = (number of tubes in your panel) in the layout. You can do this in the Layout menu, iteration options.
![]()
above, is what my done template looks like: notice the color coding in the workspace? you can set this by double-clicking the group definition and then the color square - the gates belonging to each group will be color-code. To test this layout, try File >> Save as template and then add two different iterations of data to your workspace. If things went as they were supposed to, each "discriminator" group should have 2 tubes in it, and the layout window's "every 4th" menu lists two files (the first discriminator of the first iterator, and the first discriminator of the second iterator):Notice that if you click one tube or the other - all plots should update with the NEXT SET of data. You can print each layout separately, or batch the layout to printer. This will work for 1, 10, or 1000 samples.. assuming your computer can handle that many ;)
In step 3, we might design a table in the table editor to export numerical data from flowjo to a spreadsheet, etc.
[to be continued Monday]
PS.
This application note guides you through making a single-panel template. Though you can use this approach to design a multi-panel template, we recommend against it - it might become more complicated and take more time to troubleshoot if something in your panel changes. Single-purpose templates are easier to design, implement and support.
Comments