Reduce the dimension of covariance matrix by converting z (D) to zr (Dr).
Source:R/sHDL.reduct.dim.R
sHDL.reduct.dim.Rd
Reduce the dimension of covariance matrix by converting z (D) to zr (Dr).
Arguments
- LD.path
Path to the
.rda
file 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 vector of genomic annotations with vector names of SNP IDs.
- lam.cut
Eigenvalue cutoff for LD matrices, default
lam.cut = NULL
, which means no cutoff.- 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"
,Dr
is stored to disk (path returned only) and lam are not returned. Ifmode = "memory"
,Dr
andlam
are returned.- nthreads
Number of threads to use for matrix operations, default
nthreads = 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 vectorD
is normalized to [0, 1]. If"scaled"
, the sum of normalized vectorD
is scaled to the number of annotated SNPs. If"none"
, the annotation weight vectorD
is 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.