View source: R/plot_TCR_circos.R
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.
1 2 3 4 5 |
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 |
ring_colors |
optional vector with number(s) or name(s) of the columns in |
link_colors |
optional number or name of the column in |
link_width |
optional number or name of the column in |
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. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.