read_sample {dPCP}R Documentation

Read sample files

Description

This function reads the results files of samples listed in the sample table. Fluoresce intensity and quality value (just for Thermo Fisher) are collected.

Usage

read_sample(
  sample.table,
  system = NULL,
  file.location = ".",
  sample.quality = 0.5,
  partition.volume = 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.

sample.quality

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

partition.volume

numeric. This parameters is taken into account when the parameter 'system' is set on Other. Indicate the partion volume in microliters spcific to the digital PCR system.

Value

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

quality

value of the sample.quality parameter.

data

a matrix with the fluorescence intensities and quality values.

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)

#Read samples files
samp <- read_sample(sample.table, system = "bio-rad",
                    file.location = fileLoc)

[Package dPCP version 2.0.1 Index]