Luminex® analysis in LabKey Server makes use of a transform script to do a number of calculations including curve fits and estimated concentrations. To get the transform script running, you will need to:
Install and Configure R
You will need to install R and configure it as a scripting language on your Labkey Server. If you are on a Windows machine, install R in a directory that does not contain a space (i.e. not the default "C:\Program Files\R" location.
Install Necessary R Packages
The instructions in this section describe package installation using the R graphical user interface.
The transform script requires Ruminex, a custom package not available on CRAN, so you will need to use the zip package provided in the sample files you downloaded. This tutorial was tested using Ruminex 0.1.0 (and 0.0.9); other versions may not work identically.
- If you are running R-3.0.0 or later, use Ruminex_0.1.0.zip from the LuminexSample files you downloaded. (Or download it here: Ruminex_0.1.0.zip).
- Launch the R graphical user interface. Use the drop-down menus in the R user interface to select: Packages > Install package(s) from local zip file...
- Open the zip file you downloaded from this page.
Install Additional Packages
- Open your R installation.
- Using the R console, install the packages listed below using commands like the following (you may want to vary the value of repos depending on your geographic location):
- Install the following packages:
- As an alternative to the R console, you can use the R graphical user interface:
- Use the drop-down menus to select Packages > Install package(s)...
- Select your CRAN mirror.
- Select the packages listed above. (You may be able to multi-select by using the Ctrl key.)
- Click OK and confirm that all packages were successfully unpacked and checked.
If you are running R-3.0.0 or later, you will also need to install these additional R packages:
Associate the Transform Script with the Assay Design
Control Access to Scripts
Next, place the transform script and utility script in a server-accessible, protected location.
Your script was uploaded into the Files
web part earlier; however, we do not recommend running it from this location. If you do so, all users with edit-level permissions on your server will be able to replace/edit the script which runs with very high levels of permission on your server. Before continuing, place a copy of the transform script and its associated utility script in a safer location on your server. If your server runs on Windows, for example:
- Locate the LabKey Server directory on your local machine. For example, it might be C:\Program Files\LabKey Server
- Create a new directory named Scripts here.
- Place a copy of each of these files in this new directory: (Copy from the sample data you already downloaded or download a new copy from the Files web part.)
Add Path to Assay Design
Edit the transform script path in the assay design to point to this location.
- In the Assay List, click Luminex Assay 200.
- Click Manage Assay Design > edit assay design.
- In the Assay Properties section, for the Transform Script, enter the full path to the scripts you just placed.
When you save, the server will attempt to verify the script location.
Test Package Configuration (Optional)
- Click Assay Dashboard.
- Select /Luminex/Runs - Assay 200/02-14A22-IgA-Biotin.xls in the Files web part.
- Click Import Data.
- Select Use Luminex Assay 200 in the popup and click Import again.
- For Batch properties, leave defaults unchanged and click Next.
- For Run Properties, leave defaults unchanged and click Next.
- Click Save & Finish.
If there is a problem with the path, or with installed packages or the version of R, error messages will help you figure out what else you need to do (e.g., installing an additional R package or upgrading your version of R). After installing a missing package, you can refresh your browser window to see if additional errors are generated.
If your script cannot find youtil.R, make sure it is located in the same directory as the LabKey Luminex transform script. The following should be peers:
For further troubleshooting tips, see: Troubleshoot Luminex Transform Scripts and Curve Fit Results
Delete the Imported Run Data
Before continuing with the tutorial, you need to delete any runs you used to test your R configuration.
- Go to the Assay List.
- Select Luminex Assay 200.
- Click the top checkbox on the left of the list of runs. This selects all runs.
- Click Delete.
- Click Confirm Delete.