| screen_forward_max_region | R Documentation |
The Stage-1 forward scan on the hold-out half of the sample. At every grid
position (every skip1 SNPs) windows of min_window_size,
min_window_size + skip2, ... up to max_window_size SNPs are
formed, each window's weighted dosage score is tested against the
phenotype, and the smallest p-value is recorded as the profile value. SNP
columns are streamed from the .rasbin file and the weighted scores
are accumulated on the fly, so neither the genotype matrix nor a score
matrix is held in memory. The pure-R, in-memory implementation is
screen_forward_max_region_original together with
compute_pgs_matrix.
screen_forward_max_region(
rasbin_path,
weights,
this.leftout,
this.df,
is_continuous,
covariate_formula,
skip1 = 10,
skip2 = 20,
min_window_size = 5,
max_window_size = 100,
chunk_snps = 5000
)
rasbin_path |
Character. Path to the |
weights |
Numeric vector of length |
this.leftout |
Integer vector. 1-based row indices of the samples to scan (the hold-out half, or all samples for external weights). |
this.df |
Data frame with one row per element of |
is_continuous |
Logical. |
covariate_formula |
Character. Right-hand side listing the covariates,
for example |
skip1 |
Integer. Grid stride in SNPs. Default |
skip2 |
Integer. Window growth step in SNPs. Default |
min_window_size, max_window_size |
Integer. Smallest and largest
window in SNPs. Default |
chunk_snps |
Integer. SNP columns read per disk chunk. Default
|
Numeric vector with one -\log_{10}(p) value per grid
position, ceiling(N / skip1) values in total.
ras_scan, which averages this scan over
repetitions; ras_scan_external;
screen_forward_max_region_original.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.