Model Building 102

 

This tutorial continues where Model Building 101 leaves off. We will add detail to that model to provide a more complete analysis. The Parameter Overlay plot will be used to help visualize the B-cell progression in 5-parameter space.

 

Strategy

Remember the cartoon from the first tutorial? We analyzed synthesized data, analyzing the simplest parameters first. We then add to our model and cycle through the testing process again, until we have developed it with enough detail to handle data that has been acquired on a flow cytometer.

 

images\modelbuildingflowchart.gif

 

Open Model101.gs

To get started, let’s open the model we created in Model Building 101.

Click the Open Document button on the main toolbar. In the Open Document dialog, navigate to and open “Model101.GS”. Click the Open button.

The program will open the model and the simulated data that we generated with it. At this point, the model defines CD19, SSC, and TdT for our B-cell lineage.

 

Read the File

When GemStone opens a document, it also closes the current FCS file. This is because the document itself contains some of the data for the file it last analyzed. So, we need to tell GemStone to read our test file again so that we can add more parameters to the model.

The quickest way to read a file again is to double-click the file in the File Database panel. Do that now.

 

images\model102readfile.gif

 

Adding a Parameter Overlay Plot

The Parameter Overlay plot is one of the most useful graphical tools in GemStone. It presents all of the parameters in our model in one, correlated plot. Each parameter appears as a ribbon of color on the plot. Let’s create one now.

Click the Overlay button on the Workspace toolbar to select the overlay drawing tool.

 

images\model102overlaybutton.gif

 

In an empty portion of the Cell Type canvas, click and drag to define a rectangle for the overlay plot. When you release the mouse, the plot will be displayed. The progression for CD19, SSC, and TdT is shown.

 

images\model102overlay1.gif

 

We will refer to this plot as we develop the model with additional parameters.

 

Modeling CD20

Let’s add CD20 to the model.

Click the parameter selection tool button and choose CD20 from the list. A new plot is added to the Cell Type widget, and CD20 appears in the Parameter Profile properties panel.

 

images\model102choosecd20.gif

 

CD20 is not expressed until part way through the progression, and we can see that without even modeling the parameter.

 

images\model102cd20unmodeled.gif

 

We will use a step-up profile for CD20. Right-click the CD20 plot and select Choose Parameter Profile in the context menu. From the list, choose Step Up.

Position the Control Points approximately as shown in the illustration below:

 

images\model102cd20initialpositions.gif

 

Now we can tell GemStone to Estimate X Positions and it will automatically adjust the positions and analyze the data. Click the Estimate X Positions button.

 

images\model101estimatex.gif

 

Now if we look closely at the result, we can see that the CD20 fit needs improvement.

 

images\model102cd20.gif

 

Notice that the little “whiskers” on the Control Points do not match the 95% confidence lines on the data. This is because the data has a different “line spread” than our parameter profile. Think of line spread as a measurement of broadness, or standard deviation. The parameter profile uses the whiskers on the Control Points as an estimate of line spread. In the low-intensity region, our model’s line spread is not as wide as it should be for this data. If we look at the bright CD20 events, we see that the Control Point whiskers are actually a little wider than the 95% confidence lines. The model’s line spread is wider than it should be. So we need to learn how to adjust the line spread for Control Points. We start by selecting one of the Control Points that we want to adjust.

Click the second Control Point to select it.

Next, in the Parameter Profile panel change the Variance Source to Manual Point Entry.

Now, move the Line-spread Value slider to adjust the line spread to about 7.

 

images\model102cd20adjustlinespread.gif

 

Notice now that the whiskers for the first two Control Points are wider than they were, and that they more closely match the 95% confidence limits of the data. In most cases, it is good to set the line spread to be a little wider than the observed data; the automatic adjustment routines in GemStone give better results with slightly wider settings.

Click the third Control Point to select it.

Move the Line-spread Value slider to adjust the line spread to about 3.5. You may also need to adjust the vertical position of the definition point.

Model Building Tip: Use the Scroll Wheel for Line Spread Adjustments

