tuneTagClustering {CAGEfightR} | R Documentation

## Determine the optimal pooled threshold for unidirectional tag clustering.

### Description

This function counts the number of Tag Clusters (TCs) for an series of small incremental pooled cutoffs

### Usage

    tuneTagClustering(object, ...)

    ## S4 method for signature 'GRanges'
    tuneTagClustering(object, steps = 10L,
      mergeDist = 20L, searchMethod = "minUnique", maxExponent = 1)

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

    ## S4 method for signature 'GPos'
    tuneTagClustering(object, ...)

### Arguments

`object` | GenomicRanges or RangedSummarizedExperiment: Pooled CTSS.
`...` | additional arguments passed to methods.
`steps` | integer: Number of thresholds to analyze (in addition to treshold=0).
`mergeDist` | integer: Merge TCs within this distance.
`searchMethod` | character: For advanced user only, see details.
`maxExponent` | numeric: The maximal threshold to analyse is obtained as min(score)*2^maxExponent (only used if searchMethod='exponential').

### Value

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

### See Also

Other Clustering functions: `clusterBidirectionally`, `clusterUnidirectionally`, `trimToPeak`, `trimToPercentiles`

### Examples

    ## Not run:
    data(exampleCTSSs)

    # Calculate pooledTPM, using supplied number of total tags
    exampleCTSSs <- calcTPM(exampleCTSSs,
                            inputAssay='counts',
                            outputAssay='TPM',
                            totalTags='totalTags')
    exampleCTSSs <- calcPooled(exampleCTSSs, inputAssay='TPM')

    # Set backend
    library(BiocParallel)
    register(SerialParam())

    # Find optimal slice-threshold for reduce distance of 20:
    tuneTagClustering(object=exampleCTSSs)

    ## End(Not run)

[Package CAGEfightR version 1.2.0 Index]