enumerateByFDR {gQTLstats} | R Documentation

## filter a ciseStore instance using an FDR threshold

### Description

filter a ciseStore instance using an FDR threshold

### Usage

    enumerateByFDR(store, fdrsupp, threshold = 0.05, filter=force,
       ids=NULL, trimToUnit=TRUE)

### Arguments

`store` | instance of `ciseStore-class`
`fdrsupp` | instance of `FDRsupp-class`
`threshold` | upper bound on FDR to be included
`filter` | The FDR can be computed for any association score. To return only records satisfying a given filter, supply the filter function here. It may be desirable to carry a filter function from the storeToFDR stage, and this may be considered in future versions.
`ids` | if NULL, process all results in store, otherwise limit attention to jobs with id values in `ids`
`trimToUnit` | plug-in FDR estimates can sometimes lie outside [0,1] owing to sparsity or defects of extrapolation; if this parameter is TRUE, estimated FDR values outside [0,1] are moved to the nearest boundary

### Details

uses `storeApply`, which will use BiocParallel infrastructure when available

### Value

A GRanges instance with store contents to which `estFDR` is appended for each range. The estFDR quantity is predicted using the GAM model held in the FDRsupp instance.

### Examples

    ## Not run:
    require(geuvStore2)
    require(gQTLBase)
    st = makeGeuvStore2()
    data(filtFDR)
    filtEnum = enumerateByFDR( st, filtFDR,
      filter=function(x)x[which(x$mindist <= 500000 & x$MAF >= 0.05)] )
    names(metadata(filtEnum))
    filtEnum[order(filtEnum$chisq, decreasing=TRUE)[1:2]]

    ## End(Not run) # not really essential

[Package gQTLstats version 1.16.0 Index]