Entering edit mode
sinha.puja
▴
10
@sinhapuja-18708
Last seen 4.9 years ago
Hi,
I am trying to analyze Illumina EPIC methylation array data with Champ.
and getting the following error when run champ.svd() :
<< PhenoTypes.lv generated successfully. >>
Error in summary(lm(svd.o$v[, c] ~ PhenoTypes.lv[[f]]))$coeff[2, 4] :
subscript out of bounds
Any ideas or help is appreciated.
THANKS!
Can I have a look at your code? especially pheno parameter. I just tried to run it and seems working well.
I suspect your beta matrix and pheno are not matched with each other.
Best
Yuan Tian
My code is:
if (!requireNamespace("BiocManager", quietly=TRUE))
install.packages("BiocManager")
BiocManager::install("ChAMP")
library(ChAMP)
baseDir2 <- "/C:/Users/sinha.puja/Desktop/idats"
myLoad <- champ.load(directory = getwd(),arraytype="EPIC")
champ.QC()
myNorm <- champ.norm(beta=myLoad$beta,rgSet=myLoad$rgSet,mset=myLoad$mset,resultsDir="./CHAMP_Normalization/",method="BMIQ",plotBMIQ=TRUE,arraytype="EPIC",cores=3)
champ.SVD(beta = myNorm,rgSet=myLoad$rgSet,pd=myLoad$pd,RGEffect=TRUE,PDFplot=TRUE,Rplot=TRUE,resultsDir="./CHAMP_SVDimages/")
but after running this I got an error:
Any help to troubleshoot this error will be greatly appreciated.
Thanks.
Hi Yuan, I tried using as.character function but again it gives me the same type of error as mentioned in the upper section.
Um... Please try convert both Slide and Female_Recode into factor or character, then retry it. I believe they should be category right? But according to the above output, they will all be considered as a numeric variable.