Histogram of the number of soft-clipped bases adjacent to the TSS.

softclip_histogram(
  experiment,
  samples = "all",
  n_bases = NULL,
  ncol = 3,
  return_table = FALSE
)

Arguments

experiment

TSRexploreR object.

samples

A vector of sample names to analyze.

n_bases

Number of bases to plot.

ncol

Integer specifying the number of columns to arrange multiple plots.

return_table

Return a table of results instead of a plot.

Value

ggplot2 histogram of soft-clipped base numbers. Instead returns a table of underlying values if return_tables is TRUE.

Details

Cap-trapping and TSRT-based 5' mapping methods have shown a preponderance of soft-clipped bases immediately upstream of TSSs. In many cases, a G is added immediately upsteam of the true TSS. 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 G, TSRT has been shown to add up to 3 additional bases.

This function creates a histogram for each position upstream of the TSS, up to 'n_bases'.

See also

import_bams to import BAMs. G_correction to correct for incidentally templated spurious 5' Gs.

Examples

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)
#> Warning: NAs introduced by coercion
p <- softclip_histogram(exp)