Estimate Memory Requirements for SME Routine
Source:R/approximate_memory_requirements.R
approximate_memory_requirements.Rd
This function provides an approximate estimate of the memory requirements (in gigabytes) for running the Sparse Marginal Epistasis (SME) routine based on input parameters such as the number of samples, SNPs, and other configurations.
Arguments
- n_samples
Integer. The number of samples in the dataset.
- n_snps
Integer. The total number of SNPs in the dataset.
- n_blocks
Integer. The number of genotype blocks used to partition SNPs. Affects the size of encoded genotype segments.
- n_randvecs
Integer. The number of random vectors used for stochastic trace estimation. Affects memory for operations involving random vectors.
- chunksize
Integer. The number of focal SNPs processed per chunk.
Details
The function calculates memory usage by summing the contributions from various components used in the SME routine, including:
Variance component estimates (
vc_estimates
)Phenotype-related matrices
Random vector-based computations
Genotype objects and block statistics
Gene-by-gene interaction masks
The estimated memory requirement is derived from the data dimensions and operational needs, and it provides a guideline for configuring resources for the analysis.