range_counts {segmenter} | R Documentation

## Format the loaded counts data

### Description

The function takes the `data.frame`s of the loaded counts data and format them into `GRanges` or `SummarizedExperiment` objects.

### Usage

    range_counts(
      counts,
      features,
      return = "GRanges",
      tidy = FALSE,
      average = FALSE,
      marks
    )

### Arguments

`counts` | A `matrix` of the `read_bam_file` output.
`features` | A `GRanges`. That was used to count the bam files.
`return` | A string. Possible values are `GRanges` (default) or `SummarizedExperiment`.
`tidy` | A `logical`. Default is `TRUE`. Whether to tidy the metadata columns of the `GRanges` object.
`average` | A `logical`. Default is `FALSE`. Whether to average the counts by `marks` before building the object.
`marks` | A `character` vector. The length shoud equal the numbe of columns in `counts` and is used for averaging and renaming the matrix columns.

### Value

`GRanges` (default) or `SummarizedExperiment`.

[Package segmenter version 1.0.0 Index]