Error in read.metharray(basenames = files, extended = extended, verbose = verbose, : The following specified files do not exist:201172580052_R02C_Grn.idat
1
0
Entering edit mode
Julie • 0
@julie-24031
Last seen 3.2 years ago
Belgium

Someone who knows how to fix this problem:

Code should be placed in three backticks as shown below

annot <- read.csv("samplesheet.txt",header=T,sep="\t")
annot$Slide <- substring(annot$Array.Data.File,1,10) #adding annotation for Slide
annot$Array <- substring(annot$Array.Data.File,12,17) #adding annotation for Array
annot$Basename <- substr(annot$Array.Data.File,1,17) #adding annotation for Basename
annot <-annot[!duplicated(annot$Basename),] #remove duplicated row, due to Cy3 & Cy5 taking up separate rows
annot <- annot[!(annot$Characteristics.disease == "Crohn's disease"),] #remove rows with blood cells
methylset <- read.metharray.exp(targets = annot)

My .idat files are all in the same working directory as this R file is. But the error states it can't find my .idat files as follows:

Error in read.metharray(basenames = files, extended = extended, verbose = verbose, : The following specified files do not exist:201172580052_R02C_Grn.idat, 201172560046_R01C_Grn.idat, 201172560048_R02C_Grn.idat, 201172580052_R07C_Grn.idat,... (the error goes for all my .idat files)

Thank you in advance!

ArrayExpress methylationArrayAnalysis • 1.4k views
ADD COMMENT
1
Entering edit mode
@james-w-macdonald-5106
Last seen 13 hours ago
United States

If you pass in a targets data.frame, then the expectation is that the 'Basename' column has the entire path to the directory that contains the .idat files. So you should be able to do

G.files <- paste0(annot$Basename, "_Grn.idat")
all(file.exists(G.files))

and have that return TRUE. Which it won't, based on your experience. So fix the annot$Basename column so it will do that correctly and you should be in business.

ADD COMMENT

Login before adding your answer.

Traffic: 709 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6