Detection of Trancription start sites based on local enrichment

detectTSS(CSobject, groups, outfile_prefix = NULL, windowSize = 10L,
  sliding = TRUE, foldChange = 2, restrictChr = NULL, ncores = 1)

# S4 method for CapSet
detectTSS(CSobject, groups, outfile_prefix = NULL,
  windowSize = 10L, sliding = TRUE, foldChange = 2, restrictChr = NULL,
  ncores = 1)

Arguments

CSobject

CapSet object created using newCapSet function

groups

a character vector that contains group name of the sample, for replicate-based TSS calling (see example)

outfile_prefix

Output name prefix for the .Rdata file containing window counts, background counts and filtering statistics calculated during TSS detection.

windowSize

Size of the window to bin the genome for TSS detection. By default, a window size of 10 is used for binning the genome, however smaller window sizes can optionally be provided for higher resolution TSS detection. Note that the background size is set to 200x the window size (2kb for 10bp windows) to calculate local enrichment. Adjacent enriched windows are merged with a distance cutoff, which is the same as window size to get final TSS widths.

sliding

TRUE/FALSE. Indicating whether or not to use sliding windows. The windows are shifted by length which is half of the specified window length.

foldChange

A fold change cutoff of local enrichment to detect the TSS. For samples with usual' amount of starting material and squencing depth (>=5ug starting material, = 5 mil reads/sample), a cut-off of 6 fold can be used. For samples with low amount of material or sequencing depth, use a lower cut-off (eg. use 2-fold for samples with 500ng starting material).

restrictChr

Chromosomes to restrict the analysis to.

ncores

No. of cores/threads to use

Value

.bed files containing TSS position for each group, along with a bed file for consensus (union) TSS sites of all samples.

Examples

# before running this # 1. Create a CapSet object # 2. de-multiplex the fastqs # 3. map them # 4. filter duplicate reads from mapped BAM # load a previously saved CapSet object cs <- exampleCSobject()
#> Checking de-multiplexed R1 reads
#> Checking de-multiplexed R2 reads
#> Checking mapped file
#> Checking de-duplicated file
# detect TSS (samples in same group are treated as replicates) cs <- detectTSS(cs, groups = rep(c("wt","mut"), each = 2), outfile_prefix = "testTSS", foldChange = 6, restrictChr = "X", ncores = 1)
#> Counting reads within detected TSS
#> Writing filtering information as .Rdata