View the proportional contribution of clones by Seurat or SCE object
meta data after combineExpression()
. The visualization
is based on the ggalluvial package, which requires the aesthetics
to be part of the axes that are visualized. Therefore, alpha, facet,
and color should be part of the the axes you wish to view or will
add an additional stratum/column to the end of the graph.
alluvialClones(
sc.data,
cloneCall = "strict",
chain = "both",
y.axes = NULL,
color = NULL,
alpha = NULL,
facet = NULL,
exportTable = FALSE,
palette = "inferno",
...
)
The product of combineExpression()
.
Defines the clonal sequence grouping. Accepted values
are: gene
(VDJC genes), nt
(CDR3 nucleotide sequence), aa
(CDR3 amino
acid sequence), or strict
(VDJC + nt). A custom column header can also be used.
The TCR/BCR chain to use. Use both
to include both chains
(e.g., TRA/TRB). Accepted values: TRA
, TRB
, TRG
, TRD
, IGH
, IGL
(for both light chains), both
.
The columns that will separate the proportional . visualizations.
The column header or clone(s) to be highlighted.
The column header to have gradated opacity.
The column label to separate.
If TRUE
, returns a data frame or matrix of the results
instead of a plot.
Colors to use in visualization - input any hcl.pals.
Additional arguments passed to the ggplot theme
A ggplot object visualizing categorical distribution of clones, or a
data.frame if exportTable = TRUE
.
# Getting the combined contigs
combined <- combineTCR(contig_list,
samples = c("P17B", "P17L", "P18B", "P18L",
"P19B","P19L", "P20B", "P20L"))
# Getting a sample of a Seurat object
scRep_example <- get(data("scRep_example"))
# Using combineExpresion()
scRep_example <- combineExpression(combined, scRep_example)
scRep_example$Patient <- substring(scRep_example$orig.ident, 1,3)
# Using alluvialClones()
alluvialClones(scRep_example,
cloneCall = "gene",
y.axes = c("Patient", "ident"),
color = "ident")