Flag the entities to query
select_entities.RdSets included_in_query from the statistical cutoffs. Only these
rows are sent to the backend by get_network(). Rows that
fail are kept, so that get_network() can still recognize them as
being in the input when a backend returns them. Rows with a missing
adj.pvalue are not selected.
Usage
select_entities(
entities,
pvalue_cutoff = NULL,
logfc_cutoff = NULL,
direction = c("both", "up", "down"),
include_infinite_fc = FALSE,
force_include = NULL
)Arguments
- entities
entity table from
prepare_entities()- pvalue_cutoff
keep rows with
adj.pvaluebelow this.NULLapplies no cutoff.- logfc_cutoff
keep rows with
abs(logFC)above this, on the log scale of the input.NULLapplies no cutoff.- direction
"both","up"(logFC > 0), or"down"(logFC < 0).- include_infinite_fc
whether rows with infinite
logFC(detected in one condition only) are selected regardless ofpvalue_cutoffandlogfc_cutoff.directionstill applies.- force_include
values of
id, or"namespace:identifier"groundings (e.g."HGNC:1234"), selected regardless of the cutoffs. Entities outside the table are added withget_network(include_entities = )instead.
Value
entities with included_in_query set, and
user_added (TRUE for rows selected only through
force_include).
Examples
input <- data.table::fread(system.file(
"extdata/groupComparisonModel.csv",
package = "MSstatsBioNet"
))
entities <- prepare_entities(input, entity_type = "protein",
id_type = "uniprot")
entities <- select_entities(entities, pvalue_cutoff = 0.01,
direction = "up")
table(entities$included_in_query)
#>
#> FALSE TRUE
#> 7 3