documentation page here
Common tasks for subtyping include making measurements of data consistency, filtering for subjects with good/high quality data, training the subtyping algorithm, predicting the subtypes in new data and visualizing results, often over time. Many helper functions of data exploration, manuscript preparation, model checking, covariate or site/confound control etc.
This package expects population-level data frames with longitudinal data.
The pre-release version of the package can be pulled from GitHub using the devtools package:
# install.packages("devtools")
devtools::install_github("stnava/subtyper", build_vignettes=TRUE)
remotes::install_github("stnava/subtyper", build_vignettes=TRUE)
or the smaller remotes
package:
remotes::install_github("stnava/subtyper", build_vignettes=TRUE)
See the file .circleci/config.yml
for hints about installing the many dependencies. A few other hints below that you may encounter depending on your system, version of R, etc.
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
if (!requireNamespace("Biobase", quietly = TRUE))
BiocManager::install("Biobase")
BiocManager::install("globaltest")
BiocManager::install("sva")
install.packages("NMF")
pgenlibr
# brew install libsm
gh repo clone chrchang/plink-ng
cd plink-ng/2.0/pgenlibr/
# edit src/Makevars to include -I/System/Volumes/Data/Users/stnava/code/extern/plink-ng/2.0/simde
R CMD INSTALL . # FIXME not on arm64 yet
remotes::install_github('jhmadsen/DDoutlier') # was booted off CRAN
install.packages(
c("ggplot2", "caret", "ClusterR", "coca", "dCUR", "dplyr", "effectsize", "Evacluster", "flexclust", "fpc", "gaston", "ggpubr", "ggthemes", "ggstatsplot", "ggbeeswarm", "globaltest", "gridExtra", "imbalance", "mlr3", "mlr3cluster", "mlr3pipelines", "wesanderson", "Hmisc", "plyr", "data.table", "mclust", "NMF", "pheatmap", "gprofiler2", "magrittr", "fastICA", "pgenlibr", "VarSelLCM", "visreg"))
Sometimes, issues arise in R installations due to user-specific environment variables (such as LD_LIBRARY_PATH
, DYLD_LIBRARY_PATH
, R_LIBS
, or PKG_CONFIG_PATH
). These can conflict with R’s ability to find the correct system libraries or load shared objects (.so
/ .dylib
files) during package compilation or loading.
To avoid these issues, you can launch R in a minimal, clean environment, preserving only the necessary HOME
and PATH
variables.
The repository includes a Makefile to facilitate some common tasks.
$ make test
. Requires the testthat package. You can also specify a specific test file or files to run by adding a “file=” argument, like $ make test file=logging
. testthat::test_package()
will do a regular-expression pattern match within the file names (ignoring the test-
prefix and the .R
file extension).
$ make doc
. Requires the roxygen2 package.