Importing metadata
Metadata can be imported from an Excel format file into the CLC Genomics Workbench using the Import Metadata () tool. This is described in detail in this section.
Creating a metadata table directly this way is not necessary when launching a workflow in batch mode. Here, an Excel file containing metadata can be provided directly when launching the workflow, as described in Launching workflows individually and in batches.
The Import Metadata tool
To import an Excel (.xlsx/.xls) file as metadata in the Workbench, go to:
File | Import () | Import Metadata ()
The first column in the Excel file must have unique entries as that column will be designated as the key column. A different column can be specified instead later.
For the optional association with data to work, the first column of the metadata must contain entries that can be matched to data element names.
Importing the Excel file
In the box labeled Spreadsheet with sample information, select the Excel file (.xlsx/.xls) to be imported. The rows in the spreadsheet are displayed in the Metadata preview window, as shown in figure 11.3.
Figure 11.3: After an Excel file is selected, its rows are visible in the Metadata preview table.
Note that when using the Import Metadata tool, all columns are imported as text columns. This can be later changed from within the Metadata Table editor as described in Editing metadata. There, you can change the column data types (e.g. to types of numbers, dates, true/false) and you can designate a new key column.
Associating metadata with data (optional)
The second wizard step, called "Associate with data", shown in figure 11.4, is optional. To proceed without associating data to metadata, click on the Next button. Associating data with metadata can be done later, as described in Associating data elements with metadata.
To associate data with the metadata at this step of importing metadata:
- Click on the file browser button to the right of the Location of data field
- Select the data elements that should be associated with the metadata.
- Select the matching scheme to use: Exact, Prefix or Suffix. Detailed explanations of these options are provided in Matching schemes.
Figure 11.4: Three data elements are selected for association. The "Prefix" partial matching scheme is selected for matching data element names with the appropriate metadata row, based on the information in the Sample ID column in this case.
The Data association preview area shows data elements that will have associations created, along with information from the metadata row they are being linked with. This gives the opportunity to check that the matching is leading to the expected links between data and metadata.
You can then select where you wish the metadata table to be saved and click Finish.
The associated information can be viewed for a given data element in the Show Element Info view, as show in figure 11.5.
Figure 11.5: Metadata associations can be seen, edited, refreshed or deleted via the Show Element Info view.