densityPlot: Draw density plot for each cell cluster.

Description Usage Arguments Details Value Examples

View source: R/densityPlot.R

Description

A function that draws density plot for each cell cluster.

Usage

1
densityPlot(fcsFrame, clusterList, cutoff, markerToPlot = NULL)

Arguments

fcsFrame

A flow Frame object returned from preprocessing function.

clusterList

A list, each element should be a vector containing the IDs of all cells that belong to a cluster

cutoff

A vector of cutoff values to bisect the distribution of each marker. The names of the vector should be the same as the marker names.

markerToPlot

A vector specifying markers included in the plot. If NULL, all markers will be plotted.

Details

The plot can be very large, we suggest plotting it into a pdf jpeg file directly.

Value

NULL. The plot will show up automatically.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Find fcs files
files=system.file("extdata","SDY420/ResultFiles/CyTOF_result",
                  package="MetaCyto")
files=list.files(files,pattern="fcs$",full.names=TRUE)
# Preprocess
fcs = preprocessing(fcsFiles=files,assay ="CyTOF",b=1/8)
# Search clusters
cluster_list=searchCluster(fcsFrame=fcs,
                           clusterLabel=c("CD3+|CD8+","CD3-|CD19+"))
# plot density plot for clusters
densityPlot(fcs,
            clusterList=cluster_list$clusterList,
            cutoff=cluster_list$cutoff,
            markerToPlot=c("CD3","CD8","CD19"))

MetaCyto documentation built on Nov. 8, 2020, 7:50 p.m.