Skip to content

Fine-mapping pipeline in R: FINEMAP, CAVIAR, PAINTOR, GCTA-COJO, ABF

License

Notifications You must be signed in to change notification settings

variani/finemapr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

finemapr

travis-ci build status

R interface to fine-mappers:

By using finemapr, your input files are automatically prepared for each tool, the analysis workflow is tool-independent; and exploration of fine-mapping results is powered by R in printing/plotting/data export.

Note: the package is still under development and its current version is not stable. The current work aims at switching from run_<tool> functions to a more general one, finemapr. The later function makes use of S3 method dispatch features. Thus, use this package with caution until the stable release comes out.

Quick start

library(finemapr)
library(tidyverse)

# get some example data
finemapr::example_finemap() %>% attach

# run finemapping, default tool is finemap
out <- finemapr(z1, ld1, n1, args = "--n-causal-max 3")

# print & plot results
out

plot(out, grid_nrow = 1)

Tool-independent analysis workflow

# set up
options(finemapr_<tool> = "<path to fine-mapping tool>")

# read input files
my_zscores <- read_zscores("<my_scores.tab>")
my_ld <- read_ld("<my_ld.tab>")

# run analysis
# depreciated, but still works: out <- run_<tool>(my_zscores, my_ld, args = "<custom arguments>")
out <- finemapr(my_zscores, my_ld, method = "<tool>", args = "<custom arguments>")

# explore results
print(out)
head(out$snp) # main table of results
plot(out)

# export results
write.table(out$snp, "<my_results.tab>")

Examples

See the vignette Fine-mapping analysis pipeline by finemapr.

Related projects

About

Fine-mapping pipeline in R: FINEMAP, CAVIAR, PAINTOR, GCTA-COJO, ABF

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages