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 |
copy |
name of the |
clone |
name of the |
remove_na |
removes rows with |
Value
A data.frame summarizing clone counts and frequencies with columns:
-
clone_id
: clone identifier. This is the default column name, specified withclone='clone_id'
. If the function call uses Change-O formatted data andclone='CLONE'
, this column will have nameCLONE
. -
seq_count
: total number of sequences for the clone. -
seq_freq
: frequency of the clone as a fraction of the total number of sequences within each group. -
copy_count
: sum of the copy counts in thecopy
column. Only present if thecopy
argument is specified. -
copy_freq
: frequency of the clone as a fraction of the total copy number within each group. Only present if thecopy
argument is specified.
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")