Skip to contents

A CoverageExperiment object can be coerced into a tibble using the tidySummarizedExperiment package, but this will not turn each coverage matrix into a "long" format. The expand function provided here allows one to coerce a CoverageExperiment object into a long data frame, and adds the ranges and seqnames to the resulting tibble.

Usage

# S3 method for class 'CoverageExperiment'
expand(data, ..., .name_repair = NULL)

Arguments

data

a CoverageExperiment object

..., .name_repair

ignored

Value

a tibble object

Examples

data(ce)
ce
#> class: CoverageExperiment 
#> dim: 1 2 
#> metadata(0):
#> assays(1): coverage
#> rownames(1): Scc1
#> rowData names(2): features n
#> colnames(2): RNA_fwd RNA_rev
#> colData names(1): track
#> width: 3000

expand(ce)
#> # A tibble: 368,400 × 8
#> # Groups:   track, features, ranges [1,228]
#>    track   features chr   ranges         strand coord coverage coord.scaled
#>    <chr>   <fct>    <chr> <chr>          <chr>  <dbl>    <dbl>        <dbl>
#>  1 RNA_fwd Scc1     II    II:4290-7289:+ +       4290   -0.257        -1500
#>  2 RNA_fwd Scc1     II    II:4290-7289:+ +       4300   -0.257        -1490
#>  3 RNA_fwd Scc1     II    II:4290-7289:+ +       4310   -0.257        -1480
#>  4 RNA_fwd Scc1     II    II:4290-7289:+ +       4320   -0.257        -1470
#>  5 RNA_fwd Scc1     II    II:4290-7289:+ +       4330   -0.257        -1460
#>  6 RNA_fwd Scc1     II    II:4290-7289:+ +       4340   -0.257        -1450
#>  7 RNA_fwd Scc1     II    II:4290-7289:+ +       4350   -0.257        -1440
#>  8 RNA_fwd Scc1     II    II:4290-7289:+ +       4360   -0.257        -1430
#>  9 RNA_fwd Scc1     II    II:4290-7289:+ +       4370   -0.257        -1420
#> 10 RNA_fwd Scc1     II    II:4290-7289:+ +       4380   -0.257        -1410
#> # ℹ 368,390 more rows