flowType: flowType: Phenotyping Flow Cytometry Assays

Description Usage Arguments Value Author(s) References Examples

View source: R/flowType.R

Description

flowType uses a simple threshold, Kmeans, flowMeans or flowClust to partition every channel to a positive and a negative cell population. These partitions are then combined to generate a set of multi-dimensional phenotypes.

Usage

1
2
flowType(Frame, PropMarkers=NULL, MFIMarkers=NULL, Methods='kmeans', MarkerNames=NULL, MaxMarkersPerPop=NULL, PartitionsPerMarker=2, Thresholds=NULL, MemLimit=4,verbose=FALSE)
#If upgrading from flowType 1.x to 2.x, please check documentation as some arguments have changed slightly.

Arguments

Frame

A flowFrame (after transformation) that is going to be phenotyped.

PropMarkers

A vector of the indexes or names of the markers to partition to specify phenotypes. If NULL, all markers in the frame will be used.

MFIMarkers

A vector of the indexes or names of the markers for which MFIs must be measured. If NULL, no markers will be used.

Methods

A single string specifying the method to use to determine thresholds for partitioning of markers. Values can be "kmeans", "flowMeans", "flowClust", or "Thresholds". If "Thresholds" is specified, user-specified thresholds must be provided via the Thresholds parameter.

MarkerNames

A vector of names for the channels. If NULL, the names in Frame will be used.

MaxMarkersPerPop

An integer specifying the maximum number of markers to use to define populations (how "deep" to phenotype). This should be less than or equal to PropMarkers. If NULL, will default to the length of PropMarkers.

PartitionsPerMarker

An integer or vector of integers specifing the number of partitions per marker. If a single integer, this number will be used for all markers. If a vector, the numbers will be matched with PropMarkers in order.

Thresholds

A list of vectors specifying per-channel thresholds. Each list item corresponds to one marker, and contains the threshold(s) for that marker. If only one vector is provided in the list, then those thresholds will be used for all markers. Otherwise, the list must be of the same length as PropMarkers. Note: if Methods == 'thresholds', then Thresholds must be specified. If not, it is ignored.

MemLimit

Memory limit in GB. flowType will do a sanity check before executing, and if the total size of counts plus MFI values for all populations would exceed MemLimit, will not run.

verbose

Boolean variable. If TRUE, information about different processing tasks will be printed into the standard output.

Value

CellFreqs:

Object of class "numeric" containing the cell frequencies measured for each phenotype. Phenotype names are assigned as labels.

MFIs:

Object of class "matrix" containing the measured MFIs for each phenotype. Phenotype names are assigned as column labels and marker names as row labels.

PropMarkers

A vector of the indexes or names of the markers for which cell proportions must be measured.

MFIMarkers

A vector of the indexes or names of the markers for which MFIs must be measured.

MarkerNames

A vector of names for the channels. If NULL, the names provided in Frame will be used.

Partitions

A matrix where each column shows the partitioning of the respective channel. 1 and 2 correspond to negative and positive, respectively.

PhenoCodes

A vector of strings of length N (the number of markers) for each phenotype measured. For every phenotype, the character corresponding to a given marker can be 0, 1, 2, etc for neutral, negative, positive, bright, etc. See the provided vigenette for more details and examples.

Author(s)

Nima Aghaeepour, Kieran O'Neill

References

Please cite the following for the current version of flowType:

O'Neill K, Jalali A, Aghaeepour N, Hoos H, Brinkman RR. Enhanced flowType/RchyOptimyx: a BioConductor pipeline for discovery in high-dimensional cytometry data. Bioinformatics. 2014 May 1;30(9):1329-30. doi: 10.1093/bioinformatics/btt770

The original paper and description can be found at:

Nima Aghaeepour, Pratip K. Chattopadhyay, Anuradha Ganesan, Kieran O'Neill, Habil Zare, Adrin Jalali, Holger H. Hoos, Mario Roederer, and Ryan R. Brinkman. Early Immunologic Correlates of HIV Protection can be Identified from Computational Analysis of Complex Multivariate T-cell Flow Cytometry Assays. Bioinformatics, 2011.

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
#Load the library
library(flowType)
data(DLBCLExample)

#These markers will be analyzed
PropMarkers <- 3:5
MFIMarkers <- PropMarkers
MarkerNames <- c('FS', 'SS','CD3','CD5','CD19')

#Run flowType
Res <- flowType(DLBCLExample, PropMarkers, MFIMarkers, 'kmeans', MarkerNames);

MFIs=Res@MFIs;
Proportions=Res@CellFreqs;
Proportions <- Proportions / max(Proportions)
names(Proportions) <- unlist(lapply(Res@PhenoCodes, 
                      function(x){return(decodePhenotype(
                      x,Res@MarkerNames[PropMarkers],
                      Res@PartitionsPerMarker))}))

#Select the 30 largest phenotypes
index=order(Proportions,decreasing=TRUE)[1:30]
bp=barplot(Proportions[index], axes=FALSE, names.arg=FALSE)
text(bp+0.2, par("usr")[3]+0.02, srt = 90, adj = 0, labels = names(Proportions[index]), xpd = TRUE, cex=0.8)
axis(2);
axis(1, at=bp, labels=FALSE);
title(xlab='Phenotype Names', ylab='Cell Proportion')

#These phenotype can be analyzed using a predictive model (e.g., classification or regression)

flowType documentation built on April 28, 2020, 8:32 p.m.