Skip to content

Instantly share code, notes, and snippets.

@metamaden
metamaden / pwrEWAS_itable.R
Last active July 9, 2024 02:53
Modified DNA methylation power analysis function for user-specified data inputs
#!/usr/bin/env R
# Author: Sean Maden
#
# *** Description ***
# This is a sligthly modified form of the pwrEWAS power analysis function from the pwrEWAS R package.
#
# Source this function from an active R session using:
# > devtools::source_gist("https://gist.github.com/metamaden/953b128c230e32ef1beecbc2695e93c1")
#
@metamaden
metamaden / csfLoadData.R
Last active February 22, 2024 16:51
Load cellScaleFactors data table (tibble file)
#!/usr/bin/env R
# Author: Sean Maden
#
# Query and load the cellScaleFactors data table from Bioconductor's ExperimentHub.
#
# ExperimentHub/GH repo for cellScaleFactors: https://github.com/metamaden/cellScaleFactors
#
library(ExperimentHub)
@metamaden
metamaden / simulate_distributions.R
Last active February 15, 2023 07:28
Simulate and plot Poisson and Negative Binomial distributions in R
#!/usr/bin/env R
# Author: Sean Maden
#
# Simulate Poisson and Negative Binomial distributions, plotting the point
# values and mean-variance relationships.
#
# load dependencies
@metamaden
metamaden / rpackagecheck.sh
Last active August 13, 2021 18:05
Shell script to run the 3 main R package check types.
#!/usr/bin/env sh
# Author: Sean Maden
#
# Script to install, build, and check R packages during development. Can perform
# one of 3 check types (R CHECK with and without '--as-cran', or BiocCheck).
#
# Flags:
# -v : Build vignettes (otherwise use `... --no-build-vignettes`)
# -r : Run `R CMD CHECK ...`