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
)

Arguments

weights

a list of pre-processed prediction weights.

snp_map

a list of data frames with SNP-to-region map for the reference.

top_n_snps

an integer, only keeping the top n SNPs included in weight models. By default, keep all SNPs in weights.

min_abs_weight

a numeric value, only keeping the SNPs with abs(weight) > min_abs_weight. By default, keep all SNPs with abs(weight) > 0.

ncore

The number of cores used to parallelize computation.

Value

Trimmed weights