View source: R/NSE-filter-samples.R
filter_samples.FacileDataSet | R Documentation |
This allows the user to query the FacileDataSet
as if it were a wide
pData
data.frame
of all its covariates.
## S3 method for class 'FacileDataSet'
filter_samples(
x,
...,
samples. = samples(x),
custom_key = Sys.getenv("USER"),
with_covariates = FALSE
)
x |
A |
... |
NSE claused to use in |
This feature is only really meant to be used interactively, and with extreme caution ... programatically specifying the covariates, for instance, does not work right now.
TODO: Implement using tidyeval
a sample-descriptor data.frame
that includes the dataset,sample_id
pairs that match the virtual filter(covaries, ...)
clause executed here.
Other API:
fetch_assay_score.FacileDataSet()
,
fetch_custom_sample_covariates.FacileDataSet()
,
fetch_sample_covariates()
,
fetch_sample_statistics.FacileDataSet()
,
fetch_samples.FacileDataSet()
,
filter_features.FacileDataSet()
,
organism.FacileDataSet()
,
samples.FacileDataSet()
fds <- exampleFacileDataSet()
# To identify all samples that are of "CMS3" or "CMS4" subtype(
# stored in the "subtype_crc_cms" covariate:
crc.34 <- filter_samples(fds, subtype_crc_cms %in% c("CMS3", "CMS4"))
eav.query <- fds |>
fetch_sample_covariates(covariates = "subtype_crc_cms") |>
filter(value %in% c("CMS3", "CMS4")) |>
collect()
setequal(crc.34$sample_id, eav.query$sample_id)
# You can keep filtering a filtered dataset
crc.34.male <- filter_samples(crc.34, sex == "m")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.