calc_mean_sd_duke: Calculate the mean and the standard deviation of calibration...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/calc_mean_sd_functions.R

Description

Currently, this is the same calculation as calc_mean_sd_197.

Usage

1
    calc_mean_sd_duke(fcs_file_path, scatter_channels, ignore_channels)

Arguments

fcs_file_path

A character string specifying the file path to the FCS file with the acquired bead data.

scatter_channels

A vector of 2 short channel names (values of the $PnN keywords) specifying the 2 channels that should not be used to gate the main bead population. The first channel should be a forward scatter channel, the second one should be a side scatter channel.

ignore_channels

A vector of short channel names (values of the $PnN keywords) specifying channels that should not be considered for the fitting procedure. Normally, those should be all non-fluorescence channels, such as the time and the (forward and side) scatter channels.

Details

Currently, this is the same calculation as calc_mean_sd_197.

Value

The result is a data frame with columns corresponding to short channel names of channels from the input FCS file except those specified by the ignore_channels parameter. The rows include the total number of events, the number of events in the FSC/SSC ellipse gate, the number of events in the peak gate (which can vary slighly among the different channels), the mean and the standard deviation.

Author(s)

Wayne Moore, Faysal El Khettabi, Josef Spidlen

See Also

fitted_ellipse_gate, calc_mean_sd_197

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
    library(flowCore)
    library(xlsx)
    library(flowQBData)

    inst_xlsx_path <- system.file("extdata", 
        "140126_InstEval_Stanford_LSRIIA2.xlsx", package="flowQBData")
    xlsx <- read.xlsx(inst_xlsx_path, 1, headers=FALSE, stringsAsFactors=FALSE)
    
    ignore_channels_row <- 9
    ignore_channels <- vector()
    i <- 1
    while(!is.na(xlsx[[i+4]][[ignore_channels_row]])) {
        ignore_channels[[i]] <- xlsx[[i+4]][[ignore_channels_row]]
        i <- i + 1
    }
    
    instrument_folder_row <- 9
    instrument_folder_col <- 2
    instrument_folder <- xlsx[[instrument_folder_col]][[instrument_folder_row]]

    test_column <- 13
    test_row <- 14
    folder <- xlsx[[test_column]][[test_row]]
    beads_file_name <- xlsx[[test_column]][[test_row+1]]
    scatter_channels <- c(
        xlsx[[test_column]][[test_row+2]], 
        xlsx[[test_column]][[test_row+3]])

    fcs_path <- system.file("extdata", instrument_folder, folder,
        beads_file_name, package="flowQBData")

    results <- calc_mean_sd_duke(fcs_path, scatter_channels, ignore_channels)

flowQB documentation built on May 6, 2019, 3:05 a.m.