cov_adj {MOSS}R Documentation

Adjust omic blocks for covariates effects.

Description

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.

Usage

cov_adj(data.blocks, covs, n, dim.names = NULL)

Arguments

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.

Value

Returns the covariates-adjusted elements in data.blocks.

Examples

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))

[Package MOSS version 0.2.2 Index]