trimToPeak {CAGEfightR} | R Documentation |
Trim the width of TCs by distance from the TC peaks.
trimToPeak(object, pooled, ...) ## S4 method for signature 'GRanges,GenomicRanges' trimToPeak(object, pooled, upstream, downstream, peaks = "thick") ## 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, ...)
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. |
peaks |
character: Name of column in TCs holding TC peaks as an IRanges. |
data.frame with two columns: threshold and nTCs (number of Tag Clusters)
Other Clustering functions: clusterBidirectionally
,
clusterUnidirectionally
,
trimToPercentiles
,
tuneTagClustering
Other Trimming functions: trimToPercentiles
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)