filter | R Documentation |
AnyHermesData
on Subset Passing Default QC FlagsThis filters a AnyHermesData
object using the default QC flags and required annotations.
filter(object, ...)
## S4 method for signature 'AnyHermesData'
filter(object, what = c("genes", "samples"), annotation_required = "size")
## S4 method for signature 'data.frame'
filter(object, ...)
## S4 method for signature 'ts'
filter(object, ...)
object |
( |
... |
additional arguments. |
what |
( |
annotation_required |
( |
Only genes without low expression (low_expression_flag
) and samples
without low depth (low_depth_flag
) or technical failure (tech_failure_flag
)
remain in the returned filtered object.
Also required gene annotation columns can be specified, so that genes which are not complete
for these columns are filtered out. By default this is the size
column, which is needed
for default normalization of the object.
The filtered AnyHermesData
object.
The internal implementation cannot use the subset()
method since that
requires non-standard evaluation of arguments.
a <- hermes_data
dim(a)
# Filter genes and samples on default QC flags.
result <- filter(a)
dim(result)
# Filter only genes without low expression.
result <- filter(a, what = "genes")
# Filter only samples with low depth and technical failure.
result <- filter(a, what = "samples")
# Filter only genes, and require certain annotations to be present.
result <- filter(a, what = "genes", annotation_required = c("size"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.