parse_phenotypes: Parse a vector of phenotype names

Description Usage Arguments Value Details Examples

View source: R/select_rows.R

Description

This helper function takes a user-friendly list of single and multiple phenotype names and converts it to a named list of phenotype selectors for use with phenoptr::select_rows. By using parse_phenotypes a user does not have to know the (somewhat inscrutable) details of select_rows.

Usage

1

Arguments

...

Phenotypes to be decoded, or a list of same, optionally with names.

Value

A named list of phenotype selectors for use with phenoptr::select_rows.

Details

Each phenotype must be either a single phenotype name (e.g. CD3+ or CD8-) or two or more names separated by a slash (/) or comma (,).

Phenotypes containing slashes are interpreted as requiring all of the individual phenotypes. For example, "CD3+/CD8-" is a CD3+ cell which is also CD8-.

Phenotypes containing commas are interpreted as requiring any of the individual phenotypes. For example, "CD68+,CD163+" is a cell which is either CD68+ or CD163+ or both.

Additionally, a phenotype name without a + or - and containing either "Total" or "All" will be interpreted as meaning "All cells".

Examples

1
2
3
4
5
6
7
8
# Create selectors for
# - All CD3+ cells
# - CD3+/CD8+ double-positive cells
# - CD3+/CD8- single-positive cells
# - All cells regardless of phenotype
# - Macrophages, defined as either CD68+ OR CD163+
parse_phenotypes("CD3+", "CD3+/CD8+", "CD3+/CD8-",
                 "Total Cells", Macrophage="CD68+,CD163+")

PerkinElmer/phenoptr documentation built on May 30, 2019, 8:01 a.m.