Importing and exporting RDES files

RDML7 authors

RDES in brief

RDES is the Real-time PCR Data Essential Spreadsheet Format defined by the RDML Consortium. It is a simpler exchange format for raw qPCR data.

An RDES file:

The preferred extension is .tsv; .csv and .txt are also accepted by the RDES specification.

Import amplification data

rdesamp <- system.file(
  "extdata",
  "RDES_v1_0_example_amplification.tsv",
  package = "RDML7")
amp <- readRDML(rdesamp)

The format can also be selected explicitly.

amp <- readRDML(
  rdesamp,
  format = "rdes",
  expId = "RDES",
  runId = "run1"
)

Import melting data

rdesmelt <- system.file(
  "extdata",
  "RDES_v1_0_example_melting.tsv",
  package = "RDML7")
melt <- readRDML(rdesmelt)

request <- asTable(melt)
request <- request[request$mdp, ]

meltData <- getFData(
  melt,
  request = request,
  dpType = "mdp",
  longTable = TRUE
)

Import an amplification/melting pair

RDES stores the two curve types in independent files. Use companionFile to merge them into one RDML run.

both <- readRDML(
  rdesamp,
  format = "rdes",
  companionFile = rdesmelt,
  expId = "exp1",
  runId = "run1"
)

asDendrogram(both)

Column mapping

RDES RDML
Well reaction id / position
Sample sample id
Sample Type target-specific sample type
Target target id
Target Type toi / ref
Dye target dye id
Cq dataType$cq
Tm dataType$meltTemp
cycle columns amplification fpoints
temperature columns melting fpoints

RDES uses unkn when the sample type is unavailable and toi when the target type is unavailable.

Multiple Tm values

RDES allows several Tm values separated by semicolons without spaces:

87.8;82.2

The RDML package preserves the full vector in the meltTemp. RDES export can write all values back. Standard RDML XML has a single meltTemp, but RDML7 package ignores that!

rdesmeltsemi <- system.file(
  "extdata",
  "RDES_v1_0_example_melting_semicolon.tsv",
  package = "RDML7")
meltsemi <- readRDML(
  rdesmeltsemi,
  format = "rdes"
)
meltsemi$experiment$RDES$run$RDES_v1_0_example_melting_semicolon$react$A1$data$`Exon 1`$meltTemp

Strict parsing

RDES_v1_0_example_melting_semicolon.tsv contains error: space after ;.

readRDML(
  rdesmeltsemi,
  format = "rdes",
  strict = TRUE
)

The normal parser accepts and normalizes some practical text-file deviations; strict mode converts them into errors.

Export amplification or melting data

writeRDML(
  both,
  "run_amplification.tsv",
  format = "rdes",
  expId = "exp1",
  runId = "run1",
  rdesType = "adp"
)

writeRDML(
  both,
  "run_melting.tsv",
  format = "rdes",
  expId = "exp1",
  runId = "run1",
  rdesType = "mdp"
)

Export both RDES files

paths <- writeRDML(
  both,
  "runboth.tsv",
  format = "rdes",
  expId = "exp1",
  runId = "run1",
  rdesType = "both"
)

paths["amplification"]
paths["melting"]

The writer creates independent _amplification and _melting files.

Raw fluorescence

RDES is intended for raw fluorescence as measured by the instrument. According to the RDES specification, machine-background correction is acceptable, but baseline fluorescence correction should not be applied before RDES export.

Specification

The current RDES description is published by the RDML Consortium at https://rdml.org/rdes.html.