
Reduce the dimension of covariance matrix by converting z (D) to zr (Dr).
Source:R/sHDL.reduct.dim.R
sHDL.reduct.dim.RdReduce the dimension of covariance matrix by converting z (D) to zr (Dr).
Arguments
- LD.path
Path to the
.rdafile where the Eigen decomposition of LD matrix is stored.- z
A matrix of Z-scores with rownames of SNP IDs. Supporting multiple columns for multiple traits.
- D
A matrix of annotation weights with rownames of SNP IDs and colnames specifying the annotation names.
- lam.cut
Eigenvalue cutoff for LD matrices, default
lam.cut = NULL, which means no cutoff. For analyses with a limited number of traits and annotations, a lower cutoff (such as 0.1, or even not using a cutoff at all) is recommended. For large-scale analyses, a higher cutoff (such as 1) is recommended, to yield fast computation.- Dr.path
Path to the directory where the Dr matrices are stored, default Dr.path = NULL, which means do not store Dr to disk.
- overwrite
Whether to overwrite the existing Dr matrices, default overwrite = FALSE.
- mode
Whether to store Dr to disk or memory, default
mode = "disk". Ifmode = "disk",Dris stored to disk (path returned only) and lam are not returned. Ifmode = "memory",Drandlamare returned.- mc.cores
Number of cores to use for parallelization, default
mc.cores = 1.- pattern
Chromosome and picece pattern of LD files, default is
".*chr(\d{1,2})\.(\d{1,2})[_\.].*".- norm.method
The normalization method, either
"minmax"(default),"scaled"or"none". If"minmax", the annotation weight vectorDis normalized to [0, 1]. If"scaled", the sum of normalized vectorDis scaled to the number of annotated SNPs. If"none", the annotation weight vectorDis not normalized.- log.file
Where the log should be written. If you do not specify a file, the log will be printed on the console.
- nthreads
Number of threads to use for matrix operations, default
nthreads = 1. The default value is suitable for most cases, do not change it unless you are sure about the performance.