I'm trying to load IDATs using the bioconductor methylumi package, with a script that has worked for previous files, but am coming across the below unfamiliar error when I use methylumIDAT
>mset450k <- methylumIDAT(sampleSheet$Basename, idatPath=idatPath)
0 HumanMethylation27 samples found
48 HumanMethylation450 samples found
Error in readBin(con, what = "integer", n = n, size = 4, endian = "little", :
invalid 'n' argument
I'm unsure which n this is referring to, and how to resolve it. Searching for information on readBin arguments hasn't helped me understand it in this context.
The closest question I could find on here was this one about an audio file where the problem appears to be file size: Invalid 'n' argument error in readBin() when trying to load a large (4GB+ audio file)
I'm not using a larger data set then previous times - in fact, when I run the script with a different folder of idats (same number of files) and different sample sheet (same format) it works fine so I don't think file size is the issue here.
Below is the full script
> idatPath<-c("idats2")
> sampleSheet<-read.csv("CrestarSampleSheet2.csv", stringsAsFactors = FALSE)
> sampleSheet<-cbind(paste(sampleSheet$CHIP.ID, sampleSheet$CHIP.Location,
sep = "_"), sampleSheet)
> colnames(sampleSheet)[1]<-"Basename"
> mset450k <- methylumIDAT(sampleSheet$Basename, idatPath=idatPath)