read.electrophoresis: Read files into an electrophoresis object

View source: R/electrophoresis.R

read.bioanalyzerR Documentation

Read files into an electrophoresis object

Description

These functions read one or more XML, CSV, or ZIP files exported from the Agilent software (and accompanying unaligned electropherogram CSV files if from a TapeStation) and calls the appropriate function to read them into an electrophoresis object, which is filled out with estimates of molecule length, concentration, and molarity (see calibrate.electrophoresis). read.electrophoresis is the easiest to use as it automatically infers the correct file type.

Usage

read.bioanalyzer(xml.file, method = "hyman", extrapolate = FALSE)

read.electrophoresis(
  ...,
  method = "hyman",
  extrapolate = FALSE,
  mc.cores = if (.Platform$OS.type == "windows") 1 else detectCores()
)

read.prosize(
  electropherogram.csv,
  calibration.csv = NULL,
  peaks.csv = NULL,
  smear.csv = NULL,
  quality.csv = NULL,
  method = "hyman",
  extrapolate = FALSE,
  batch = NULL
)

read.prosize.zip(prosize.zip, method = "hyman", extrapolate = FALSE)

read.tapestation(
  xml.file,
  csv.file = NULL,
  method = "hyman",
  extrapolate = FALSE
)

Arguments

xml.file

The filename of an XML file exported from the Bioanalyzer or TapeStation software. The XML file may be compressed with 'gzip' and the filename can be a remote URL. The filename is expected to end in .xml or .xml.gz and the name before that extension is used as the name of the batch. A TapeStation XML file must be accompanied by a CSV file, whose path is inferred from the XML file's if its name is in the expected format.

method

The method used to fit the mobility model of molecule length vs. migration distance, either "interpolation" (linear interpolation via approxfun), "loglinear" (log-linear regression via lm with the model relative.distance ~ log(length)), or one of the methods of splinefun (monotone methods recommended). Can be abbreviated.

...

One or more XML files exported from the Bioanalyzer or TapeStation software, or CSV or ZIP files exported from the ProSize software.

mc.cores

Maximum number of CPU cores to use (passed to mclapply). Only one core is used per input file.

electropherogram.csv

An electropherogram CSV exported by ProSize.

calibration.csv

A size calibration CSV exported by ProSize.

peaks.csv

A peak table CSV exported by ProSize.

smear.csv

A smear analysis CSV exported by ProSize.

quality.csv

A quality table CSV exported by ProSize.

batch

Name of the batch.

prosize.zip

Path of a ZIP file containing the required CSVs exported by ProSize.

csv.file

The filename of an electropherogram CSV file exported from the TapeStation software. The file may be compressed with gzip and the filename is expected to end in _Electropherogram.csv or _Electropherogram.csv.gz. The filename can be a remote URL. The electropherogram is expected to be unaligned.

Functions

  • read.bioanalyzer: Read a Bioanalyzer XML file

  • read.prosize: Read ProSize CSV files

  • read.prosize.zip: Read a ProSize ZIP file

  • read.tapestation: Read a TapeStation XML and CSV file pair


jwfoley/bioanalyzeR documentation built on Aug. 1, 2023, 4:46 a.m.