clusterExtractp: takes a flowframe, name of cluster column and extracts part...

Description Usage Arguments Value Examples

View source: R/cluster_extract.R

Description

takes a flowframe, name of cluster column and extracts part of flowframe that makes up proportion.

Usage

1
clusterExtractp(flowfile, cluster_var = "Clusters", proportion = 1)

Arguments

flowfile

flowframe after debris are removed.

cluster_var

column name in expression matrix containing the cluter indicators

proportion

value between 0 and 1 indicating percentage of the total particles wanted

Value

a list containing

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
flowfile_path <- system.file("extdata", "B4_18_1.fcs", 
                             package = "cyanoFilter",
                             mustWork = TRUE)
flowfile <- flowCore::read.FCS(flowfile_path, alter.names = TRUE,
                               transformation = FALSE, emptyValue = FALSE,
                               dataset = 1) 
flowfile_nona <- cyanoFilter::noNA(x = flowfile)
flowfile_noneg <- cyanoFilter::noNeg(x = flowfile_nona)
flowfile_logtrans <- cyanoFilter::lnTrans(x = flowfile_noneg, 
                                         c('SSC.W', 'TIME'))
cells_nonmargin <- cyanoFilter::cellMargin(flowframe = flowfile_logtrans, 
                              Channel = 'SSC.W',
           type = 'estimate', y_toplot = "FSC.HLin")
fin <- phytoFilter(flowfile = reducedFlowframe(cells_nonmargin),
              pig_channels = c("RED.B.HLin", "YEL.B.HLin", "RED.R.HLin"),
              com_channels = c("FSC.HLin", "SSC.HLin"))

clusterExtractp(flowfile = reducedFlowframe(fin),
    cluster_var = "Clusters",
    proportion = 0.80)

fomotis/cyanoFilter documentation built on Aug. 1, 2021, 10:58 p.m.