Skip to contents

Tests if condition effects (g1 vs g2) are different between ancestries using permutation.

Usage

perm_interaction_effect(X, Y, MX, MY, g_col, B = 1000, seed = NULL)

Arguments

X

Expression matrix for ancestry A (samples x genes)

Y

Expression matrix for ancestry B (samples x genes)

MX

Metadata for X (must include group and ancestry columns)

MY

Metadata for Y

g_col

Column in metadata for condition/group (factor with 2 levels)

B

Number of permutations

seed

Optional seed for reproducibility

permute

Logical. Whether to perform permutation test

Value

A list with summary stats, permutation matrix, and number of valid permutations