View source: R/normalize_batch.R
all_adjusters | R Documentation |
For a long time, I have mostly kept my surrogate estimators and batch correctors separate. However, that separation was not complete, and it really did not make sense. This function brings them together. This now contains all the logic from the freshly deprecated get_model_adjust().
all_adjusters(
input,
design = NULL,
estimate_type = "sva",
batch1 = "batch",
batch2 = NULL,
surrogates = "be",
low_to_zero = FALSE,
cpus = 4,
na_to_zero = TRUE,
expt_state = NULL,
confounders = NULL,
chosen_surrogates = NULL,
adjust_method = "ruv",
filter = "raw",
thresh = 1,
noscale = FALSE,
prior_plots = FALSE
)
input |
Dataframe or expt or whatever as the data to analyze/modify. |
design |
If the data is not an expt, then put the design here. |
estimate_type |
Name of the estimator. |
batch1 |
Column in the experimental design for the first known batch. |
batch2 |
Only used by the limma method, a second batch column. |
surrogates |
Either a number of surrogates or a method to search for them. |
low_to_zero |
Move elements which are <0 to 0? |
cpus |
Use parallel and split intensive operations? |
na_to_zero |
Set any NA entries to 0? |
expt_state |
If this is not an expt, provide the state of the data here. |
confounders |
List of confounded factors for smartSVA/iSVA. |
chosen_surrogates |
Somewhat redundant with surrogates above, but provides a second place to enter because of the way I use ... in normalize_expt(). |
adjust_method |
Choose the method for applying the estimates to the data. |
filter |
Filter the data? |
thresh |
If filtering, use this threshold. |
noscale |
If using combat, scale the data? |
prior_plots |
Plot the priors? |
This applies the methodologies very nicely explained by Jeff Leek at https://github.com/jtleek/svaseq/blob/master/recount.Rmd and attempts to use them to acquire estimates which may be applied to an experimental model by either EdgeR, DESeq2, or limma. In addition, it modifies the count tables using these estimates so that one may play with the modified counts and view the changes (with PCA or heatmaps or whatever). Finally, it prints a couple of the plots shown by Leek in his document. In other words, this is entirely derivative of someone much smarter than me.
List containing surrogate estimates, new counts, the models, and some plots, as available.
[all_adjuster()] [isva] [sva] [limma::removeBatchEffect()] [corpcor] [edgeR] [RUVSeq] [SmartSVA] [variancePartition] [counts_from_surrogates()]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.