Annotates cTWAS finemapping result with gene annotations

anno_finemap_res(
  finemap_res,
  snp_map,
  gene_annot = NULL,
  use_gene_pos = c("mid", "start", "end"),
  drop_unannotated_genes = TRUE,
  filter_protein_coding_genes = FALSE,
  filter_cs = FALSE
)

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.

gene_annot

a data frame of gene annotations, with columns: "chrom", "start", "end", "gene_id", "gene_name", "gene_type.

use_gene_pos

use mid (midpoint), start or end positions to represent gene positions.

drop_unannotated_genes

If TRUE, remove unannotated genes.

filter_protein_coding_genes

If TRUE, keep protein coding genes only.

filter_cs

If TRUE, limits results in credible sets.

Value

a data frame of cTWAS finemapping result including gene names, types and positions