R/Limma_permutating.R
Limma_permutating.Rd
This function performs linear modeling using the Limma package with permutation of the covariates to evaluate the test statistics under random assignments. It handles two-group comparisons and multi-group settings.
Limma_permutating(x, group.name, meta.info, formula.str)
A data matrices where rows represent features (e.g., genes, proteins) and columns represent samples. The list should contain at least two matrices for pairwise group comparison.
A character string indicating the name of the group
variable in meta.info
to be used in the analysis.
A data frame containing the metadata for the samples. This includes sample grouping and any covariates to be included in the model.
A string specifying the formula to be used in model
fitting. It should follow the standard R formula syntax
(e.g., ~ covariate1 + covariate2
).
A list containing the following elements:
A vector of the test statistics (log-fold changes or F-statistics) for each feature.
A vector of the standard deviations for each feature, adjusted by the empirical Bayes procedure.
This function combines the data matrices from different groups and permutes
the covariates from meta.info
before fitting a linear model using Limma.
Permutation helps assess how the covariates behave under random conditions,
providing a null distribution of the test statistics. For two-group
comparisons, the function computes contrasts between the two groups and
applies empirical Bayes moderation. For multi-group analysis with a single
covariate, pairwise contrasts are computed, and the moderated F-statistic is
calculated for each feature.