R/ctwas_weights.R
trim_weights.Rd
Trim weights and filter SNPs by LD reference and GWAS SNPs.
trim_weights(
weights,
snp_map,
gwas_snp_ids,
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.
a vector of SNP IDs in GWAS summary statistics (z_snp$id).
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 SNPs with abs(weight) > 0.
The number of cores used to parallelize computation.
a list of trimmed weights.