Add SNP and gene positions to cTWAS finemapping result.

add_pos(
  finemap_res,
  snp_map,
  mapping_table,
  map_by = "molecular_id",
  use_gene_pos = c("mid", "start", "end")
)

Arguments

finemap_res

a data frame of cTWAS finemapping result

snp_map

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

mapping_table

a data frame of gene annotations, with required columns: "gene_name", "chrom", "pos" (or "start" and "end").

map_by

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

use_gene_pos

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

Value

a data frame with chromosomes and positions added to fine-mapping result