plot_TCR_circos: Make a circos plot of single cells, showing links between...

Description Usage Arguments

View source: R/plot_TCR_circos.R

Description

This function combines a number of steps for generating a circos plot from TCR sequences. The purpose is to show clonotype sharing among cells within and between samples. Samples can optionally be colored by grouping variables.

Usage

1
2
3
4
5
plot_TCR_circos(
     tcr_cells, tcr_links,
     ring_colors=NULL,
     link_colors=NULL, link_width=NULL,
     filename=NULL, plottype="pdf", plotdims=c(12,12))

Arguments

tcr_cells

data frame containing information at the cell level. Should include identifiers at minimum, as column "tcr1", plus optional columns for coloring the cells around the circos plot. Cells will be plotted in the order in which they are listed in this data frame.

tcr_links

data frame with links to draw between cells. Should include identifiers for the two cells, as columns "tcr1" and "tcr2", plus optional columns for color and/or width of the links to be drawn. Often the output of tabulate_shared_TCR_chains. If an empty data frame, or set to NULL, no links will be drawn.

ring_colors

optional vector with number(s) or name(s) of the columns in tcr_cells to use for the colors of the ring. Current version can include up to 2 colors: list the inner ring first, outer ring second.

link_colors

optional number or name of the column in tcr_links to use for the colors of the links. Defaults to NULL, which yields black.

link_width

optional number or name of the column in tcr_links to use for scaling the width of the links. Defaults to NULL, which results in all links having the same width.

filename

the path to write the plot to. If provided, the function outputs a pdf of the plot, named "filename.pdf".

plottype

character string, either "pdf" or "png". The type of plot object to output.

plotdims

a numeric vector, the size (in inches) of the plotting object. Either the size of the pdf, or the size of the plotting window.


mjdufort/TCRtools documentation built on Sept. 12, 2021, 7:11 p.m.