Skip to contents

[Stable]

Usage

read_qview(
  path,
  strip_prefix = FALSE,
  verbose = TRUE,
  call = rlang::caller_env()
)

Arguments

path

Character. Path to the .Q-View file.

strip_prefix

Logical. If TRUE, reverse Q-View's internal naming convention via strip_qview_prefix() so identifiers match the original well-assignment template. Default FALSE.

verbose

Logical. Print a short summary after parsing. Default TRUE.

call

The execution environment of the calling function. Used for error reporting; experts only.

Value

A list with class "qview" containing:

metadata

Named list: project, plate, image, imager, product, user, report_created, qview_version, template, container_version, file_path, parsed_at.

manifest

Tibble with one row per declared file entry (name, size_bytes, parent).

segments

Tibble of H2 segment byte ranges (segment, start, end, size).

analytes

Tibble: spot_number, analyte, unit, plus lod, lloq, uloq, assay_control_low, assay_control_high when reported.

well_groups

Tibble: well_group, sample_id, is_standard, is_negative, is_sample, is_control, well_type.

pixel_intensities

Long-format tibble of replicate readings: well_group, sample_id, well, replicate, analyte, unit, pixel_intensity, dilution.

summary_statistics

Long-format tibble of per-group averages, std-dev, and CV statistics: well_group, sample_id, statistic, analyte, value, unit.

concentrations

Long-format concentration tibble or NULL when no supported concentration rows were extracted.

curve_fit

Tibble with analyte, regression_model, or NULL if not reported.

report_csv

Extracted candidate report lines in source order, including repeated copies, or NULL if none were found. This is not a complete or transaction-verified CLOB.

plate_layout

Tibble with one row per well: well, plate_row, plate_col, well_group, sample_id, well_type, dilution.

Measurement tables preserve decoded raw_value, flag, error_codes and statistic_label. Missing and incalculable cells remain explicit rows; censored numeric cells retain their bound and flag, not an invented point estimate. Nonblank malformed or nonfinite numeric values are refused. See read_qview_report() for the shared value and identity rules.

Details

Parses a .Q-View binary container (a chemiluminescent multiplex ELISA project file holding an embedded H2 database plus binary LOB segments) and extracts the assay data: project metadata, analyte panel with units, well-group sample assignments, per-well replicate pixel intensities, summary statistics, and (when present) the embedded CSV report.

This reverse-engineered reader scans printable report text inside the container. It does not open the H2 database or establish transaction recency. Identical repeated records are collapsed; conflicting candidate records and incomplete analyte rows are refused rather than selecting values by page-copy frequency. An authoritative flat CSV/XLSX report can be read with read_qview_report() when binary extraction is ambiguous. The binary scan is limited to printable ASCII spans, not a general CLOB decoder, and cannot recover a complete report across arbitrary page or encoding boundaries. Report wells are limited to A1 through H12. Sample and Assay/Lot continuation never crosses an opaque binary gap.

Parsing is done in pure R: no Java runtime, no H2 database driver, no system dependencies beyond a working R installation.

Examples

# A small synthetic .Q-View ships with the package:
path <- system.file("extdata", "example.Q-View", package = "qviewparsR")
qv <- read_qview(path)
#> ✔ Parsed example.Q-View: 5 well groups x 3 analytes (20 replicate rows).
#> ℹ Q-View Version: "3.13"
qv
#> 
#> ── Q-View project: "Example ELISA project" ─────────────────────────────────────
#> • Plate: "Plate 1"
#> • Image: "example-plate (01 Jan 2024 12:00)"
#> • Imager: "#000000 (00000)"
#> • Product: "EXAMPLE-LOT"
#> • Software: v"3.13"
#> • Template: "example-template"
#> • Created: "01 Jan 2024 12:05"
#> 
#> ── Analytes (3) ──
#> 
#> Ba (ng/ml), Bb (ug/ml), Ref Spot (N/A)
#> 
#> ── Well groups (5) ──
#> 
#> • standard: 2
#> • negative: 1
#> • control: 1
#> • sample: 1
#> 
#> ── Data ──
#> 
#> • replicate rows: 20
#> • summary stat rows: 0
#> • concentrations: 4 rows
#> • curve fit: 3 analytes
qv$analytes
#> # A tibble: 3 × 8
#>   spot_number analyte  unit       lod    lloq  uloq assay_control_low
#>         <int> <chr>    <chr>    <dbl>   <dbl> <dbl>             <dbl>
#> 1           1 Ba       ng/ml  0.065    0.26    18.9                NA
#> 2           2 Bb       ug/ml  0.00051  0.0029   0.2                NA
#> 3           3 Ref Spot N/A   NA       NA       NA                5000
#> # ℹ 1 more variable: assay_control_high <dbl>
head(qv$pixel_intensities)
#> # A tibble: 6 × 12
#>   well_group sample_id well  replicate analyte unit  pixel_intensity dilution
#>   <chr>      <chr>     <chr>     <int> <chr>   <chr>           <dbl>    <dbl>
#> 1 ICal 1     ICal 1    A1            1 Ba      ng/ml            8671       NA
#> 2 ICal 1     ICal 1    A1            1 Bb      ug/ml           19982       NA
#> 3 ICal 1     ICal 1    A2            2 Ba      ng/ml           17838       NA
#> 4 ICal 1     ICal 1    A2            2 Bb      ug/ml           23848       NA
#> 5 ICal 2     ICal 2    B1            1 Ba      ng/ml            4000       NA
#> 6 ICal 2     ICal 2    B1            1 Bb      ug/ml            5000       NA
#> # ℹ 4 more variables: raw_value <chr>, flag <chr>, error_codes <chr>,
#> #   statistic_label <chr>

if (requireNamespace("ggplot2", quietly = TRUE)) {
  plot(qv, type = "plate_map")
}