Parse CSV
Available from: Clarity LIMS v2.0.5
-haltOnMissingSample option and support for header section values (e.g., containerName) are introduced in NGS v5.4.0.
Data might sometimes need to be parsed from an instrument result file (CSV, TSV, or other character-separated format) into Clarity LIMS, for the purposes of QC.
For example, suppose that a 96 well plate is run on a Caliper GX. The instrument produces a result file, which the user imports into Clarity LIMS. The per-sample data are parsed and stored for a range of capabilities, such as QC threshold checking, searching, and visibility in the Clarity LIMS interface.
The parseCSV script allows for the data for each well to be parsed into fields on either derived samples or result files (measurement records) that map directly to the derived samples being measured.
If the instrument result file contains data that applies to the batch of derived samples being measured, this data are stored in fields on the step.
The Script
The parseCSV script automates parsing a separated-value file, configurable but typically comma- or tab-separated, into the LIMS.
Data lines in the file are matched to the corresponding sample in the LIMS using well placement information.
A line that references well A1 of container Plate123 will have its parsed data mapped to the sample placed in well position A:1 of container Plate123 in the LIMS.
Values from the file are mapped to fields (known as UDFs in the API) in Clarity LIMS based on the automation configuration for the script.
Workflow and Configuration
Configure the step to invoke the script manually via a button in Record Details screen.
Before pressing the button that invokes the script, upload a shared result file to be parsed.
Configure the automation command line to match the destination fields configured in Clarity LIMS.
Create a field for each column that will be brought into the LIMS. Field names must not contain the separator used for the automation parameter string, "::".
When using NGS v5.0 or later, fields can be configured for the step, input samples, output samples, or output result files. Versions before this release support only output result files.
Input result files are not supported.
Script Parameters
Parameter
Description
-u {user}
LIMS username (Required)
-p {password}
LIMS password (Required)
-i {URI}
LIMS process URI (Required)
-inputFile {result file}
Instrument result file to be parsed (Required)
-log {log file name}
Log file name (Required)
-containerName {container name}
Name of column header for container name
-wellPosition {well position}
Name of column header for well position
-sampleLocation {sample location}
Name of column header for <container_name>_<well>
-measurementUDFMap {measurement UDF map}
Mapping of CSV columns to fields in the LIMS. See Parameter Details.
-partialMatchUDFMap {partial match UDF map}
Mapping of CSV columns to fields in the LIMS (partial match). See Parameter Details.
-processUDFMap {process UDF map}
Mapping of CSV headers or columns to protocol step fields in the LIMS. See Parameter Details.
-headerRow {header row}
Numeric index of CSV header row, starting from one (default 1)
-separator {separator}
File separator; comma used by default if not otherwise specified (default comma)
-matchOutput {boolean}
Match by input or output placement (default false). See Parameter Details.
-setOutput {boolean}
Control which artifacts to parse information into (default true). See Parameter Details.
-relaxed {boolean}
Control whether headers are optional or mandatory (default false). See Parameter Details.
-haltOnMissingSample {boolean}
Control whether the script halts execution or warns when the Container Name and Well Position cannot be determined on any line (default true) (NGS v5.4 and later). See Parameter Details.
Script Usage
Example 1
This example uses matching Strategy 1 for a comma-separated file and maps two columns, "Region[100–1000] Conc. (ng/ul)" and "Region[100–1000] Size at Maximum [BP]", to output resultfile fields "Concentration" and "Size (bp)" in the LIMS, respectively:
Example 2
This example uses matching Strategy 2 for a tab-separated file, running in relaxed mode. It maps a column to an input sample field, using that input sample placement information, and maps a header section row to a protocol step field:
Parameter Details
Additional Information
Other scripts you may find useful are as follows.
Last updated
Was this helpful?
