Once a Metadata Table containing a key column has been saved, data elements may be associated with its rows automatically. Typically, this is done on freshly imported data elements. This initial association will then be carried over to results of analyses based on those data elements. This means that you can keep track of e.g. the sample to which a particular analysis result pertains without having to resort to data element naming conventions or an elaborate folder structure.
Each association between a particular data element and a row in your Metadata Table will be qualified by a "role" label that indicates what the role of the data element is with respect to your row. A suitable role for a freshly imported data element may be "Sample data" or "NGS reads". Each analysis tool will provide its own role labels when transferring the metadata association from input to output. As an example, a read mapping tool may assign the role "Un-mapped reads" to the Sequence List it produces, allowing you to keep track of which Sequence List was the original imported NGS reads, and which was the un-mapped ones.
To associate data elements with the rows of a Metadata Table, click the Associate Data button at the bottom of the Metadata Table view, and select Associate Data Automatically. Note: the button remains disabled until the Metadata Table has been saved (and, in case of the automatic association, has a key column). Clicking the button shows a standard wizard dialog as in figure 3.15.
Select the data elements you wish to associate with the rows of the Metadata Table. You may select both individual elements and folders; folders will be traversed recursively.
Data association is parameterized as follows, cf. figure 3.16.
- Role of input data. The role of the data elements with respect to the entities represented by the rows of your Metadata Tables (e.g. 'Sample Data', 'Mapped Reads', 'QC Report').
Click Next to specify result handling and to finish the wizard. The selected data elements will then be scanned in a background process, and those elements whose name matches a key in the key column of the Metadata Table (either the whole name or just the beginning of the name) will be modified to include a metadata association to the row in question, and with the role specified in the wizard.
Note: As well as adding new associations to the data elements, any existing associations to this particular metadata table will be updated to associate to the matching rows, or deleted if no rows match a given data element (e.g. the sample ID was deleted or changed since last automatic association, or the data element was manually associated, see Manually associating a metadata row to data elements). If you want to avoid removing existing associations, take special care only to select data elements you want to have automatically associated / dissociated, and not, for instance, a whole folder.