| Title: | slideimp Package Helpers |
|---|---|
| Description: | Contains helper functions for the slideimp package. These functions handle the pathing, download the Illumina Methylation manifests, clean them, and store the cleaned objects locally. |
| Authors: | Hung Pham [aut, cre] |
| Maintainer: | Hung Pham <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.6.8 |
| Built: | 2026-06-03 06:45:17 UTC |
| Source: | https://github.com/hhp94/slideimp.extra |
Removes cleaned manifest files from the slideimp data directory.
clear_cache(chip = NULL, verbose = TRUE, ask = TRUE)clear_cache(chip = NULL, verbose = TRUE, ask = TRUE)
chip |
Character string specifying which chip's cache to clear,
or |
verbose |
Logical. Print messages. Default is |
ask |
Ask for permission to download or delete the cache. Default is |
Invisibly returns a character vector of deleted paths.
## Not run: clear_cache("EPICv2") clear_cache() ## End(Not run)## Not run: clear_cache("EPICv2") clear_cache() ## End(Not run)
The EPICv2 and MSA chips can return duplicated CpG names. This function de-duplicate
the beta matrix.
dedup_matrix(obj, chip, method = c("mean", "median"), verbose = TRUE)dedup_matrix(obj, chip, method = c("mean", "median"), verbose = TRUE)
obj |
A numeric matrix with unique column and row names. |
chip |
Either "MSA", "EPICv2", or a data.frame with |
method |
Aggregation method for duplicates: "mean" or "median". |
verbose |
Logical; if TRUE, print informative messages. |
A de-duplicated matrix.
Retrieves the cleaned manifest for the specified Illumina methylation array chip. If not already cleaned, it downloads the raw manifest, applies the appropriate cleaning function, and stores the result as an .fst file.
get_manifest( chip = NULL, rawdir = NULL, force = FALSE, clean_up = FALSE, ask = TRUE, verbose = TRUE )get_manifest( chip = NULL, rawdir = NULL, force = FALSE, clean_up = FALSE, ask = TRUE, verbose = TRUE )
chip |
The name of the Illumina methylation chip. If |
rawdir |
Directory where raw manifest files are downloaded and stored. Defaults to NULL (a temporary directory). |
force |
Forces re-download and re-cleaning of the manifest.
Default to |
clean_up |
deletes the raw manifest file after cleaning. Useful if
|
ask |
Ask for permission to download or delete the cache. Default is |
verbose |
prints messages. Default is |
The path to the cleaned manifest file as a character string,
or invisible(NULL) if the chip is invalid.
## Not run: get_manifest("450K") ## End(Not run)## Not run: get_manifest("450K") ## End(Not run)
Retrieves the path to the slideimp data directory.
get_slideimp_path(create = FALSE)get_slideimp_path(create = FALSE)
create |
Logical. If |
The path is determined by:
Environment variable SLIDEIMP (if set)
Base R default via tools::R_user_dir("slideimp", "data")
To override permanently, add to your ~/.Renviron (i.e., file.edit("~/.Renviron")):
SLIDEIMP="/your/custom/path"
To override temporarily, use set_slideimp_path().
A character string with the normalized path.
get_slideimp_path()get_slideimp_path()
Loads the cleaned manifest data for a specified Illumina methylation array chip, returning a unique data.frame with feature identifiers and their corresponding chromosomal groups.
ilmn_manifest( chip = NULL, deduped = FALSE, rawdir = NULL, force = FALSE, clean_up = FALSE, ask = TRUE, verbose = TRUE, ... )ilmn_manifest( chip = NULL, deduped = FALSE, rawdir = NULL, force = FALSE, clean_up = FALSE, ask = TRUE, verbose = TRUE, ... )
chip |
The name of the Illumina methylation chip. If |
deduped |
Use deduplicated probe names for EPICv2 and MSA chips ( |
rawdir |
Directory where raw manifest files are downloaded and stored. Defaults to NULL (a temporary directory). |
force |
Forces re-download and re-cleaning of the manifest.
Default to |
clean_up |
deletes the raw manifest file after cleaning. Useful if
|
ask |
Ask for permission to download or delete the cache. Default is |
verbose |
prints messages. Default is |
... |
Additional arguments passed to |
A data.frame() with columns "feature" (probe identifiers) and
"group" (chromosomal locations), or invisible(NULL) if the chip is invalid.
ilmn_manifest() ## Not run: ilmn_manifest("EPICv2") ## End(Not run)ilmn_manifest() ## Not run: ilmn_manifest("EPICv2") ## End(Not run)
Sets the slideimp data directory path for the current R session.
set_slideimp_path(path)set_slideimp_path(path)
path |
Character string specifying the directory path, or |
Invisibly returns NULL.
# default path get_slideimp_path() # set path for this session set_slideimp_path("test") get_slideimp_path() # reset to default set_slideimp_path(NULL) get_slideimp_path()# default path get_slideimp_path() # set path for this session set_slideimp_path("test") get_slideimp_path() # reset to default set_slideimp_path(NULL) get_slideimp_path()
A character vector of Illumina Infinium BeadChip microarrays supported by the
slideimp package. These are the microarrays used for genome-wide DNA
methylation profiling.
slideimp_arraysslideimp_arrays
slideimp_arraysA character vector with 6 elements:
Infinium MethylationEPIC v2.0 BeadChip
Infinium Methylation Screening Array (MSA-48)
EPICv2 with duplicated CpG probes collapsed
MSA with duplicated CpG probes collapsed
Infinium MethylationEPIC v1.0 BeadChip
Infinium HumanMethylation450 BeadChip
The vector includes both the original microarrays and their "deduped" variants.
For EPICv2_deduped and MSA_deduped, duplicated CpG probes (which appear
multiple times in the official Illumina manifest for the same CpG site) have
been collapsed into a single representative entry. This is a standard
preprocessing step when working with EPICv2 and MSA data.
Manifest files and versions used to build/support these microarrays:
450K (v1-2): https://webdata.illumina.com/downloads/productfiles/humanmethylation450/humanmethylation450_15017482_v1-2.csv
EPICv1 (v1-0-b5): https://webdata.illumina.com/downloads/productfiles/methylationEPIC/infinium-methylationepic-v-1-0-b5-manifest-file-csv.zip
EPICv2 (v2-0_A2): https://support.illumina.com/content/dam/illumina-support/documents/downloads/productfiles/methylationepic/InfiniumMethylationEPICv2.0ProductFiles(ZIPFormat).zip
MSA (v1-0_20102838_A1): https://support.illumina.com/content/dam/illumina-support/documents/downloads/productfiles/infiniummethylationscreening/MSA-48v1-0_20102838_A1.csv
The _deduped microarrays are derived from the above manifests (no separate
public download).
Illumina official manifest files (see @details for exact links and versions used).