Once a formula for a linear regression has been defined, we can display it in our layout, use it to overlay a line fit on the scatter plot, and even save the formula as a keyword for use in future experiments and analysis. Since it is typical to have one layout for calibration and another for analysis, it is useful to save a regression for use in any layout. In this section, you will learn how to save a regression formula as a keyword for use in any layout.

1.Load the FITC MESF Beads Completed.fey layout located in the Regression Analysis folder within the Tutorial Sample Data archive.

2.Drag the LinFitLogMedMESF custom token from the Custom Tokens window onto a blank area of the layout.

A new text box will be automatically created and the linear fit token will be inserted in it. The linear fit token will be displayed as in Figure T18.25.

Figure T18.25  LinFitLogMedMESF Custom Token Formula Output Displayed in a Text Box

Figure T18.25  LinFitLogMedMESF Custom Token Formula Output Displayed in a Text Box

3.Right-click on the text box.

4.Choose Copy from the pop up menu.

5.Open a text editor application such as Notepad for Microsoft Windows.

6.Paste the text box in the text editing software.

7.Enter a '$' symbol followed by the name you would like the keyword displayed as before the formula followed by an equals sign (Figure T18.26). In this case, use: '$FITCMESFCalib='

Figure T18.26  Creating an Extra Keyword for the Regression Formula in Notepad

Figure T18.26  Creating an Extra Keyword for the Regression Formula in Notepad

8.Save the text document as FITCMESFCalib.AllExtraKeywords.txt (Figure T18.27) in a location that will be easy to access,, such as your Desktop.

 

Figure T18.27  Saving the Keyword Text Document

Figure T18.27  Saving the Keyword Text Document

 

FCS Express has the capability to load keywords from external files as part of loading a data file. These keywords are treated within FCS Express as if they were originally part of the data file itself. This is a convenient way to introduce externally derived data into your analysis template. We will make the regression keyword available for use in another layout in the following steps.

9.Copy the FITCMESFCalib.AllExtraKeywords.txt file you just created and paste it into the Regression Analysis folder within the FCS Express Sample Data directory (Figure T18.28).

Figure T18.28  Paste the FITCMESFCalib.AllExtraKeywords.txt File into the Linear Regression Analysis Folder

Figure T18.28  Paste the FITCMESFCalib.AllExtraKeywords.txt File into the Linear Regression Analysis Folder

10. Load the HLA CrossMatch Keyword Regression.fey layout located in the Regression Analysis folder within the FCS Express Sample Data Directory.

This layout contains sample files and a page for MESF Calculations. We will now use the regression formula saved as a keyword to complete the table.

11. Click the Tcell LogMESF Patient Custom Token to select it.

12. Right-click in Enter the Custom Token formula below area of the Custom Tokens window.

13. Choose Insert Function→Regression→LinearXtoY(x, [modelParameters]) from the pop-up menu.

14. Highlight the text 'x' in the formula brackets.

15. Right-click on the highlighted text.

16. Chose Insert Token from the pop up menu.

17. Double-click the Tcell LogPatient token from the Custom category.

18. Highlight the text [modelParameters] in the formula (Note: the brackets must be selected in this instance).

19. Right-click on the highlighted text.

20. Choose Insert Token from the pop up menu.

21. Double-click on Keyword.

The Create Keyword dialog opens.

22. Choose the Keyword category in the Create Keyword dialog (Figure T18.29, number1).

23. Click on the ellipsis (Figure T18.29, number2).

24. Scroll to and click on the $FITCMESFCALIB keyword (Figure T18.29, number3).

26. Click OK in the Please select a keyword dialog (Figure T18.29, number4).

27. Click OK in the Create keyword dialog (Figure T18.29, number5).

Figure T18.29  Choosing the $FITCMESFCALIB Keyword Token

Figure T18.29  Choosing the $FITCMESFCALIB Keyword Token

28. Enter an "=" sign before the formula.

The formula will now look like Figure T18.30.

Figure T18.30  Completed Custom Token Formula for Tcell LogMESF Patient

Figure T18.30  Completed Custom Token Formula for Tcell LogMESF Patient

Tables or spreadsheets for your analysis may now be populated using the custom tokens you have defined. The formulas use the regression stored as a keyword in the data.

In summary, when trying to create any kind of calibration regression to apply to your sample data, the best practice is to have a layout that is used for creating the regression. This will contain all of your controls. You then save the final regression as an "allextrakeywords.txt" file. Create another analysis layout that is used to analyze the actual data and apply the regression you created. The analysis layout will get the regression from the keyword that you defined in the "allextrakeywords.txt" file. By placing the "allextrakeywords.txt" file into the folder with the appropriate data files, you ensure that all the data files actually contain the regression that you wish to use.