cov_adj | R Documentation |
This function is called by moss to adjust a series of omic blocks for covariates effects. However, if the covariates object is too big, the user is recommended to call cov_adj ahead of moss.
cov_adj(data.blocks, covs, n, dim.names = NULL)
data.blocks |
List containing omic blocks of class 'matrix' or 'FBM'. In each block, rows represent subjects and columns features. |
covs |
Covariates which effect we wish to adjust for. Accepts objects of class matrix, data.frame, numeric, or character vectors. |
n |
Number of subjects. Numeric. |
dim.names |
list of vectors with samples names, and features names by omic block. If NULL, a list of artificial names is created. Defaults to NULL. |
Returns the covariates-adjusted elements in data.blocks.
library("MOSS") sim_data <- simulate_data() set.seed(43) # Extracting simulated omic blocks. sim_blocks <- sim_data$sim_blocks[-4] # Using fourth block as covariates. covs <- sim_data$sim_blocks[[4]] # Adjust omic blocks for covariates effects. sim_blocks_adj <- cov_adj(sim_blocks,covs,nrow(covs))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.