R/ctwas_weights.R
trim_weights.Rd
Trim weights by keeping top number of SNPs and/or filtering by minimum absolute weights.
trim_weights(
weights,
snp_map,
top_n_snps = NULL,
min_abs_weight = 0,
ncore = 1
)
a list of pre-processed prediction weights.
a list of data frames with SNP-to-region map for the reference.
an integer, only keeping the top n SNPs included in weight models. By default, keep all SNPs in weights.
a numeric value, only keeping the SNPs with abs(weight) > min_abs_weight
.
By default, keep all SNPs with abs(weight) > 0.
The number of cores used to parallelize computation.
Trimmed weights