This function will pass multiple conditions to test to "sagseqr::differential_expression()"
.
wrap_de(
conditions,
filtered_counts,
cqn_counts,
md,
dropped,
biomart_results,
p_value_threshold,
fold_change_threshold,
model_variables = names(md),
random_effect = NULL,
exclude_variables = NULL,
cores = NULL,
cont = NULL,
is_num = NULL,
num_var = NULL
)
A named list of conditions to test as `primary`
in "sagseqr::differential_expression()"
.
A counts data frame with genes removed that have low expression.
A counts data frame normalized by CQN.
A data frame with sample identifiers in a column and relevant experimental covariates.
a vector of gene names to drop from filtered counts, as they were not cqn normalized
Output of "sageseqr::get_biomart()"
. Gene Ids are
stored as rownames.
Numeric. P-values are adjusted by Benjamini and Hochberg (BH) false discovery rate (FDR). Significant genes are those with an adjusted p-value greater than this threshold.
Numeric. Significant genes are those with a fold-change greater than this threshold.
Optional. Vector of variables to include in the linear (mixed) model.
If not supplied, the model will include all variables in md
.
A vector of variables to consider as random effects instead of fixed effects.
Vector of variables to exclude from testing.
An integer of cores to specify in the parallel backend (eg. 4).
Optional. A list specifying contrasts of the primary variable(s)
to consider for differential sequencing results if using factor(s) as your
primary variable. If not specified all combinations will be tested. If specified
this will speed up the pipeline. Specify the contrast with the factor values
involved in the contrast separated by a hyphen. (eg for diagnosis, "primary_variable = c(\"AD-CT\")"
where AD is the value in diagnosis column for cases and CT is the value for controls.
For multi-level contrasts, eg. "primary_variable = c(\"diagnosis\", \"Sex\")"
would have contrasts
specified as; cont= c(\"ZZ_F-CT_F\", \"ZZ_M-CT_M\")
to look at cases vs controls in
females and cases vs controls in males independently. While the order before or
after the hyphen doesn't matter, the order of values before/after the underscore does matter.
The value order must be the same as the "primary:} specification.
eg. \code{"primary_variable = c(\"diagnosis\",\"sex\")
must be \"CT_M-ZZ_M\"
while
"primary_variable = c(\"sex\",\"diagnosis\")"
must be \"M_CT-M_ZZ\"
(default= NULL)
Is there a numerical covariate to use as an interaction with the primary variable(s). default= NULL
A numerical metadata column to use in an inaction with the primary variable(s). default= NULL