Perform Brain Score Simulation
brainscore.simulate.Rd
This function performs simulations on brain score data using different methods for comparison. It calculates gene set scores, performs linear modeling, and returns the simulation results.
Usage
brainscore.simulate(
pred_df,
cov_df,
brain_data,
gene_data,
annoData,
gsScoreList.null = NULL,
sim_n = 1000,
subsample_size = 100,
sim_type = c("randomize_pred", "spin_brain", "resample_gene"),
cor_method = c("pearson", "spearman", "pls1c", "pls1w", "custom"),
aggre_method = c("mean", "median", "meanabs", "meansqr", "maxmean", "ks_orig",
"ks_weighted", "ks_pos_neg_sum", "sign_test", "rank_sum", "custom"),
minGSSize = 10,
maxGSSize = 200,
n_cores = 0,
perm_id = NULL,
n_perm = 1000
)
Arguments
- pred_df
Data frame of predictor variables.
- cov_df
Data frame of covariate variables.
- brain_data
Data frame of brain imaging data.
- gene_data
Data frame of gene expression data.
- annoData
Environment containing annotation data.
- gsScoreList.null
Precomputed list of gene set scores for the null model by brainscore/brainscore.hpc function. Default is NULL.
- sim_n
Integer specifying the number of simulations. Default is 1000.
- subsample_size
Integer or vector specifying the subsample sizes. Default is 100.
- sim_type
Character string specifying the simulation type. Default is 'randomize_pred'. Other options include 'spin_brain', 'resample_gene', 'coexp_matched'.
- cor_method
Character string specifying the correlation method. Default is 'pearson'. Other options include 'spearman', 'pls1c', 'pls1w', 'custom'.
- aggre_method
Character string specifying the aggregation method. Default is 'mean'. Other options include 'median', 'meanabs', 'meansqr', 'maxmean', 'ks_orig', 'ks_weighted', 'ks_pos_neg_sum', 'sign_test', 'rank_sum', 'custom'.
- minGSSize
Integer specifying the minimum gene set size. Default is 10.
- maxGSSize
Integer specifying the maximum gene set size. Default is 200.
- n_cores
Integer specifying the number of cores to use for parallel processing. Default is 0 (use all cores -1).
- perm_id
Optional permutation ID.
- n_perm
Integer specifying the number of permutations. Default is 5000.