read_reference {dPCP}R Documentation

Read reference files

Description

This function reads the results files of reference samples listed in the sample table. Fluoresce intensity and quality value (just for Thermo Fisher) are collected. If a reference_dbscan template file with the same input paramters (reference ID, eps, minPts) is available, fluorescence data, quality value and dbscan analysis results are retrived from the template file.

Usage

read_reference(
  sample.table,
  system = NULL,
  file.location = ".",
  reference.quality = 0.5,
  eps = NULL,
  minPts = NULL
)

Arguments

sample.table

object of class sample_table, inherited from read_sampleTable.

system

character. The name of digital PCR system used to generate the data. It must be either Thermo Fisher or Bio-Rad. Abbreviations are also accepted.

file.location

character. Full path name to reference and sample files location. The default corresponds to the working directory, (getwd). Tilde expansion (see (path.expand)) is performed.

reference.quality

numeric. Between 0 and 1. Quality threshold to subset the data. If different thresholds have to be applied to various reference samples, a vectror of the same length of number of reference samples has to be provided. Used only when the system is Thermo Fisher.

eps, minPts

numeric. Input parameters for the DBSCAN algorithm. If they match the paramters of reference_dbscan template file, the data are retrived from the template.

Value

An object of class read_reference containing a sublist for each reference. Each sublist has the following components:

quality

value of the reference.quality parameter.

data

a matrix with the fluorescence intensities and quality values.

dbscan

an object of class dbscan_fast, inherited from dbscan. This component is available only if a reference_dbscan template file is used to retrive the data.

Examples

library(dPCP)

#Find path of sample table and location of reference and input files
sampleTable <- system.file("extdata", "Template_sampleTable.csv",
                     package = "dPCP")

fileLoc <- system.file("extdata", package = "dPCP")

#Read sample table file
sample.table <- read_sampleTable(sampleTable, system = "bio-rad",
                                 file.location = fileLoc)

#Read reference files
ref <- read_reference(sample.table, system = "bio-rad",
                      file.location = fileLoc)

[Package dPCP version 2.0.1 Index]