plot_sashimi | R Documentation |
plot_sashimi
plots the splicing events and coverage across specific
genes/transcripts/regions of interest. Unlike traditional sashimi plots,
coverage and junction tracks are separated, which enables user's to choose
whether they would like to plot only the junctions.
plot_sashimi(
junctions,
ref,
gene_tx_id,
gene_tx_col,
case_id = NULL,
sum_func = mean,
region = NULL,
assay_name = "norm",
annot_colour = c(ggpubr::get_palette("jco", 1), ggpubr::get_palette("npg", 7)[c(1, 3,
2, 5, 6)], ggpubr::get_palette("jco", 6)[c(3)]),
digits = 2,
count_label = TRUE,
coverage_paths_case = NULL,
coverage_paths_control = NULL,
coverage_chr_control = NULL,
load_func = .coverage_load,
binwidth = 100
)
junctions |
junction data as a RangedSummarizedExperiment-class object. |
ref |
either path to gtf/gff3 or object of class TxDb-class or EnsDb-class. EnsDb-class is required if you intend to annotate junctions with gene symbols/names. |
gene_tx_id |
character scalar with the id of the gene. This must be a an
identifier for a gene or transcript, which has a matching entry in |
gene_tx_col |
character scalar with the name of the column to search for
the |
case_id |
list containing 1 element. The contents of this element must
be a character vector specifying sample ids that are to be plotted. The
name of this element must correspond to the column containing sample ids in
the junction |
sum_func |
function that will be used to aggregate the junction counts
and coverage for controls. By default, |
region |
a GenomicRanges of length 1 that is used to filter the exons/junctions plotted. Only those that overlap this region are plotted. |
assay_name |
a character scalar with the name of the
|
annot_colour |
character vector length 7, representing the colours of junction types. |
digits |
used in |
count_label |
logical value specifying whether to add label the count of each junction. |
coverage_paths_case |
paths to the BigWig files containing the coverage of your case samples. |
coverage_paths_control |
paths to the BigWig files for control samples. |
coverage_chr_control |
either "chr" or "no_chr", indicating the chromosome format of control coverage data. Only required if the chromosome format of the control BigWig files is different to that of your cases. |
load_func |
function used to load coverage. |
binwidth |
the number of bases to aggregate coverage across using
|
ggplot
displaying the splicing (and coverage) surrounding the
transcript/region of interest.
# use GenomicState to load txdb (GENCODE v31)
ref <- GenomicState::GenomicStateHub(
version = "31",
genome = "hg38",
filetype = "TxDb"
)[[1]]
junctions_processed <- junction_process(
junctions_example,
ref,
types = c("ambig_gene", "unannotated")
)
sashimi_plot <- plot_sashimi(
junctions = junction_filter(junctions_processed),
ref = ref,
gene_tx_id = "ENSG00000142156.14",
gene_tx_col = "gene_id",
sum_func = NULL
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.