percentKmer: Examining the relative composition of kmer motifs in clones.

View source: R/percentKmer.R

percentKmerR Documentation

Examining the relative composition of kmer motifs in clones.

Description

This function the of kmer for nucleotide (nt) or amino acid (aa) sequences. Select the length of the kmer to quantify using the motif.length parameter.

Usage

percentKmer(
  input.data,
  chain = "TRB",
  cloneCall = "aa",
  group.by = NULL,
  motif.length = 3,
  top.motifs = 30,
  exportTable = FALSE,
  palette = "inferno"
)

Arguments

input.data

The product of combineTCR, combineBCR, or combineExpression.

chain

"TRA", "TRB", "TRG", "TRG", "IGH", "IGL".

cloneCall

How to call the clone - CDR3 nucleotide (nt) or CDR3 amino acid (aa).

group.by

The variable to use for grouping.

motif.length

The length of the kmer to analyze.

top.motifs

Return the n most variable motifs as a function of median absolute deviation.

exportTable

Returns the data frame used for forming the graph.

palette

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

Value

ggplot of percentage of kmers as a heatmap

Examples

#Making combined contig data
combined <- combineTCR(contig_list, 
                        samples = c("P17B", "P17L", "P18B", "P18L", 
                                    "P19B","P19L", "P20B", "P20L"))
percentKmer(combined, 
            chain = "TRB", 
            motif.length = 3)


ncborcherding/scRepertoire documentation built on April 27, 2024, 8:34 p.m.