View source: R/commonSeqsPlot.R
commonSeqsPlot | R Documentation |
Creates a scatter plot of just the sequences in common between two samples.
commonSeqsPlot(sample1, sample2, amino_table, show = "common")
sample1 |
A name of a repertoire_id in a list of data frames generated
by the LymphoSeq2 function |
sample2 |
A name of a repertoire_id in a list of data frames generated
by the LymphoSeq function |
amino_table |
A tibble of productive amino acid sequences produced by
the function |
show |
A character vector specifying whether only the common sequences should be shown or all sequences. Available options are "common" or "all". |
The plot is made using the package ggplot2 and can be reformatted using ggplot2 functions. See examples below.
Returns a frequency scatter plot of two samples showing only the shared sequences.
An excellent resource for examples on how to reformat a ggplot can be found in the R Graphics Cookbook online (http://www.cookbook-r.com/Graphs/).
productiveSeq()
, commonSeqs()
,
commonSeqsVenn()
, commonSeqsBar()
file_path <- system.file("extdata", "TCRB_sequencing",
package = "LymphoSeq2")
study_table <- readImmunoSeq(path = file_path, threads = 1)
study_table <- LymphoSeq2::topSeqs(study_table, top = 100)
amino_table <- productiveSeq(study_table = study_table,
aggregate = "junction_aa")
commonSeqsPlot("TRB_Unsorted_32", "TRB_Unsorted_83",
amino_table = amino_table
)
# Change the X and Y axis to log-10 scale
commonSeqsPlot("TRB_Unsorted_32", "TRB_Unsorted_83",
amino_table = amino_table
) +
ggplot2::scale_x_log10() +
ggplot2::scale_y_log10() +
ggplot2::annotation_logticks(sides = "bl")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.