trimToPeak: Trim width of TCs by distance from TC peak

Description Usage Arguments Value See Also Examples

Description

Trim the width of TCs by distance from the TC peaks.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
trimToPeak(object, pooled, ...)

## S4 method for signature 'GRanges,GRanges'
trimToPeak(object, pooled, upstream, downstream)

## S4 method for signature 'GRanges,GPos'
trimToPeak(object, pooled, ...)

## S4 method for signature 'RangedSummarizedExperiment,GenomicRanges'
trimToPeak(object, pooled, ...)

## S4 method for signature 'GRanges,RangedSummarizedExperiment'
trimToPeak(object, pooled, ...)

## S4 method for signature 
## 'RangedSummarizedExperiment,RangedSummarizedExperiment'
trimToPeak(object, pooled, ...)

Arguments

object

GenomicRanges or RangedSummarizedExperiment: Tag clusters.

pooled

GenomicRanges or RangedSummarizedExperiment: Basepair-wise pooled CTSS (stored in the score column).

...

additional arguments passed to methods.

upstream

integer: Maximum upstream distance from TC peak.

downstream

integer: Maximum downstream distance from TC peak.

Value

data.frame with two columns: threshold and nTCs (number of Tag Clusters)

See Also

Other Clustering functions: clusterBidirectionally(), clusterUnidirectionally(), trimToPercentiles(), tuneTagClustering()

Other Trimming functions: trimToPercentiles()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(exampleCTSSs)
data(exampleBidirectional)

# Calculate pooled CTSSs
exampleCTSSs <- calcTPM(exampleCTSSs, totalTags='totalTags')
exampleCTSSs <- calcPooled(exampleCTSSs)

# Choose a few wide clusters:
TCs <- subset(exampleUnidirectional, width >= 100)

# Trim to +/- 10 bp of TC peak
trimToPeak(TCs, pooled=exampleCTSSs, upstream=10, downstream=10)

CAGEfightR documentation built on Nov. 8, 2020, 5:42 p.m.