View source: R/softclip_analysis.R
softclip_composition | R Documentation |
Stacked barplot of base composition of soft-clipped bases adjacent to TSSs.
softclip_composition( experiment, samples = "all", n_bases = NULL, ncol = 3, return_table = FALSE, ... )
experiment |
TSRexploreR object. |
samples |
A vector of sample names to analyze. |
n_bases |
Number of bases from -1 position to keep. |
ncol |
Integer specifying the number of columns to arrange multiple plots. |
return_table |
Return a table of results instead of a plot. |
... |
Arguments passed to geom_col. |
Cap-trapping and TSRT-based 5' mapping methods have shown a preponderance of softclipped Gs immediately upstream of TSSs. The source of this extra G is hypothesized to be reverse transcription of the 5' cap to a C in the first-strand cDNA. In addition to this extra base, TSRT has been shown to add up to 3-4 additional bases.
This function generates a stacked barplot for each position upstream of the TSS that gives the relative base composition of each soft-clipped position, if present. 'n_bases' determines how far upstream of the TSS is checked for sofclipped bases.
If 'return_table' is TRUE, a data.frame is returned with the underlying numbers used in the plot.
A ggplot2 stacked barplot of softclip base composition. If 'return_table' is TRUE a data.frame is returned instead.
import_bams
to import BAMs.
G_correction
to correct for incidentally templated
spurious 5' Gs.
bam_file <- system.file("extdata", "S288C.bam", package="TSRexploreR") assembly <- system.file("extdata", "S288C_Assembly.fasta", package="TSRexploreR") samples <- data.frame(sample_name="S288C", file_1=bam_file, file_2=NA) exp <- tsr_explorer(sample_sheet=samples, genome_assembly=assembly) %>% import_bams(paired=TRUE) p <- softclip_composition(exp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.