Gets boundary genes and selects high PIP boundary genes

select_boundary_genes(
  region_info,
  weights,
  gene_ids,
  finemap_res,
  susie_alpha_res,
  combine_PIPs = TRUE,
  mapping_table = NULL,
  pip_thresh = 0.5,
  filter_cs = FALSE,
  ncore = 1
)

Arguments

region_info

a data frame of region definitions.

weights

a list of preprocessed weights.

gene_ids

a vector of selected gene IDs (z_gene$id). If specified, limits to these genes. Default: use all genes in weights.

finemap_res

a data frame of original finemapping result.

susie_alpha_res

a data frame of original susie alpha result.

combine_PIPs

if TRUE, select boundary genes after combining gene PIPs.

mapping_table

a data frame of mapping between molecular traits and genes, with required columns: "molecular_id", "gene_name".

pip_thresh

PIP cutoff for selecting boundary genes to merge regions.

filter_cs

If TRUE, only select boundary genes in credible sets for region merge.

ncore

The number of cores used to parallelize computation over regions

Value

a list with boundary genes and selected boundary genes