R/preprocessingMinfiEwasWater.R
preprocessingMinfiEwasWater.RdRun preprocessingMinfiEwasWater.R
preprocessingMinfiEwasWater(
phenoFile = "data/preprocessingMinfiEwasWater/pheno.csv",
idatFolder = "data/preprocessingMinfiEwasWater/idats",
outputLogs = "logs",
nSamples = NA,
SampleID = "Sample_Name",
arrayType = "IlluminaHumanMethylationEPICv2",
annotationVersion = "20a1.hg38",
scriptLabel = "preprocessingMinfiEwasWater",
baseDataFolder = "rData",
figureBaseDir = "figures",
sepType = "",
tiffWidth = 2000,
tiffHeight = 1000,
tiffRes = 150,
qcCutoff = 10.5,
detPtype = "m+u",
detPThreshold = 0.05,
normMethods = "adjustedfunnorm",
sexColumn = "Sex",
pvalThreshold = 0.01,
chrToRemove = "chrX,chrY",
snpsToRemove = "SBE,CpG",
mafThreshold = 0.1,
crossReactivePath = "data/preprocessingMinfiEwasWater/12864_2024_10027_MOESM8_ESM.csv",
plotGroupVar = "Sex",
lcRef = "salivaEPIC",
phenoOrder = "Sample_Name;Timepoint;Sex;PredSex;Basename;Sentrix_ID;Sentrix_Position",
lcPhenoDir = "data/preprocessingMinfiEwasWater"
)Character. Path to phenotype CSV file.
Character. Path to IDAT files directory.
Character. Directory for log files.
Integer or NA. Number of samples to subset for testing.
Character. Sample identifier column name.
Character. Illumina array type.
Character. Annotation version.
Character. Label used in output naming.
Character. Base directory for RData outputs.
Character. Base directory for Figures outputs.
Character. Field separator for phenotype file.
Integer. Width of TIFF plots in pixels.
Integer. Height of TIFF plots in pixels.
Integer. Resolution (DPI) for TIFF plots.
Numeric. Quality-control cutoff threshold.
Character. Detection p-value calculation type.
Numeric. Detection p-value threshold.
Character. Normalization method(s).
Character. Sex column name in phenotype data.
Numeric. Probe-level p-value threshold.
Character. Chromosomes to remove.
Character. SNP probe types to remove.
Numeric. Minor allele frequency threshold.
Character. Path to cross-reactive probe file.
Character. Variable used for grouping plots.
Character. Reference panel for cell composition.
Character. Semicolon-separated phenotype column order.
Character. Output directory for cell composition phenotype.
Invisibly returns NULL. This function is called for its side effects,
performing Illumina EPICv2 preprocessing, quality control, normalisation,
probe filtering, cell composition estimation, and writing plots, logs,
and RData objects to disk.
tmp <- tempdir()
stopifnot(dir.exists(tmp))
# \donttest{
preprocessingMinfiEwasWater(
phenoFile = "data/preprocessingMinfiEwasWater/pheno.csv",
idatFolder = "data/preprocessingMinfiEwasWater/idats",
outputLogs = "logs",
nSamples = NA,
SampleID = "Sample_Name",
arrayType = "IlluminaHumanMethylationEPICv2",
annotationVersion = "20a1.hg38",
scriptLabel = "preprocessingMinfiEwasWater",
baseDataFolder = "rData",
figureBaseDir = "figures",
sepType = "",
tiffWidth = 2000,
tiffHeight = 1000,
tiffRes = 150,
qcCutoff = 10.5,
detPtype = "m+u",
detPThreshold = 0.05,
normMethods = "adjustedfunnorm",
sexColumn = "Sex",
pvalThreshold = 0.01,
chrToRemove = "chrX,chrY",
snpsToRemove = "SBE,CpG",
mafThreshold = 0.1,
crossReactivePath = "data/preprocessingMinfiEwasWater/12864_2024_10027_MOESM8_ESM.csv",
plotGroupVar = "Sex",
lcRef = "salivaEPIC",
phenoOrder = "Sample_Name;Timepoint;Sex;PredSex;Basename;Sentrix_ID;Sentrix_Position",
lcPhenoDir = "data/preprocessingMinfiEwasWater"
)
#> ==== Starting preprocessingMinfiEwasWater ====
#> Start Time: 2026-04-02 05:15:45
#> Log file path: logs/log_preprocessingMinfiEwasWater.txt
#>
#> Phenotype file: data/preprocessingMinfiEwasWater/pheno.csv
#> Separator type:
#> IDAT folder: data/preprocessingMinfiEwasWater/idats
#> nSamples limit: all
#> SampleID column: Sample_Name
#> Array type: IlluminaHumanMethylationEPICv2
#> Annotation version: 20a1.hg38
#> Base RData folder: rData
#> Base Figure folder: figures
#> TIFF size (w x h @ dpi): 2000 x 1000 @ 150
#> QC cutoff (median): 10.5
#> Detection P-value type: m+u
#>
#> Detection p-value threshold: 0.05
#> Normalization methods: adjustedfunnorm
#> Sex column: Sex
#> Plot grouping variable: Sex
#>
#> Probe filtering:
#> P-value threshold: 0.01
#> Chromosomes to remove: chrX,chrY
#> SNP positions filter: SBE,CpG
#> MAF threshold: 0.1
#> Cross-reactive file: data/preprocessingMinfiEwasWater/12864_2024_10027_MOESM8_ESM.csv
#>
#> Cell composition (estimateLC):
#> Reference: salivaEPIC
#> Leading pheno order: Sample_Name;Timepoint;Sex;PredSex;Basename;Sentrix_ID;Sentrix_Position
#> =======================================================================
#> Warning: cannot open file 'data/preprocessingMinfiEwasWater/pheno.csv': No such file or directory
#> Error in file(file, "rt"): cannot open the connection
# }