Skip to content

Instantly share code, notes, and snippets.

View alexg9010's full-sized avatar

Alexander Blume alexg9010

View GitHub Profile
# Combine methylKit annotation outputs into a single comprehensive dataframe
library(methylKit)
library(genomation)
## Generating setup with test data -------
# this follows https://bioconductor.org/packages/devel/bioc/vignettes/methylKit/inst/doc/methylKit.html#4_Annotating_differentially_methylated_bases_or_regions
data("methylKit")
myDiff <- methylDiff.obj
myDiff25p <- methylKit::getMethylDiff(myDiff, difference = 25)
@alexg9010
alexg9010 / gauge_methylkit_unite_chunksize.R
Last active August 12, 2025 19:18
Check if methylKit::unite with min.per.group filter would work for given sample number and chunk size
library(methylKit)
test_overflow <- function(n_samples, chunk_size) {
# simulate 10 samples
res <- dataSim(replicates = 10,
sites = 1e3,
treatment = rep(1, 10)) |>
makeMethylDB(dbdir = tempdir()) |> # convert to tabix
suppressMessages() |>
getDBPath() |>
@alexg9010
alexg9010 / how_to_debug_rcpp.Rmd
Created October 23, 2017 09:36
How to debug Rcpp code in a package
---
title: "How to debug Rcpp code in a package"
output: html_document
author: Alexander Gosdschan
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```