countClones {alakazam}R Documentation

Tabulates clones sizes

Description

countClones determines the number of sequences and total copy number of clonal groups.

Usage

countClones(
  data,
  groups = NULL,
  copy = NULL,
  clone = "clone_id",
  remove_na = TRUE
)

Arguments

data

data.frame with columns containing clonal assignments.

groups

character vector defining data columns containing grouping variables. If groups=NULL, then do not group data.

copy

name of the data column containing copy numbers for each sequence. If this value is specified, then total copy abundance is determined by the sum of copy numbers within each clonal group.

clone

name of the data column containing clone identifiers.

remove_na

removes rows with NA values in the clone column if TRUE and issues a warning. Otherwise, keeps those rows and considers NA as a clone in the final counts and relative abundances.

Value

A data.frame summarizing clone counts and frequencies with columns:

Also includes additional columns specified in the groups argument.

Examples

# Without copy numbers
clones <- countClones(ExampleDb, groups="sample_id")

# With copy numbers and multiple groups
clones <- countClones(ExampleDb, groups=c("sample_id", "c_call"), copy="duplicate_count")


[Package alakazam version 1.3.0 Index]