When I supply beta matrix and pd directly to champ.filter using the following function call:
champ.filter(beta=beta, pd=pd, autoimpute = F, filterDetP = F, filterBeads = F, arraytype = "EPIC")
The following error would appear:
Updating PD file
Error in `[.data.frame`(pd, RemainSample, ) :
object 'RemainSample' not found
In the source code of champ.filter.R, line 324:
pd <- pd[RemainSample,]
The variable RemainSample would be uninitialized, if FilterOption$filterDetP == FALSE, thus causing the error.
Thank you very much for the quick fix!