If your mouse has a scroll wheel, there’s a quick and easy way to adjust the line spread for a Control Point. Position the mouse over the center of the Control Point you want to adjust, and then roll the scroll wheel. Scrolling up increases the line spread; scrolling down decrease the line spread.

Click the Estimate X Positions button to allow GemStone to adjust the model and reanalyze the data.

 

images\model101estimatex.gif

 

Our CD20 profile now matches the data more accurately. The low-intensity events are modeled with a broader line-spread, and the high-intensity events have a narrower spread.

 

images\model102cd20improved.gif

 

 

Modeling CD10

Click the parameter selection tool button and choose CD10 from the list.

 

images\model102choosecd10.gif

 

Now we see one of the most interesting aspects of a GemStone model. We have not yet attempted to model CD10, and yet the structure of the CD10 progression is plainly visible. Three distinct levels of expression are shown, and the levels match our expectations for CD10.

 

images\model102cd10.gif

 

For CD10, we know that it is highly-expressed early, followed by a moderate expression and finally a low expression. How did GemStone figure this out? In each of the previous parameters, we had to select a parameter profile and position Control Points before the events were properly distributed along the progression axis.

What has happened is that our model now has enough structure to reveal structure in parameters that we have not modeled. Our TdT profile defined a transition early in the progression. CD20 defined a transition later in progression. These pieces of the model create enough of a scaffold to order the progression of events. We can use this to explore markers that are completely unknown.

Let’s go ahead and model CD10 so that our model has an even stronger scaffold.

Right-click the CD10 plot and select Choose Parameter Profile in the context menu. From the list, choose Three Levels. Position the Control Points so that they match the transitions in the data as shown in the illustration below:

 

images\model102cd10profile.gif

 

Now click the Estimate X Positions tool to allow GemStone to fine-tune the Control Point locations and analyze the data.

 

images\model101estimatex.gif

 

Our fit now looks like this:

 

images\model101cd10fit.gif

 

Just as we saw with CD20, the line spread for the CD10 profile could use a little fine-tuning too. The whiskers on the control points are a little narrow. If you would like to adjust these, go ahead and do so using the same process we used for CD20.

 

If we look at our Overlay Plot, we now see the coordinated expression of CD19, TdT, CD20, and CD10. The light scatter parameter is also displayed.

 

images\model102overlay2.gif

 

 

Redefine Zones

The zones we initially created are not showing us all that we know at this point. Let’s redefine the zones to cover the progression in more detail.

In the Cell Type Properties panel, fine the Edit Zones entry and click the Edit button. A dialog appears showing the zones we created.

Select the last zone in the list, TdT-, and then click the Delete button. Click OK to close the dialog.

In the CD10 plot, double-click the 4th control point.

 

images\model102point4and5.gif

 

Click the <--Create Zone button and then click OK.

Double-click the 5th control point.

Click the <--Create Zone button. Next, click the Create Zone--> button. Finally, click OK.

We now see dot coloring that reflects 5 zones. Let’s edit the names of these zones.

To rename a zone, click the zone label in the Zone Statistics table and edit its label. Label the zones Total, I, II, III, IV, and V respectively

 

images\model102renamedzones.gif

 

Create a 2P Plot

We can create a standard dot plot to see whether our model is producing data that looks like what we expect.

From the Workspace toolbar, select the 2P histogram tool and draw a rectangle for the histogram in an empty space on the Cell Type canvas.

 

images\model1022ptool.gif

 

Select CD20 for the X-axis and CD10 for the Y-axis by clicking on the axis label and choosing the parameter from the list.

 

images\model1022phist.gif

 

Our model has created events that form a familiar pattern of CD10 vs. CD20 expression for B-cells. Because we have defined these in terms of a progression, GemStone can overlay arrows that show us how B-cells develop, even in the dot plot.

Let’s save our new, improved model.

From the main toolbar, click the Save Document button. The Save GemStone Document dialog is displayed. Type “Model102” for the file name and click Save.

 

We’re ready to try this model out on a real B-cell sample, which is the subject for Model Building 103.

 

See also:

Model Building 103

Cell Types

Cell Type widget

Parameter Profile Descriptions