clonalNetwork: Visualize clonal network along reduced dimensions

View source: R/clonalNetwork.R

clonalNetworkR Documentation

Visualize clonal network along reduced dimensions

Description

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.

Usage

clonalNetwork(
  sc.data,
  reduction = "umap",
  group.by = "ident",
  filter.clones = NULL,
  filter.identity = NULL,
  filter.proportion = NULL,
  filter.graph = FALSE,
  cloneCall = "strict",
  chain = "both",
  exportClones = FALSE,
  exportTable = FALSE,
  palette = "inferno"
)

Arguments

sc.data

The single-cell object after combineExpression.

reduction

The name of the dimensional reduction of the single-cell object.

group.by

The variable to use for the nodes.

filter.clones

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").

filter.identity

Display the network for a specific level of the indicated identity.

filter.proportion

Remove clones from the network below a specific proportion.

filter.graph

Remove the reciprocal edges from the half of the graph, allowing for cleaner visualization.

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".

exportClones

Exports a table of clones that are shared across multiple identity groups and ordered by the total number of clone copies.

exportTable

Exports a table of the data into the global

palette

Colors to use in visualization - input any hcl.pals.

Value

ggplot object

Examples

## Not run: 
#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")

## End(Not run)
              

ncborcherding/scRepertoire documentation built on May 8, 2024, 6:28 a.m.