R/preprocessingMinfiEwasWater_steps.R
filterProbesMinfiEwasWater.RdApply detection P-value, chromosome, SNP, and cross-reactive probe filters to the primary normalized object and return the filtered result.
filterProbesMinfiEwasWater(
normData,
RGSet,
pvalThreshold = 0.01,
chrToRemove = "chrX,chrY",
snpsToRemove = "SBE,CpG",
mafThreshold = 0.1,
crossReactivePath,
detPtype = "m+u",
verbose = FALSE,
logs = FALSE,
log_dir = NULL,
log_file = "log_filterProbesMinfiEwasWater.txt"
)Object returned by normalizeMinfiEwasWater().
Filtered RGChannelSet aligned with normData.
Numeric. Probes must have detection P values below this threshold in all samples to be retained.
Character vector or comma-separated string of chromosome
names to remove, for example "chrX,chrY".
Character vector or comma-separated string of SNP probe
types to remove, for example "SBE,CpG".
Numeric. Minor allele frequency threshold passed to
minfi::dropLociWithSnps().
Character. Path to a CSV file containing a ProbeID
column of cross-reactive probes to remove.
Character. Detection P-value mode passed to
minfi::detectionP() for the probe filter. Common values in minfi
workflows are "m+u" and "negative".
Logical. If TRUE, emit progress messages with message().
Logical. If TRUE, write the same messages to a log file.
Character or NULL. Directory used for the log file when
logs = TRUE.
Character. File name used when logs = TRUE.
A list with class "dnaEPICO_minfiEwasWater_filter" containing the
filtered object and counts for each filtering stage.
ex <- dnaEPICO:::exampleMinfiWorkflowStateDnaEpico()
#> [preprocessQuantile] Mapping to genome.
#> [preprocessQuantile] Fixing outliers.
#> [preprocessQuantile] Quantile normalizing.
filtered_data <- filterProbesMinfiEwasWater(
normData = ex$normData,
RGSet = ex$sampleData$RGSet,
pvalThreshold = 1,
chrToRemove = "chrY",
snpsToRemove = "SBE",
mafThreshold = 1,
crossReactivePath = ex$crossReactivePath,
detPtype = "m+u",
verbose = FALSE,
logs = FALSE
)
filtered_data$counts[["crossReactive"]]
#> [1] 485096