Description Usage Arguments Value See Also Examples
Visualise counts or proportions of shared clonotypes among repertoires. Code adapted from https://www.r-bloggers.com/ggplot2-cheatsheet-for-visualizing-distributions/.
1 2 3 4 5 6 7 8 9 10 11 12 13 | vis.shared.clonotypes(
.shared.rep,
.x.rep = NA,
.y.rep = NA,
.title = NA,
.ncol = 3,
.point.size.modif = 1,
.cut.axes = T,
.density = T,
.lm = T,
.radj.size = 3.5,
.plot = T
)
|
.shared.rep |
Shared repertoires, as from shared.repertoire function. |
.x.rep |
Which repertoire show on x-axis. Either a name or an index of a repertoire
in the |
.y.rep |
Which repertoire show on y-axis. Either a name or an index of a repertoire
in the |
.title |
Main title of the plot. |
.ncol |
Number of columns in the resulting plot. |
.point.size.modif |
Modify this to correct sizes of points. |
.cut.axes |
If T than cut axes' limits to show only frequencies that exists. |
.density |
If T than plot densities of shared and unique clonotypes. |
.lm |
If T than fit and plot a linear model to shared clonotypes. |
.radj.size |
Size of the text for R^2-adjusted. |
.plot |
If F than return grobs instead of plotting. |
ggplot2 object or plot
shared.repertoire
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## Not run:
data(twb)
# Show shared nucleotide clonotypes of all possible pairs
# using the Read.proportion column
twb.sh <- shared.repertoire(twb, "n0rp")
vis.shared.clonotypes(twb.sh, .ncol = 4)
# Show shared amino acid + Vseg clonotypes of pairs
# including the Subj.A (the first one) using
# the Read.count column.
twb.sh <- shared.repertoire(twb, "avrc")
vis.shared.clonotypes(twb.sh, 1, NA, .ncol = 4)
# same, just another order of axis
vis.shared.clonotypes(twb.sh, NA, 1, .ncol = 4)
# Show shared nucleotide clonotypes of Subj.A (the first one)
# Subj.B (the second one) using the Read.proportion column.
twb.sh <- shared.repertoire(twb, "n0rp")
vis.shared.clonotypes(twb.sh, 1, 2)
# Show the same plot, but with much larget points.
vis.shared.clonotypes(twb.sh, 1, 2, .point.size.modif = 3)
## End(Not run)
|
Loading required package: ggplot2
Loading required package: dplyr
Attaching package: ‘dplyr’
The following objects are masked from ‘package:stats’:
filter, lag
The following objects are masked from ‘package:base’:
intersect, setdiff, setequal, union
Loading required package: gridExtra
Attaching package: ‘gridExtra’
The following object is masked from ‘package:dplyr’:
combine
Loading required package: reshape2
Loading required package: igraph
Attaching package: ‘igraph’
The following objects are masked from ‘package:dplyr’:
as_data_frame, groups, union
The following objects are masked from ‘package:stats’:
decompose, spectrum
The following object is masked from ‘package:base’:
union
========================================
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! The tcR package WILL SOON BE ORPHANED
!! AND REMOVED FROM CRAN.
!!
!! A new package is available that is
!! designed to replace tcR:
!! immunarch -- https://immunarch.com/
!!
!! We will be happy to help you to move
!! to the new package. Feel free to contact us:
!! http://github.com/immunomind/immunarch
!!
!! Sincerely,
!! immunarch dev team and
!! Vadim I. Nazarov, lead developer of tcR
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
=======================================
Attaching package: ‘tcR’
The following object is masked from ‘package:igraph’:
diversity
Aggregating sequences...
|
| | 0%
|
|================== | 25%
|
|=================================== | 50%
|
|==================================================== | 75%
|
|======================================================================| 100%
Merging data tables...
|
| | 0%
|
|======================= | 33%
|
|=============================================== | 67%
|
|======================================================================| 100%
`geom_smooth()` using formula 'y ~ x'
`geom_smooth()` using formula 'y ~ x'
`geom_smooth()` using formula 'y ~ x'
`geom_smooth()` using formula 'y ~ x'
`geom_smooth()` using formula 'y ~ x'
`geom_smooth()` using formula 'y ~ x'
`geom_smooth()` using formula 'y ~ x'
`geom_smooth()` using formula 'y ~ x'
`geom_smooth()` using formula 'y ~ x'
`geom_smooth()` using formula 'y ~ x'
`geom_smooth()` using formula 'y ~ x'
`geom_smooth()` using formula 'y ~ x'
Warning message:
Removed 1 rows containing missing values (geom_smooth).
Aggregating sequences...
|
| | 0%
|
|================== | 25%
|
|=================================== | 50%
|
|==================================================== | 75%
|
|======================================================================| 100%
Merging data tables...
|
| | 0%
|
|======================= | 33%
|
|=============================================== | 67%
|
|======================================================================| 100%
`geom_smooth()` using formula 'y ~ x'
`geom_smooth()` using formula 'y ~ x'
`geom_smooth()` using formula 'y ~ x'
`geom_smooth()` using formula 'y ~ x'
`geom_smooth()` using formula 'y ~ x'
`geom_smooth()` using formula 'y ~ x'
Aggregating sequences...
|
| | 0%
|
|================== | 25%
|
|=================================== | 50%
|
|==================================================== | 75%
|
|======================================================================| 100%
Merging data tables...
|
| | 0%
|
|======================= | 33%
|
|=============================================== | 67%
|
|======================================================================| 100%
`geom_smooth()` using formula 'y ~ x'
`geom_smooth()` using formula 'y ~ x'
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.