SRFilterResult-class {ShortRead} | R Documentation

## "SRFilterResult" for SRFilter output and statistics

### Description

Objects of this class are logical vectors indicating records passing the applied filter, with an associated data frame summarizing the name, input number of records, records passing filter, and logical operation used for all filters in which the result participated.

### Usage

    SRFilterResult(x = logical(), name = NA_character_,
       input = length(x), passing = sum(x), op = NA_character_)
    ## S4 method for signature 'SRFilterResult,SRFilterResult'
    Logic(e1, e2)
    ## S4 method for signature 'SRFilterResult'
    name(x, ...)
    stats(x, ...)
    ## S4 method for signature 'SRFilterResult'
    show(object)

### Arguments

`x, object, e1, e2` | For `SRFilterResult`, `logical()` indicating records that passed filter or, for others, an instance of `SRFilterResult` class.
`name` | `character()` indicating the name by which the filter is to be referred. Internally, `name`, `input`, `passing`, and `op` may all be vectors representing columns of a `data.frame` summarizing the application of successive filters.
`input` | `integer()` indicating the length of the original input.
`passing` | `integer()` indicating the number of records passing the filter.
`op` | `character()` indicating the logical operation, if any, associated with this filter.
`...` | Additional arguments, unused in methods documented on this page.

### Objects from the Class

Objects can be created through `SRFilterResult`, but these are automatically created by the application of `srFilter` instances.

### Slots

`.Data`:

  Object of class `"logical"` indicating records that passed the filter.

`name`:

  Object of class `"ScalarCharacter"` representing the name of the filter whose results are summarized. The name is either the actual name of the filter, or a combination of filter names and logical operations when the outcome results from application of several filters in a single logical expression.

`stats`:

  Object of class `"data.frame"` summarizing the name, input number of records, records passing filter, and logical operation used for all filters in which the result participated. The `data.frame` rows correspond either to single filters, or to logical combinations of filters.

### Extends

Class `"logical"`, from data part. Class `".SRUtil"`, directly. Class `"vector"`, by class "logical", distance 2. Class `"atomic"`, by class "logical", distance 2. Class `"vectorORfactor"`, by class "logical", distance 3.

### Methods

Logic

  `signature(e1 = "SRFilterResult", e2 = "SRFilterResult")`: logic operations on filters.

!

  `signature(x = "SRFilterResult")`: Negate the outcome of the current filter results

name

  `signature(x = "SRFilterResult")`: The name of the filter that the results are based on.

stats

  `signature(x = "SRFilterResult")`: a `data.frame` as described in the ‘Slots’ section of this page.

show

  `signature(object = "SRFilterResult")`: summary of filter results.

### Author(s)

Martin Morgan mailto:mtmorgan@fhcrc.org

### See Also

`srFilter`

### Examples

    fa <- srFilter(function(x) x %% 2 == 0, "Even")
    fb <- srFilter(function(x) x %% 2 == 1, "Odd")

    x <- 1:10
    fa(x) | fb(x)
    fa(x) & fb(x)
    !(fa(x) & fb(x))

[Package ShortRead version 1.50.0 Index]