softclip_histogram: Number of soft-clipped bases.

Description Usage Arguments Details Value See Also Examples

Description

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

Usage

1
2
3
4
5
6
7
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.

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'.

Value

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

See Also

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

Examples

1
2
3
4
5
6
7
8
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_histogram(exp)

rpolicastro/tsrexplorer documentation built on Oct. 17, 2021, 3:02 p.m.