/pecotmr

Pair-wise enrichment, colocalization, TWAS and Mendelian Randomization to integrate molecular QTL and GWAS.

Primary LanguageC++OtherNOASSERTION

pecotmr codecov

XXX

This R package, pecotmr implements pair-wise enrichment, colocalization, TWAS and Mendelian Randomization to integrate QTL and GWAS analysis based on fine-mapped single effects model. pecotmr also stands for a probabilistic ecosystem consolidating a range of established and new models into a streamlined, user-friendly interface complete with well-documented examples that will help getting your analysis done by tomorrow if you start working on it today!

This project was developed by NIH/NIA FunGen-xQTL Project Working Group members with applications to FunGen-xQTL data analysis.

Quick Start

To install the latest version of the pecotmr package from GitHub, use devtools:

install.packages("devtools")
devtools::install_github("cumc/pecotmr",build_vignettes = TRUE)

This command should automatically install all required packages if they are not installed already.

If you have cloned the repository locally, you can install the package with the install_local function from devtools. Assuming your working directory contains the pecotmr repository, run this code to install the package:

devtools::install_local("pecotmr",build_vignettes = TRUE)

Developer's notes

  • When any changes are made to roxygen2 markup or the C++ code in the src directory, run devtools::document() to update the RcppExports.cpp, the package namespaces (see NAMESPACE), and the package documentation files (in the "man" subdirectory),

  • These are the R commands to build the website (make sure you are connected to Internet while running these commands):

    pkgdown::build_site(lazy=TRUE, examples=FALSE)
  • To format R codes in the R folder,

    for i in `ls R/*.R`; do bash inst/misc/format_r_code.sh $i; done
  • After editing C++ code in the src directory, please use uncrustify (version >=0.74.0, available from conda-forge) to format the code using configuration file inst/misc/uncrustify_default.cfg. For example:

    uncrustify -c inst/misc/uncrustify_default.cfg --replace --no-backup -l CPP src/qtl_enrichment.cpp
    uncrustify -c inst/misc/uncrustify_default.cfg --replace --no-backup -l CPP src/qtl_enrichment.hpp
  • Prior to submitting the package to CRAN, the following modifications need to be made: (1) remove the Remotes: entry in DESCRIPTION; and (2) remove the fastenloc.Rmd vignette.