This function generates a network based on clonal proportions of an indicated identity and then superimposes the network onto a single-cell object dimensional reduction plot.
clonalNetwork(
sc.data,
cloneCall = "strict",
chain = "both",
reduction = "umap",
group.by = "ident",
filter.clones = NULL,
filter.identity = NULL,
filter.proportion = NULL,
filter.graph = FALSE,
exportClones = FALSE,
exportTable = FALSE,
palette = "inferno",
...
)
The single-cell object after 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 name of the dimensional reduction of the single-cell object.
A column header in the metadata or lists to group the analysis by (e.g., "sample", "treatment"). This will be the nodes overlaid onto the graph.
Use to select the top n clones (e.g., filter.clones`**` = 2000) or n of clones based on the minimum number of all the comparators (e.g., `filter.clone
= "min").
Display the network for a specific level of the indicated identity.
Remove clones from the network below a specific proportion.
Remove the reciprocal edges from the half of the graph, allowing for cleaner visualization.
Exports a table of clones that are shared across multiple identity groups and ordered by the total number of clone copies.
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
ggplot object
if (FALSE) { # \dontrun{
# 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)
# Using clonalNetwork()
clonalNetwork(scRep_example,
reduction = "umap",
group.by = "seurat_clusters")
} # }