| countGenes {alakazam} | R Documentation |
Determines the count and relative abundance of V(D)J alleles, genes or families within groups.
countGenes(data, gene, groups = NULL, copy = NULL, clone = NULL,
fill = FALSE, mode = c("gene", "allele", "family", "asis"))
data |
data.frame with Change-O style columns. |
gene |
column containing allele assignments. Only the first allele in the
column will be considered when |
groups |
columns containing grouping variables. If |
copy |
name of the |
clone |
name of the |
fill |
logical of |
mode |
one of |
A data.frame summarizing family, gene or allele counts and frequencies with columns:
GENE: name of the family, gene or allele
SEQ_COUNT: total number of sequences for the gene.
SEQ_FREQ: frequency of the gene as a fraction of the total
number of sequences within each grouping.
COPY_COUNT: sum of the copy counts in the copy column.
for each gene. Only present if the copy
argument is specified.
COPY_FREQ: frequency of the gene as a fraction of the total
copy number within each group. Only present if
the copy argument is specified.
CLONE_COUNT: total number of clones for the gene.
CLONE_FREQ: frequency of the gene as a fraction of the total
number of clones within each grouping.
Additional columns defined by the groups argument will also be present.
# Without copy numbers
genes <- countGenes(ExampleDb, gene="V_CALL", groups="SAMPLE", mode="family")
genes <- countGenes(ExampleDb, gene="V_CALL", groups="SAMPLE", mode="gene")
genes <- countGenes(ExampleDb, gene="V_CALL", groups="SAMPLE", mode="allele")
# With copy numbers and multiple groups
genes <- countGenes(ExampleDb, gene="V_CALL", groups=c("SAMPLE", "ISOTYPE"),
copy="DUPCOUNT", mode="family")
# Count by clone
genes <- countGenes(ExampleDb, gene="V_CALL", groups=c("SAMPLE", "ISOTYPE"),
clone="CLONE", mode="family")
# Count absent genes
genes <- countGenes(ExampleDb, gene="V_CALL", groups="SAMPLE",
mode="allele", fill=TRUE)