Add SNP and gene positions to cTWAS finemapping result.
Source:R/ctwas_anno_finemap_res.R
add_pos.RdAdd SNP and gene positions to cTWAS finemapping result.
Usage
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.