Map finemapping result of molecular traits to genes.

anno_finemap_res(
  finemap_res,
  snp_map,
  mapping_table,
  map_by = "molecular_id",
  add_gene_annot = TRUE,
  add_position = TRUE,
  use_gene_pos = c("mid", "start", "end"),
  drop_unmapped = TRUE
)

Arguments

finemap_res

a data frame of cTWAS finemapping results.

snp_map

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

mapping_table

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

map_by

column name to be mapped by (default: "molecular_id").

add_gene_annot

If TRUE, add annotations

add_position

If TRUE, add positions

use_gene_pos

Use mid (midpoint), start, or end positions as gene positions.

drop_unmapped

If TRUE, remove unmapped genes.

Value

a data frame of annotated finemapping result.