select_compass_pops: Flag COMPASS boolean populations

Description Usage Arguments Details Value See Also Examples

View source: R/utils.R

Description

Returns a boolean vector indexing cell populations in cellpops that match the pattern for boolean combinations of markers.

Usage

1

Arguments

cellpops

vector of character names of cell populations.

markers

vector of character names of markers in the order they appear in the population names.

Details

If markers A, B, C, D make up the population names in cellpops and they the names match the pattern e.g. "A+B-C+D+,Count" (typical of exports from some gating tools), then markers should be a vector of markers in the same order they appear in cellpops.

Value

A boolean vector indexing cellpops with TRUE for populations matchin the pattern.

See Also

translate_marker_names

Examples

1
2
3
4
5
6
7
8
9
#Generate some population names
markers = LETTERS[1:4]
pos = c("+","-")
popnames = apply(expand.grid(pos,pos,pos,pos),1,
            function(x)paste(paste(paste(markers,x,sep=""),
            collapse=""),",Count",sep=""))
popnames = sample(c(popnames,paste(paste(markers,sample(c("+","-"),
             length(markers),replace=TRUE),sep=""),",Count",sep="")))
popnames[select_compass_pops(popnames,LETTERS[1:4])]

COMPASS documentation built on Nov. 8, 2020, 8:05 p.m.