subsetByBidirectionality {CAGEfightR} | R Documentation

## Subset by sample-wise bidirectionality of clusters.

### Description

A convenient wrapper around calcBidirectionality and subset.

### Usage

    subsetByBidirectionality(object, ...)

    ## S4 method for signature 'GRanges'
    subsetByBidirectionality(object, samples,
      inputAssay = "counts", outputColumn = "bidirectionality",
      minSamples = 0)

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

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

### Arguments

`object` | GRanges or RangedSummarizedExperiment: Unstranded clusters with peaks stored in the 'thick' column.
`...` | additional arguments passed to methods.
`samples` | RangedSummarizedExperiment: Sample-wise CTSSs stored as an assay.
`inputAssay` | character: Name of assay in samples holding input CTSS values.
`outputColumn` | character: Name of column in object to hold bidirectionality values.
`minSamples` | integer: Only regions with bidirectionality above this value are retained.

### Value

object with bidirectionality values added as a column, and low bidirectionaly regions removed.

### See Also

Other Subsetting functions: `subsetByComposition`, `subsetBySupport`

Other Calculation functions: `calcBidirectionality`, `calcComposition`, `calcPooled`, `calcShape`, `calcSupport`, `calcTPM`, `calcTotalTags`, `subsetByComposition`, `subsetBySupport`

### Examples

    data(exampleCTSSs)
    data(exampleBidirectional)

    # Keep only clusters that are bidirectional in at least one sample:
    subsetByBidirectionality(exampleBidirectional, samples=exampleCTSSs)

[Package CAGEfightR version 1.6.0 Index]