plot.centers_data: Prediction of clusters centroid position

View source: R/2.clustering_part1.R

centers_dataR Documentation

Prediction of clusters centroid position

Description

This function calculates the coodintaes of all clusters centroid.

Usage

centers_data(sample.subquality, sample.table, referenceDB)

## S3 method for class 'centers_data'
plot(x, ..., sample = "all")

Arguments

sample.subquality

an object of class read_sample, inherited from read_sample.

sample.table

object of class sample_table, inherited from read_sampleTable.

referenceDB

an object of class reference_dbscan, inherited from reference_dbscan

x

an object of class centers_data

...

Arguments to be passed to methods

sample

'all' to show all samples, or a numeric vector indicating the row number of samples in the sample table.

Value

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

quality

quality threshold used in read_sample.

reference

reference ID.

centers

a data frame with the centroids coordinates.

data

a data frame with the fluorescence intensities.

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)

#Predict position of clusters centroid from reference DBSCAN results
cent <- centers_data(samp, sample.table,dbref)

plot(cent, sample = "all")


dPCP documentation built on Aug. 13, 2023, 1:07 a.m.