R/ctwas_anno_finemap_res.R
add_pos.Rd
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")
)
a data frame of cTWAS finemapping result
a list of data frames with SNP-to-region map for the reference.
a data frame of gene annotations, with required columns: "gene_name", "chrom", "pos" (or "start" and "end").
column name to be mapped by (default: "gene_name").
Use mid (midpoint), start, or end positions as gene positions.
a data frame with chromosomes and positions added to fine-mapping result