XAR (Experiment archive) files can be used to migrate information about experiments, assays, and samples between containers and servers. This page describes how to import example XAR files to a folder on your LabKey Server. The individual example XARs included in the tutorial package are described within subsequent tutorial topics.
Create a Work Space
To create a new folder in LabKey Server for importing the XAR tutorial examples, follow these steps:
- Make sure you are logged into your LabKey Server site with administrative privileges.
- Navigate to or your "Tutorials" project. Create it if necessary.
- If you don't already have a server to work on where you can create projects, start here.
- If you don't know how to create projects and folders, review this topic.
- Create a new subfolder named "XAR Examples". Choose folder type "Custom" and confirm that both the "Experiment" and "Pipeline" modules are selected.
Set Up the Data Pipeline
Next, you need to set up the data pipeline. The data pipeline is the tool that you use to import the example xar.xml file. It handles the process of converting the text-based xar.xml file into database objects that describe the experiment. When you are running LabKey Server on a production server, it also handles queueing jobs -- some of which may be computationally intensive and take an extended period of time to import -- for processing.
To set up the data pipeline, follow these steps:
- Download either XarTutorial.zip or XarTutorial.tar.gz and extract to your computer.
- Select the Pipeline tab, and click Setup.
- Click Set a pipeline override.
- Enter the path to the directory where you extracted the files.
- Click Save.
You will need to import each example xar.xml file that you wish to use in this tutorial. This section covers how to import Example1.xar.xml. The process is the same for Examples 2 and 3. Examples 4, 5 and 6 use a different mechanism
that is covered later in this tutorial.
To import the tutorial example file Example1.xar.xml, follow these steps:
- Click on the Experiment tab.
- Click Upload XAR.
- Click Use data pipeline
- Check the box for "Example1.xar.xml".
- Click Import Data.
- In the popup confirm Import Experiment is selected. Click Import.
- Click the Pipeline tab, where you'll see an entry for the imported file, with a status indication (e.g., LOADING EXPERIMENT or WAITING). If the status doesn't change soon to either COMPLETE or ERROR, you may need to refresh your browser window.
If the file imported successfully (COMPLETE):
- Click the Experiment tab.
- In the Run Groups section, click on Tutorial Examples to display the Experiment Details page.
- Click on the Example 1 (Using Export Format) link under Experiment Runs to show the summary view.
If the import failed (ERROR):
Import Via Pipeline
You can also initiate import of a xar.xml file via the data pipeline as follows:
- On the Pipeline tab, click Process and Import Data.
- By default you will see the contents of the pipeline override directory you set above.
- Select the desired file in the file tree and click Import Data.
- Select Import Experiment and click Import.
Learn more about importing using the data pipeline in this topic: Examples 4, 5 & 6: Describe LCMS Experiments
Export a Sample Type XAR File
To export a Sample Type as a XAR file:
- Go the Sample Type grid.
- Click (Export), then the XAR tab.
- Click Export to XAR.
- The XAR file will be downloaded to your local machine.