Error in inputting multiple illumina microarray idat files to limma
Hi,
I have illumina microarray idat files and I want to read them to limma. Below is my code:
library(limma)
idatfiles = dir(path="File_path", pattern = ".idat")
bgxfile = dir(path = "File_path", pattern = ".bgx")
data = readIDAT(idatfiles, bgxfile)
However, I get the following error:
**Error in readIDAT(idatfiles, bgxfile) :
Unable to find file 7963862004_A_Grn.idat7963862004_B_Grn.idat7963862004_C_Grn.idat7963862004_D_Grn.idat7963862004_E_Grn.idat7963862004_F_Grn.idat7963862004_G_Grn.idat7963862004_H_Grn.idat7963862004_I_Grn.idat7963862004_J_Grn.idat7963862004_K_Grn.idat7963862004_L_Grn.idat
In addition: Warning message:
In if (!file.exists(file)) { :
the condition has length > 1 and only the first element will be used
Execution halted**
Any comment on how I can fix this?
I also tried this:
idatfiles <- list.files(path="File_path", pattern ="\\.idat")
and it did not work either
• 1,544 views
•
link
1 answer
First problem. The limma function is called read.idat, not readIDAT.
Second problem. You haven't told read.idat (or readIDAT) which directory the files are in, so naturally the function can't find them.
You need
x <- read.idat(file.path("File_path",idatfiles), file.path("File_path",bgxfile"))
• 0 views
•
link
Log in to answer this question.
What are the contents of
idatfilesandbgxfile? Also, form where did you obtain the data? I processed a handful of Illumina chips relatively recently.