reference_dbscan {dPCP}R Documentation

Find the empty partitions and single target clusters in the reference sample

Description

This function computes a DBSCAN analysis to identify single target clusters in the reference samples listed in the sample table. If a reference_dbscan template file with the same input paramters (reference ID, eps, minPts) is available, data are retrived from the template file.

Usage

reference_dbscan(
  reference.subquality,
  sample.table,
  eps = 200,
  minPts = 50,
  save.template = FALSE
)

## S3 method for class 'reference_dbscan'
plot(x, ..., reference = "all")

Arguments

reference.subquality

an object of class read_reference, inherited from read_reference.

sample.table

object of class sample_table, inherited from read_sampleTable.

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.

save.template

logical. If TRUE a template of DBSCAN analysis of reference samples is saved. When system is Thermo Fisher, save.template can be also a character vector indicating the chipID.

x

an object of class reference_dbscan

...

Arguments to be passed to methods

reference

'all' to show all reference samples, or a character vector with chip ID (Thermo Fisher) or the file name (Bio-rad) of reference samples to be showed.

Value

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

quality

quality threshold used in read_reference.

data

a matrix with the fluorescence intensities and quality values.

dbscan

an object of class dbscan_fast, inherited from dbscan.

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)

#Reference DBSCAN clustering
dbref <- reference_dbscan(ref, sample.table, save.template = FALSE)

plot(dbref, reference = "all")


[Package dPCP version 2.0.1 Index]