Import A New Sample Set
Before you create a new sample set, consider how you will provide unique ids for each sample. For options, see Samples: Unique IDs
Decide also where you want the sample set to be available. If you define it in a given folder, it will be available only in that folder. Defined in a project, you will be able to add samples to it from the project itself and all subfolders of that project. If you define it in the Shared project
, it will be available site-wide.
- Use Page Admin Mode to add a Sample Sets web part if you don't already have one.
- In the Sample Sets web part, click Import Sample Set.
- Name: This is the name for the overall sample set. (Not to be confused with the Name column in a sample set, which has special meaning to the server. For details see Samples: Unique IDs.) It will appear as a record in the Sample Sets web part. Clicking on this name will bring you to a grid of the individual samples in the set.
- Upload Type: Select either 'Cut/Paste' or 'File'.
- If you select 'File', click Upload TSV, XLS, or XLSX File. Browse to the file you wish to upload.
- If you select 'Cut/Paste', then paste the data into Sample Set Data. The data must be formatted as tab separated values (TSV). Copy/paste from Microsoft Excel works well. The first row should contain column names, and subsequent rows should contain the data.
- ID Columns. Select columns in your data to form a concatenated unique id. Individual columns need not contain unique ids, but the concatenated value must for a unique value for each row. The concatenated values (with dash separators) will be written to the Name column, even if no Name column is provided in your original data. These dropdowns will be populated after you select a file or paste sample data. For details see, Samples: Unique IDs.
- Parent Column. Deprecated. The Parent Column dropdown, though still available, is considered deprecated as of LabKey Server version 16.2. Instead of indicating parent samples using the dropdown, use a column name with the pattern "MaterialInputs/<NameOfSampleSet>". For syntax details, see Indicating Sample Parentage on Import.
- Click Submit.
Add an Individual Sample to an Existing Sample SetAdd a single sample to a sample set:
- When viewing an individual sample set, select Insert > Insert New Row from the grid menu.
- Enter the properties of the new sample.
- Click Submit.
Add More Samples to an Existing Sample Set
- When viewing an individual sample set, click the Import more samples button.
- Choose how the uploaded samples should be merged with the existing samples. Your options:
- Insert only new samples; error if trying to update an existing sample.
- Insert only new samples; ignore any existing samples.
- Insert any new samples and update existing samples.
- Update only existing samples with new values; error if sample doesn't already exist.
- By default, any additional columns in the uploaded sample data will be ignored. Check the box to add any new columns found in the uploaded sample data to the existing sample set columns.
- Either upload a TSV, XLS or XLSX file, or cut/paste sample set data into the box. You can click Download an Excel Template Workbook to use to ensure correct formatting.
- After uploading/pasting, indicate one or more Id columns.
- Click Submit.
Import Using the API