calc_mean_sd_197: Calculate the mean and the standard deviation of Standford's...

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

View source: R/calc_mean_sd_functions.R

Description

This method calculated the mean and the standard deviation from peaks identified in date generated by running Stanford's "197 calibration beads". Back in 1993, Spherotech pruduced calibration beads for Stanford and these are the 197th bead sample that Spherotech sent to Stanford. These have then been used at Stanford until 2013. Later on, Spherotech sent a new batch of similar 3 micron single-level multi-dye bead lot called "RCP-30-5A LotAE01", but, since the FACS Facility users were used to looking for 197 beads, these were simply called 197B. These beads were used as one of the reference particles in the 23 instrument multi-site instrument comparison that flowQB was originally designed to analyze. These beads provides a convenient stable single peak reference with reasonable signal levels on all of the usual fluorescence channels. Unfortunately, the amount of 197B available was small, so in 2014, Spherotech sent a new batch, which was later called 197C at Stanford.

Usage

1
    calc_mean_sd_197(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

The method fits an ellipse gate on the 2 specified scatter channels and then locates the peak of that populations in each of the fluorescence channels and finally uses the getOutliers method from the extremevalues package in order to calculate the mean and the standard deviation of the result for each of the fluorescence channels.

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_duke,

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
33
34
35
36
37
38
39
40
41
    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 <- 14
    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_197(fcs_path, scatter_channels, ignore_channels)

    ## Same thing as above with providing the arguments directly without
    ## parsing it from the spreadsheet.
    fcs_path <- system.file("extdata", "SSFF_LSRII", "Other_Tests", 
        "933743.fcs", package="flowQBData")
    scatter_channels <- c("FSC-A", "SSC-A")
    ignore_channels <- c(
        "Time", "FSC-A", "FSC-W", "FSC-H", "SSC-A", "SSC-W", "SSC-H")
    results <- calc_mean_sd_197(fcs_path, scatter_channels, ignore_channels)

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