Description Usage Arguments Value See Also Examples

Apply a shape-function to the pooled CTSS signal of every Tag Cluster (TC).

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ```
calcShape(object, pooled, ...)
## S4 method for signature 'GRanges,GRanges'
calcShape(object, pooled, outputColumn = "IQR", shapeFunction = shapeIQR, ...)
## S4 method for signature 'RangedSummarizedExperiment,GRanges'
calcShape(object, pooled, ...)
## S4 method for signature 'GRanges,RangedSummarizedExperiment'
calcShape(object, pooled, ...)
## S4 method for signature 'GRanges,GPos'
calcShape(object, pooled, ...)
## S4 method for signature
## 'RangedSummarizedExperiment,RangedSummarizedExperiment'
calcShape(object, pooled, ...)
``` |

`object` |
GenomicRanges or RangedSummarizedExperiment: TCs. |

`pooled` |
GenomicRanges or RangedSummarizedExperiment: Pooled CTSS as the score column. |

`...` |
additional arguments passed to shapeFunction. |

`outputColumn` |
character: Name of column to hold shape statistics. |

`shapeFunction` |
function: Function to apply to each TC (See details). |

object with calculated shape statistics added as a column in rowData (or mcols).

Other Calculation functions:
`calcBidirectionality()`

,
`calcComposition()`

,
`calcPooled()`

,
`calcSupport()`

,
`calcTPM()`

,
`calcTotalTags()`

,
`subsetByBidirectionality()`

,
`subsetByComposition()`

,
`subsetBySupport()`

Other Shape functions:
`shapeEntropy()`

,
`shapeIQR()`

,
`shapeMean()`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
data(exampleCTSSs)
data(exampleUnidirectional)
# Calculate pooled CTSSs using pre-calculated number of total tags:
exampleCTSSs <- calcTPM(exampleCTSSs, totalTags='totalTags')
exampleCTSSs <- calcPooled(exampleCTSSs)
# Calculate shape statistics
calcShape(exampleUnidirectional, pooled=exampleCTSSs,
outputColumn='entropy', shapeFunction=shapeEntropy)
calcShape(exampleUnidirectional, pooled=exampleCTSSs, outputColumn='IQR',
shapeFunction=shapeIQR, lower=0.2, upper=0.8)
# See the vignette for how to implement custom shape functions!
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.