Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}
- {os: ubuntu-latest, r: '4.2.0'}
- {os: ubuntu-latest, r: '4.5.0'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
Expand Down
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Roxygen: list(markdown = TRUE)
Suggests:
BiocStyle,
knitr,
magick,
rmarkdown,
IlluminaHumanMethylation450kanno.ilmn12.hg19,
IlluminaHumanMethylationEPICanno.ilm10b4.hg19,
Expand All @@ -53,7 +54,7 @@ Imports:
stats
VignetteBuilder: knitr
Depends:
R (>= 4.2.0)
R (>= 4.5.0)
LazyData: true
URL:
https://ericknavarrod.github.io/RAMEN/ ,
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RAMEN 2.1.0
# RAMEN 2.1.0 - July 14, 2026

This minor version presents a couple of changes that improve the integration of
RAMEN with GenomicRanges objects and Bioconductor:
Expand Down
4 changes: 2 additions & 2 deletions R/findVML.R
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ map_revmap_names <- function(positions, manifest_hvp) {
#'
#' @export
#' @examples
#' # Set the parallel backend to use 2 workers
#' doParallel::registerDoParallel(2)
#' # Evaluate sequentially
#' foreach::registerDoSEQ()
#' VML <- RAMEN::findVML(
#' methylation_data = RAMEN::test_methylation_data,
#' array_manifest = "IlluminaHumanMethylationEPICv1",
Expand Down
7 changes: 4 additions & 3 deletions R/lmGE.R
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@
#' @importFrom foreach %do%
#' @export
#' @examples
#' # Set the parallel backend to use 2 workers
#' doParallel::registerDoParallel(2)
#' # Evaluate sequentially
#' foreach::registerDoSEQ()
#' ## Find VML in test data
#' VML <- RAMEN::findVML(
#' methylation_data = RAMEN::test_methylation_data,
Expand Down Expand Up @@ -215,7 +215,8 @@ lmGE <- function(selected_variables,
selected_genot %in% empty_lists))
# Select the winning model
winning_models <- foreach::foreach(i = seq_len(nrow(selected_variables)),
.combine = "rbind") %dopar% { # For every VML
.combine = "rbind",
.export = "empty_lists") %dopar% { # For every VML
#### Prepare data sets ####
# Create the data frame with all the information for each VML
VML_i <- selected_variables[i, ]
Expand Down
4 changes: 2 additions & 2 deletions R/medCorVMR.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
#' @export
#'
#' @examples
#' # Set the parallel backend to use 2 workers
#' doParallel::registerDoParallel(2)
#' # Evaluate sequentially
#' foreach::registerDoSEQ()
#' # Create a VML object
#' VML <- GenomicRanges::GRanges(seqnames = c("chr21", "chr21"),
#' ranges = IRanges::IRanges(start = c(10861376, 10862171),
Expand Down
6 changes: 3 additions & 3 deletions R/nullDistGE.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
#' @importFrom foreach %do%
#' @export
#' @examples
#' # Set the parallel backend to use 2 workers
#' doParallel::registerDoParallel(2)
#' # Evaluate sequentially
#' foreach::registerDoSEQ()
#' ## Find VML in test data
#' VML <- findVML(
#' methylation_data = test_methylation_data,
Expand Down Expand Up @@ -166,7 +166,7 @@ nullDistGE <- function(VML_wSNPs,
environmental_matrix = permutated_environment,
covariates = covariates,
summarized_methyl_VML = summarized_methyl_VML,
seed = 1
seed = seed
)

message("Starting lmGE in permutation ", i, " of ", permutations)
Expand Down
11 changes: 8 additions & 3 deletions R/selectVariables.R
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@
#'
#' @examples
#' ## Find VML in test data
#' # Set the parallel backend to use 2 workers
#' doParallel::registerDoParallel(2)
#' # Evaluate sequentially
#' foreach::registerDoSEQ()
#' VML <- RAMEN::findVML(
#' methylation_data = RAMEN::test_methylation_data,
#' array_manifest = "IlluminaHumanMethylationEPICv1",
Expand Down Expand Up @@ -176,7 +176,12 @@ selectVariables <- function(VML_wSNPs,
i <- NULL # To avoid R CMD check note about undefined global variable
#### Run LASSO ####
lasso_results <- foreach::foreach(i = VML_wSNPs$VML_index,
.combine = "rbind") %dorng% {
.combine = "rbind",
.packages = c("GenomicRanges",
"S4Vectors",
"IRanges",
"glmnet"),
.export = "empty_lists") %dorng% {
#### Prepare data sets ####
VML_i <- VML_wSNPs[VML_wSNPs$VML_index == i]
# Select summarized VML information
Expand Down
15 changes: 6 additions & 9 deletions R/summarizeVML.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
#'
#' @examples
#' ## Find VML in test data
#' # Set the parallel backend to use 2 workers
#' doParallel::registerDoParallel(2)
#' # Evaluate sequentially
#' foreach::registerDoSEQ()
#' VML <- findVML(
#' methylation_data = test_methylation_data,
#' array_manifest = "IlluminaHumanMethylationEPICv1",
Expand All @@ -50,7 +50,6 @@ summarizeVML <- function(VML,
if (!"VML_index" %in% colnames(S4Vectors::mcols(VML))) {
S4Vectors::mcols(VML)$VML_index <- paste0("VML", seq_len(length(VML)))
}

if (!all(unique(unlist(VML$probes)) %in% rownames(methylation_data))) {
warning(paste("Some probes listed in the VML data frame are not found in",
"the methylation data. Please check that all probes listed in the 'probes'",
Expand All @@ -61,14 +60,12 @@ summarizeVML <- function(VML,
if (!is.list(VML$probes)) {
stop("Please make sure the 'probes' column in the VML object is a list")
}

VML_index <- i <- NULL # To avoid R CMD check notes

mcols_vml <- S4Vectors::mcols(VML)
VML_1 <- i <- NULL # To avoid R CMD check notes
#### Summarize VML ####
summarized_VML <- foreach::foreach(i = VML$VML_index,
summarized_VML <- foreach::foreach(i = mcols_vml$VML_index,
.combine = "cbind") %dopar% {
probes <- VML[VML$VML_index == i]$probes |>
unlist()
probes <- unlist(mcols_vml$probes[mcols_vml$VML_index == i])
subset_meth <- methylation_data[probes, , drop = FALSE]
median <- apply(subset_meth, 2, median, na.rm = TRUE)
matrix(median, ncol = 1, dimnames = list(NULL, i))
Expand Down
7 changes: 5 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,11 @@ BiocManager::install("ErickNavarroD/RAMEN")

## Usage

For a detailed tutorial on how to use RAMEN, please check the package's vignette
or [website](https://ericknavarrod.github.io/RAMEN/articles/RAMEN.html).
For a detailed tutorial on how to use RAMEN, please check the package's vignette,
which you can build locally by running
` BiocManager::install("ErickNavarroD/RAMEN", build_vignettes = TRUE)`
or see externally in its
[website](https://ericknavarrod.github.io/RAMEN/articles/RAMEN.html).
Altogether, RAMEN provides a workflow that takes a set of individuals
with genome, exposome and DNA methylome information, and generates an estimation
of the contribution of genetic variants and environmental exposures to its DNA
Expand Down
58 changes: 57 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ BiocManager::install("ErickNavarroD/RAMEN")
## Usage

For a detailed tutorial on how to use RAMEN, please check the package’s
vignette or
vignette, which you can build locally by running
`BiocManager::install("ErickNavarroD/RAMEN", build_vignettes = TRUE)`
or see externally in its
[website](https://ericknavarrod.github.io/RAMEN/articles/RAMEN.html).
Altogether, RAMEN provides a workflow that takes a set of individuals
with genome, exposome and DNA methylome information, and generates an
Expand Down Expand Up @@ -234,6 +236,60 @@ selected_variables <- RAMEN::selectVariables(
summarized_methyl_VML = summarized_methyl_VML,
seed = 1
)
#> Loading required package: stats4
#> Loading required package: BiocGenerics
#> Loading required package: generics
#>
#> Attaching package: 'generics'
#> The following object is masked from 'package:dplyr':
#>
#> explain
#> The following objects are masked from 'package:base':
#>
#> as.difftime, as.factor, as.ordered, intersect, is.element, setdiff,
#> setequal, union
#>
#> Attaching package: 'BiocGenerics'
#> The following object is masked from 'package:dplyr':
#>
#> combine
#> The following objects are masked from 'package:stats':
#>
#> IQR, mad, sd, var, xtabs
#> The following objects are masked from 'package:base':
#>
#> anyDuplicated, aperm, append, as.data.frame, basename, cbind,
#> colnames, dirname, do.call, duplicated, eval, evalq, Filter, Find,
#> get, grep, grepl, is.unsorted, lapply, Map, mapply, match, mget,
#> order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
#> rbind, Reduce, rownames, sapply, saveRDS, table, tapply, unique,
#> unsplit, which.max, which.min
#> Loading required package: S4Vectors
#>
#> Attaching package: 'S4Vectors'
#> The following objects are masked from 'package:dplyr':
#>
#> first, rename
#> The following object is masked from 'package:utils':
#>
#> findMatches
#> The following objects are masked from 'package:base':
#>
#> expand.grid, I, unname
#> Loading required package: IRanges
#>
#> Attaching package: 'IRanges'
#> The following objects are masked from 'package:dplyr':
#>
#> collapse, desc, slice
#> Loading required package: Seqinfo
#> Loading required package: Matrix
#>
#> Attaching package: 'Matrix'
#> The following object is masked from 'package:S4Vectors':
#>
#> expand
#> Loaded glmnet 5.0
#> Loading required package: rngtools

head(selected_variables)
Expand Down
4 changes: 2 additions & 2 deletions man/findVML.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/lmGE.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/medCorVMR.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/nullDistGE.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/selectVariables.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/summarizeVML.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions vignettes/RAMEN.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,13 @@ design and the plataform, but the steps generally follow this structure:
can be done using the ComBat function from the
[sva package](https://bioconductor.org/packages/release/bioc/html/sva.html).

We recommend using M values over Beta values, since M value distributions
provide more statistically valid properties for linear modelling, such as being
approximately homoscedastic, unbounded, and with a lower compression at the
methylated and unmethylated values (for more details see
[Pan Du, *et al.*, BMC Bioinformatics, 2010](https://doi.org/10.1186/1471-2105-11-587)).


### Exposome data

The exposome is a highly heterogeneous data set, as it can encompass variables
Expand Down
Loading