Stacked bar plot of the fraction of single-chains with different numbers of partners for each sample
plot_num_partners.Rd
plot_num_partners()
creates bar plots for alpha and beta chains showing how many
partners they are paired with by the MAD-HYPE and/or T-shell algorithms.
Usage
plot_num_partners(
data,
group_col = NULL,
fraction = TRUE,
include_non_functional = FALSE,
max_partners = 5,
samples = NULL,
return_data = FALSE,
color_scheme = NULL
)
Arguments
- data
a dataset created by
load_tirtlseq()
and possiblyfilter_dataset()
- group_col
a column of the metadata to use to group multiple samples into one bar plot
- fraction
whether to plot the fraction of chains or the total number of chains (default is TRUE, i.e. plot fractions)
- include_non_functional
whether to include chains with non-functional cdr3 sequences when tabulating the output.
- max_partners
the maximum number of partners, N, to include in the plots. All chains with more than N partners will be grouped together under the ">N" category.
- return_data
if TRUE, return the data used to make the plots
Value
Either a bar chart (ggplot object) with facets (sub-plots) for each sample or a list with two objects:
$plot
the plot referenced above
$data
the data used to create the plot
Details
For each sample, the function creates stacked bar charts for alpha and beta chains, showing the proportion of them (among all called pairs) that are paired with 1 chain, 2 chains, 3 chains, etc.
See also
identify_non_functional_seqs()
Other plotting:
plot_clone_size_across_samples()
,
plot_clonotype_indices()
,
plot_clusters()
,
plot_diversity()
,
plot_n_reads()
,
plot_paired()
,
plot_paired_by_read_fraction_range()
,
plot_paired_vs_rank()
,
plot_pairs_with_eachother()
,
plot_ranks()
,
plot_read_fraction_vs_pair_status()
,
plot_sample_overlap()
,
plot_sample_vs_sample()