Description Usage Arguments Examples
Repertoire dynamics
1 2 |
.data |
Output from the trackClonotypes function. |
.plot |
Character. Either "smooth", "area" or "line". Each specifies a type of plot for visualisation of clonotype dynamics. |
.order |
Numeric or character vector. Specifies the order to samples, e.g., it used for ordering samples by timepoints. Either See "Examples" below for more details. |
.log |
Logical. If TRUE then use log-scale for the frequency axis. |
... |
Not used here. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | ## Not run:
# Load an example data that comes with immunarch
data(immdata)
# Option 1
# Choose the first 10 amino acid clonotype sequences
# from the first repertoire to track
tc = trackClonotypes(immdata$data, list(1, 10), .col = "aa")
# Choose the first 20 nucleotide clonotype sequences
# and their V genes from the "MS1" repertoire to track
tc = trackClonotypes(immdata$data, list("MS1", 20), .col = "nt+v")
# Option 2
# Choose clonotypes with amino acid sequences "CASRGLITDTQYF" or "CSASRGSPNEQYF"
tc = trackClonotypes(immdata$data, c("CASRGLITDTQYF", "CSASRGSPNEQYF"), .col = "aa")
# Option 3
# Choose the first 10 clonotypes from the first repertoire
# with amino acid sequences and V segments
target = immdata$data[[1]] %>% select(CDR3.aa, V.name) %>% head(10)
tc = trackClonotypes(immdata$data, target)
# Visualise the output regardless of the chosen option
# Therea are three way to visualise it, regulated by the .plot argument
vis(tc, .plot = "smooth")
vis(tc, .plot = "area")
vis(tc, .plot = "line")
# Visualising timepoints
# First, we create an additional column in the metadata with randomly choosen timepoints:
immdata$meta$Timepoint = sample(1:length(immdata$data))
immdata$meta
# Next, we create a vector with samples in the right order, according to the "Timepoint" column (from smallest to greatest):
sample_order = order(immdata$meta$Timepoint)
# Sanity check: timepoints are following the right order:
immdata$meta$Timepoint[sample_order]
# Samples, sorted by the timepoints:
immdata$meta$Sample[sample_order]
# And finally, we visualise the data:
vis(tc, .order = sample_order)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.