使用 methylumIDAT 时出错,readBin 的 n 参数无效

error using methylumIDAT, invalid n argument for readBin

我正在尝试使用 bioconductor methylumi 包加载 IDAT,其中的脚本适用于以前的文件,但是当我使用 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

我不确定这是指哪个 n,以及如何解决它。在这种情况下,搜索有关 readBin 参数的信息并没有帮助我理解它。

我能在这里找到的最接近的问题是这个关于音频文件的问题,问题似乎是文件大小:

我没有使用比以前更大的数据集 - 事实上,当我 运行 脚本具有不同的 idats 文件夹(相同数量的文件)和不同的样本时 sheet (相同格式)它工作正常,所以我不认为文件大小是这里的问题。

下面是完整的脚本

> 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)

我已经解决了这个问题。问题是我的文件夹中的一个 idat 文件在加载之前没有完全下载(我的电脑在下载过程中崩溃了)。

我通过加载具有单个文件名的文件(大批量,然后逐渐小批量)来找出它是哪一个,例如

mset450k <- methylumIDAT(c("200397870043_R01C02", "200397870043_R02C02",      
                           "200397870043_R03C02", "200397870043_R03C01")
                            ,idatPath=idatPath)