Instrument data becomes even more useful when integrated with other data about the same participants or specimens in a LabKey Study
. For example, assay data can track how a blood marker changes over time. After integration, you can compare trends in that marker for patients receiving different treatments and draw more useful conclusions.
Despite the name, assay data "copied to study" is not duplicated at all. Assay data records are mapped to the study's participants and visits. Within the study, a new dataset is created which includes the assay data using a lookup
. This allows you to:
- Easily integrate assay data with clinical data.
- Create a broad range of visualizations, such as time charts.
- Utilize qc and workflow tools.
Manual Copy of Assay Data
Assay data that has already been uploaded can be copied manually into a study. You can copy by individual result rows, or select all the results in a run by selcting by run.
Automatic Copy-to-Study upon Import
When you always plan to copy data to the same study, you can automate the above manual process by building it directly into the assay design. Each run uploaded will then be automatically copied to the target study.
- In your assay folder, click the name of your assay design.
- Select Manage Assay Design > Edit Assay Design. If you want to preserve the original version of the design that does not do the copy-to-study, select "Copy Assay Design" instead and copy it to the current folder, giving it a new name.
- From the dropdown for Auto-Copy Data to Study, select the target study.
- Scroll down and click Save.
- The next data imported using this assay design will have all rows copied to the target study.
- You can find "copied-to-study" datasets in study on the Clinical and Assay Data tab. Until otherwise assigned a category, datasets added from assays will be "Uncategorized."
Skip Verification Page (For Large Assay Files)
When your assay data has a large number of rows (thousands or millions of rows), the verification page can be impractical: it will a take a long time to render and to manually review each row. In these cases, we recommend skipping the verification page as follows:
- Navigate to the Runs view of the assay data. (The Results or Batches view of the data will not work.)
- Select the runs to be copied.
- Click Copy to Study.
- Select the checkbox Auto copy the selected run(s). (This checkbox is available only when you initiate the copy-to-study wizard from the Runs view of the assay data. If you don't see this checkbox, cancel the wizard, and return to the Runs view of the assay data.)
- Click Next.
- The data will be copied to the study skipping the manual verification page. The data will be copied as a pipeline job that runs in the background. Any assay data that is missing valid participant ids or timepoints will be ignored.
Recall Copied Rows
If you have edit permission on the copied dataset in the target study, you have the option to "recall" the copied row(s). Select one or more rows and click Recall
. When rows are recalled, they are deleted from the target study dataset.
The recall action is recorded on the "View Copy-to-Study History" page in the assay folder.
Hover over the leftmost column in the grid for a (details)
icon. Click it for more details about that row.
What Do Checks and Xs Mean?
icons when copying are relevant to specimen matches only
. An X does not necessarily mean the copy-to-study process should not proceed or does not make sense. For example, X's will always be shown when copying into a study that contains no specimens.
When assay data is copied to a study, it must be resolved to participants and dates or visits in the target study. There are several ways to provide this information, and participants and visits that do not already exist will be created. See Participant/Visit Resolver Field
. Matching incoming assay data to specimens
is done when possible, but integrated assay data is still of use without such a match.
If the server can resolve a given ParticipantId/Visit pair in the assay data with a matching ParticipantId/Visit pair in the study, then it will incorporate the assay data into the existing visit structure of the study. If the server cannot resolve a given Participant/Visit pair in the assay data, then it will create a new participant and/or a new visit in the study to accommodate the new, incoming data from the assay. The assay data in copied into the study in either case, the difference is that in one case (when the assay data can be resolved) no new Visits or Participants are created in the study, in the other case (when the assay data cannot be resolved) new Visits and Participants will be created in the study.
If you encounter errors related to an 'invalid security context' during large copies from the user interface, you may be attempting to copy too many rows at once in one POST request. The upper limit is in the range of 9500 rows.
To workaround this limitation you can try the following:
- Split a manual copy into several smaller chunks.
- If your data includes participant resolver information, use automatically copy to study from within the data import wizard to bypass the manual import.
- If you routinely have many rows to copy to the same study, do not need to interact with the data between import and copy, and your data always includes the necessary participant resolver information, you can also enable the automatically copy to study option in your assay design directly.