boxplot.cell.counts: Plot cell counts for each sample (default CD3+ cells)

Description Usage Arguments Value Examples

View source: R/CellCountsQC.R

Description

Plot the number of cells that are CD3+ (or your specified population) for each sample. Run this function once for each batch to be combined later. Can use to look for batch effects.

Usage

1
2
3
4
boxplot.cell.counts <- function(flowJoXmlPath=NULL, gatingSetPath=NULL,
                    fcsPath=if (!.isnull(flowJoXmlPath)) { dirname(flowJoXmlPath) },
                    outdir=NULL, sampleGroup=3, subpopulation="3+",
                    keywords2import=NULL, stratifyByLevel1, stratifyByLevel2=NULL)

Arguments

flowJoXmlPath

full path to FlowJo Xml file for import (flowJoXmlPath or gatingSetPath or gatingSet is required)

gatingSetPath

path to saved GatingSet directory for import (flowJoXmlPath or gatingSetPath or gatingSet is required)

gatingSet

a GatingSet object (flowJoXmlPath or gatingSetPath or gatingSet is required)]

fcsPath

(Optional) directory where FCS files reside, if not in the same directory as flowJoXmlPath

outdir

(Optional) directory to save boxplot in. If not given, returns the boxplot instead.

sampleGroup

(Optional) Specify this if you are providing a flowJoXmlPath and the flowJo sample group is not 3

subpopulation

(Optional) node name to use for counts, if not 3+

keywords2import

(Optional) keywords to import from flowJo into GatingSet metadata, required for flowJoXmlPath

stratifyByLevel1

Required keyword on which to stratify boxplot data (usually "PATIENT ID")

stratifyByLevel2

(Optional) additional keyword on which to stratify boxplot data

batch

the batch name, required if data is passed in as a gatingSet

threshold

(Optional) where to draw the threshold cutoff line for number of cells, default 25,000

yUpperExpand

(Optional) This will expand the yaxis to have this upper limit, if applicable.

Value

Boxplot of cell counts stratified by stratifyByLevel1, unless outdir is specified.

Examples

1
2
3
4
5
6
7
## Not run: 
boxplot.cell.counts(flowJoXmlPath="/home/Batch1Directory/Batch1FlowJo.xml",
                    keywords2import=c("PATIENT ID", "Barcode"),
                    stratifyByLevel1="PATIENT ID",
                    stratifyByLevel2="Barcode")
                    
## End(Not run)

seshadrilab/COMPASSHelpers documentation built on May 6, 2019, 6:04 p.m.