View source: R/alluvialClones.R
alluvialClones | R Documentation |
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"
)
sc.data |
The single-cell object to visualize
after |
cloneCall |
How to call the clone - VDJC gene (gene), CDR3 nucleotide (nt), CDR3 amino acid (aa), VDJC gene + CDR3 nucleotide (strict) or a custom variable in the data. |
chain |
indicate if both or a specific chain should be used - e.g. "both", "TRA", "TRG", "IGH", "IGL". |
y.axes |
The columns that will separate the proportional . visualizations. |
color |
The column header or clone(s) to be highlighted. |
alpha |
The column header to have gradated opacity. |
facet |
The column label to separate. |
exportTable |
Exports a table of the data into the global environment in addition to the visualization. |
palette |
Colors to use in visualization - input any hcl.pals. |
Alluvial ggplot comparing clone distribution.
#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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.