finalRegions {DEScan2} | R Documentation

## finalRegions

### Description

Align peaks to form common regions then filter regions for presence in multiple replicates taking in input a GRangesList where each element is a sample of called peaks.

### Usage

    finalRegions(peakSamplesGRangesList, zThreshold = 20, minCarriers = 2,
      saveFlag = TRUE, outputFolder = "overlappedPeaks", verbose = FALSE,
      scorecolname = "z-score", BPPARAM = BiocParallel::bpparam())

### Arguments

`peakSamplesGRangesList` | named GRangesList where each element is a sample of called peaks. A score mcols values is needed for each GRanges. The scorecolname param can be used as reference name for the score. (tipically returned by findPeaks function).
`zThreshold` | a minimum threshold for the z score. All peaks lesser than this value will be ignored.
`minCarriers` | a threshold of minimum samples (carriers) for overlapped regions.
`saveFlag` | a flag for saving results in a tsv file.
`outputFolder` | the directory name to store the bed file.
`verbose` | verbose output.
`scorecolname` | character describing the name of the column within the peaks score.
`BPPARAM` | object of class `bpparamClass` that specifies the back-end to be used for computations. See `bpparam` for details.

### Value

a GRanges of selected overlapping peaks with z-score, n-peaks, k-carriers as mcols object.

### Examples

    peak.path <- system.file("extdata/peaks/RData/peaksGRL_all_files.rds",
                                package="DEScan2")
    grl <- readRDS(peak.path)
    grl

    regionsGR <- finalRegions(peakSamplesGRangesList=grl, zThreshold=1,
                            minCarriers=3, saveFlag=FALSE, verbose=TRUE)

[Package DEScan2 version 1.6.0 Index]