select_compass_pops {COMPASS} | R Documentation

## Flag COMPASS boolean populations

### Description

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

### Usage

    select_compass_pops(cellpops, markers)

### 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

    #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])]

[Package COMPASS version 1.27.0 Index]