Get Started

Installation


You can install the latest version of ComBatFamQC directly from GitHub using the R package devtools.

  1. Open R or RStudio
  2. Run the following commands:
if (!require("devtools", quietly = TRUE)) {
  install.packages("devtools")}
library(devtools)
install_github("Zheng206/ComBatFamQC", build_vignettes = TRUE)

Usage Options


ComBatFamQC can be used in two main modes depending on your workflow needs.

1. Interactive Mode

Use the R Shiny app to explore data, check batch effects, and perform harmonization interactively.

ComBatFamQC can also be used directly in R or RStudio for scripted workflows after loading the package:

library(ComBatFamQC)

2. Command-Line Mode

Use the command-line interface for automated, scalable processing of large or scripted analyses.

After installing ComBatFamQC in R, you can quickly access the built-in CLI scripts by running the following commands in your terminal:

RSCRIPT=${RSCRIPT:-$(command -v Rscript)}
combatqc_cli="$($RSCRIPT -e 'cat(system.file("combatQC_CLI.R", package="ComBatFamQC"))')"
post_cli="$($RSCRIPT -e 'cat(system.file("post_CLI.R", package="ComBatFamQC"))')"

# Display usage information
Rscript "$combatqc_cli" -h
Rscript "$post_cli" -h

Alternatively, run directly using explicit paths:

Rscript path/to/CombatQC_CLI.R -h
Rscript path/to/post_CLI.R -h

Scripts Overview:

  • The CombatQC_CLI.R script: the batch effect diagnostics and harmonization stage, providing interactive tools to diagnose and adjust for batch effects effectively.

  • The post_CLI.R script: the post-harmonization stage, where users can visualize age trends across various brain structures and generate a residual dataset that excludes the effects of unwanted covariates.

View Vignettes


ComBatFamQC includes built-in vignettes that provide detailed, step-by-step examples.

vignette("ComBatQC")
vignette("Post-Harmonization")

Learn More

  • See the Methods Guide for detailed explanations of the harmonization algorithms