LIMSport¶
Quick Facts¶
| Workflow Type | Applicable Kingdom | Last Known Changes | Command-line Compatibility | Workflow Level | Dockstore |
|---|---|---|---|---|---|
| Exporting Data from Terra | Any taxa | vX.X.X | No | Set-level | LIMSport_PHB |
LIMSport_PHB¶
What does LIMSport do?¶
After Terra analysis is complete, data tables may contain more columns than review processes and laboratory information management system (LIMS) require. Review might favor a specific column order, LIMS may expect different column names, and it may be desirable to limit import to samples passing quality control (QC).
LIMSport evaluates QC on the sample and set-level using user-provided criteria and prepares Terra results for import into LIMS. It can be used to streamline result review and LIMS data import.
LIMSport generates a file for LIMS import (limsport_lims_report)and two QC reports (limsport_qc_fail_report and limsport_qc_report) that show individual sample outcomes, set-level outcomes, and failed criteria.
What you need¶
- A configuration file that specifies which results to report, how to name and order output columns, and custom sample and set-level QC criteria that dictate pass/fail outcomes.
Key terms
| Term | Definition |
|---|---|
| Terra table | A spreadsheet-like table in Terra with one row per sample and columns for sample information and results. |
| LIMS | Laboratory information management system. Laboratories use this software to track samples and report results. |
| QC (quality control) | Checks that determine whether results meet defined criteria for reporting, such as an expected genome size. |
| Configuration file (config) | A YAML file that defines the report columns, their names and order, and QC criteria. The Config Builder generates this file using a form view. |
| Set-level workflow | A workflow that runs and produces results for a group of samples, such as an analysis batch. |
| Control sample | A sample with a known expected outcome used to assess run performance (e.g., negative and positive controls). |
What you get¶
LIMSport runs once per sample set and generates three reports:
| Output | Contents |
|---|---|
| LIMS report | The file for LIMS import. It contains the sample ID and configured report columns, with the specified column names and order. By default, it includes samples that pass sample-level QC and samples exempted from those checks, provided the run passes set-level QC. |
| QC fail report | Identifies the samples that failed QC and the criteria they failed. |
| QC summary | Records the sample-level QC status for all samples in the set, including passes, failures, and skipped checks. |
How it works¶
In order, LIMSport_PHB:
- downloads a Terra table,
- extracts the specified samples listed in the
sample_namesinput, - selects the columns specified in the configuration file,
- applies the configured sample-level and set-level QC rules and records the outcomes,
- reorders and renames the report columns as configured, then writes the LIMS and QC reports.
The Configuration File¶
The configuration file defines which QC criteria apply to individual samples ("sample-level QC") and the run as a whole ("set-level QC"), which data to include in the LIMS report, and how to name and order the LIMS report columns.
The file has two required sections, sample_qc and set_qc, and one optional section, skip_sample_qc.
sample_qc — Sample-level QC (required) and report columns
List the configured report columns in the order they should appear in the LIMS report. For each column, specify if it should appear in the report, optionally define its output name, and choose how to use it:
- utilize the column for QC and include it in the LIMS report,
- use the column for QC only and omit it from the LIMS report,
- include the column in the LIMS report without using it for QC.
LIMSport always includes the sample ID column, which is the first column in the Terra table.
Sample-level QC rules can use either of these approaches:
- Fixed limits apply the same rule to each sample. For example, require a column value greater than 30.
- Conditional limits apply the rule based on another sample value. For example, specify different acceptable genome-length ranges for different gambit_predicted_taxon values.
Unmatched samples fail QC unless a general, default rule is set
If a sample does not match any of the configured rule conditions, LIMSport will apply a default rule if one is defined. If a default rule does not exsit and the sample does not match any defined rule conditions, the sample fails QC.
set_qc — Set-level QC (required)
Define checks for specific sample types (specified by sample ID nomenclature, e.g., "NTC"), typically control samples, that determine whether the entire run passes QC. For example, require that the positive control is predicted as Escherichia coli and a negative control does not produce an organism prediction.
A failed set-level check leaves the LIMS report empty
If any set_qc check fails, the entire run fails QC and the LIMS report is empty. Use the QC fail report and QC summary to investigate the failure.
Include all set-level QC samples in sample_names
Provide every control sample type referenced by a set_qc rule in the LIMSport analyis. The workflow stops with an error if any set-level sample type is missing.
skip_sample_qc — Sample-level QC exemptions (optional)
List any samples that should not be subjected to sample_qc rules. For example, negative controls can produce low or empty results that would fail standard sample-level checks.
Skipped samples:
- Remain subject to any applicable
set_qcrules. - Receive a status of
SKIPPEDin thesample_qc_statuscolumn of the QC summary. - Appear in the LIMS report if the run passes set-level QC.
For full technical details on the configuration file, see the LIMSport config documentation.
Config Builder¶
Use the Config Builder to create or edit a YAML configuration file through a form.
- Create a configuration file. Complete the form below, then copy or download the generated configuration.
- Edit an existing file. Drag the file into the builder, make your changes, then copy or download the updated configuration.
If the embedded builder fails to load, open it in a new tab.
Workflow Inputs¶
The table lists the workflow inputs and their default values. The settings below control how LIMSport handles sample-level QC failures and configurations that read values from files.
Include failed samples in the LIMS report
By default, samples that fail sample-level QC appear in the QC fail report and are excluded from the LIMS report. To include them in the LIMS report when the run passes set-level QC, set include_qc_fails to true.
Enable file parsing when the configuration requires it
If your configuration contains commands that read values from files, set allow_file_parsing to true. The workflow stops with an error if the configuration requires file parsing and the setting is disabled.
Set max_file_parsing_failures to specify how many samples can encounter file-parsing failures before the workflow stops. The default allows an unlimited number of file-parsing failures.
Add a prefix to name LIMSport output files
To make output files easier to find or tell apart, set output_prefix to a short label like a run ID or the config file version used for analysis. This adds the string to the beginning of every LIMSport output file name.
| Terra Task Name | Variable | Type | Description | Default Value | Terra Status |
|---|---|---|---|---|---|
| limsport_wf | config | File | The configuration file for LIMSport; can be made at https://theiagen.github.io/limsport/v1.0.0/config-builder/index.html | Required | |
| limsport_wf | sample_names | Array[String] | The sample names to generate a LIMS report for (and any controls to perform QC with) | Required | |
| limsport_wf | terra_project_name | String | The name of your Terra project. You can find this information in the URL of the webpage of your Terra dashboard. For example, if your URL contains #workspaces/example/my_workspace/ then your project name is example | Required | |
| limsport_wf | terra_table_name | String | The name of the Terra table where your samples can be found. Do not include the entity: prefix, the _id suffix, or the _set_id suffix, just the name of the sample-level data table as listed in the sidebar on lefthand side of the Terra Data tab. | Required | |
| limsport_wf | terra_workspace_name | String | The name of your Terra workspace where your samples can be found. For example, if your URL contains #workspaces/example/my_workspace/ then your workspace name is my_workspace | Required | |
| download_terra_table | cpu | Int | Number of CPUs to allocate to the task | 1 | Optional |
| download_terra_table | disk_size | Int | Amount of storage (in GB) to allocate to the task | 10 | Optional |
| download_terra_table | docker | String | The Docker container to use for the task | us-docker.pkg.dev/general-theiagen/theiagen/terra-tools:2023-06-21 | Optional |
| download_terra_table | memory | Int | Amount of memory/RAM (in GB) to allocate to the task | 2 | Optional |
| limsport | allow_file_parsing | Boolean | Set to true to allow for your configuration file to indicate additional file parsing bash commands. | False | Optional |
| limsport | cpu | Int | Number of CPUs to allocate to the task | 1 | Optional |
| limsport | disk_size | Int | Amount of storage (in GB) to allocate to the task | 100 | Optional |
| limsport | docker | String | The Docker container to use for the task | us-docker.pkg.dev/general-theiagen/theiagen/limsport:1.0.0 | Optional |
| limsport | include_qc_fails | Boolean | Set to true to include QC fails in the LIMS report output | False | Optional |
| limsport | max_file_parsing_failures | Int | Set this to indicate the number of failures that are allowed to occur when parsing a file before ending the run (by default, there is no limit) | Optional | |
| limsport | memory | Int | Amount of memory/RAM (in GB) to allocate to the task | 2 | Optional |
| limsport | output_delimiter | String | The column delimiter for the output file | , | Optional |
| limsport | output_prefix | String | The name to prefix the title of the output files | limsport | Optional |
| version_capture | docker | String | The Docker container to use for the task | us-docker.pkg.dev/general-theiagen/theiagen/alpine-plus-bash:3.20.0 | Optional |
| version_capture | timezone | String | Set the time zone to get an accurate date of analysis (uses UTC by default) | Optional |
Workflow Tasks¶
download_terra_table: Data Retrieval
This task will return a selected Terra table as a TSV file when provided the Terra project, workspace, and table name.
download_terra_table Technical Details
| Links | |
|---|---|
| Task | task_download_terra_table.wdl |
limsport: LIMS Report Generation and QC
LIMSport reads a downloaded Terra table to process the rows indicated in the sample_names variable using a configuration file. The configuration file is the heart of LIMSport.
The LIMSport tool documentation contains more details regarding the configuration file and other input parameters, and includes a config builder to help build your configuration file. This builder is also included above for convenience.
LIMSport Technical Details
| Links | |
|---|---|
| Task | task_limsport.wdl |
| Software Source Code | LIMSport on GitHub |
| Software Documentation | LIMSport Documentation |
Workflow Outputs¶
| Variable | Type | Description |
|---|---|---|
| limsport_docker | String | The docker image used for the task |
| limsport_lims_report | File | The final QC-ed report generated by LIMSport, able to be downloaded and imported into LIMS |
| limsport_qc_fail_report | File | A file containing samples that failed QC, with one row per failed check. Each sample will be listed if a set_qc rule fails |
| limsport_qc_summary | File | A file containing a summary of the QC results for each sample, split by QC type (sample_qc_status and set_qc_status) |
| limsport_version | String | The version of LIMSport used |
| limsport_wf_analysis_date | String | The date the workflow was run |
| limsport_wf_version | String | Version of the PHB repository that hosts this workflow |
Troubleshooting¶
My LIMS report is empty. Why?
Check these two common causes:
- A set-level check failed. A control sample has failed the specified QC criteria. Review the QC fail report and QC summary to identify control-specific failures.
- Every sample failed sample-level QC and
include_qc_failsis disabled, as it is by default. Review the QC fail report to identify sample-specific failures.
A sample is missing from my LIMS report. Why?
- The sample failed sample-level QC. If
include_qc_failsis disabled, LIMSport excludes failing samples from the LIMS report. Look up the sample in the QC fail report to identify the failed checks. - The sample matched none of the configured conditions. Without a default rule or match to a specified condition, an unmatched sample fails sample-level QC. Check the conditions for the sample's value, such as its identified organism.
The workflow stopped with an error. What should I check?
- Incorrect
sample_namesinput variable nomenclature. LIMSport is a set-level workflow and uses the followingsample_namesinput nomenclature: 'this.[data table name]s.[data table name]_id'. - Missing set-level control samples. Verify that all control sample types specified in the configuration file are included in the sample set.
- File parsing. Verify that
allow_file_parsingis set totrueif the configuration reads and/or extracts values from files.
Need help?¶
Contact us for help creating a configuration file that matches your LIMS requirements or reporting needs.