File: SRFilterResult-class.Rd

package info (click to toggle)
r-bioc-shortread 1.32.0-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 8,384 kB
  • ctags: 293
  • sloc: ansic: 2,718; cpp: 202; sh: 3; makefile: 2
file content (134 lines) | stat: -rw-r--r-- 4,073 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
\name{SRFilterResult-class}
\Rdversion{1.1}
\docType{class}
\alias{SRFilterResult-class}
\alias{SRFilterResult}
\alias{Logic,SRFilterResult,SRFilterResult-method}
\alias{!,SRFilterResult-method}
\alias{name,SRFilterResult-method}
\alias{show,SRFilterResult-method}
\alias{stats}
\alias{stats,SRFilterResult-method}

\title{"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_)
\S4method{Logic}{SRFilterResult,SRFilterResult}(e1, e2)
\S4method{name}{SRFilterResult}(x, ...)
stats(x, ...)
\S4method{show}{SRFilterResult}(object)
}

\arguments{

  \item{x, object, e1, e2}{For \code{SRFilterResult}, \code{logical()}
    indicating records that passed filter or, for others, an instance of
    \code{SRFilterResult} class.}

  \item{name}{\code{character()} indicating the name by which the filter
    is to be referred. Internally, \code{name}, \code{input},
    \code{passing}, and \code{op} may all be vectors representing
    columns of a \code{data.frame} summarizing the application of
    successive filters.}

  \item{input}{\code{integer()} indicating the length of the original
    input.}

  \item{passing}{\code{integer()} indicating the number of records
    passing the filter.}

  \item{op}{\code{character()} indicating the logical operation, if any,
    associated with this filter.}

  \item{...}{Additional arguments, unused in methods documented on this
    page.}

}

\section{Objects from the Class}{
  
  Objects can be created through \code{\link{SRFilterResult}}, but these
  are automatically created by the application of \code{\link{srFilter}}
  instances.

}

\section{Slots}{
  \describe{

    \item{\code{.Data}:}{Object of class \code{"logical"} indicating
      records that passed the filter. }

    \item{\code{name}:}{Object of class \code{"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. }

    \item{\code{stats}:}{Object of class \code{"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 \code{data.frame} rows correspond either to
      single filters, or to logical combinations of filters.}

  }
}

\section{Extends}{
Class \code{"\linkS4class{logical}"}, from data part.
Class \code{"\linkS4class{.SRUtil}"}, directly.
Class \code{"\linkS4class{vector}"}, by class "logical", distance 2.
Class \code{"\link{atomic}"}, by class "logical", distance 2.
Class \code{"vectorORfactor"}, by class "logical", distance 3.
}
\section{Methods}{
  \describe{

    \item{Logic}{\code{signature(e1 = "SRFilterResult", e2 =
	"SRFilterResult")}: logic operations on filters.}

    \item{!}{\code{signature(x = "SRFilterResult")}: Negate the outcome
      of the current filter results }

    \item{name}{\code{signature(x = "SRFilterResult")}: The name of the
      filter that the results are based on.}

    \item{stats}{\code{signature(x = "SRFilterResult")}: a
      \code{data.frame} as described in the \sQuote{Slots} section of
      this page.}

    \item{show}{\code{signature(object = "SRFilterResult")}: summary of
      filter results.}

  }

}

\author{Martin Morgan \url{mailto:mtmorgan@fhcrc.org}}

\seealso{\code{\link{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))
}

\keyword{classes}