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.
To install the latest version of the pecotmr package from GitHub, use devtools:
install.packages("devtools")
devtools::install_github("cumc/pecotmr",build_vignettes = TRUE)
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)
devtools
should automatically install all required packages if
they are not installed already. If automatic install fail for some packages and you cannot fix it up easily, please try to use our conda package instead.
To install using conda
or micromamba
for our released version,
micromamba install r-pecotmr -c dnachun
To still use devtools
to source compile pecotmr
we suggest you build a local conda
environment for pecotmr and all its dependencies,
cp .github/environment/environment.yaml /tmp/environment.yaml
grep -v '{%' < .github/recipe/meta.yaml | yq .requirements.host | sed 's/^/ /' >> /tmp/environment.yaml
micromamba create -f /tmp/environment.yaml
then use
micromamba activate pecotmr
to activate it. Now you should be able to source compile pecotmr
.
-
When any changes are made to
roxygen2
markup or the C++ code in the src directory, rundevtools::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 fileinst/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 inDESCRIPTION
; and (2) remove thefastenloc.Rmd
vignette.