Thanks Basti for your reply. I have tried your code and it removed all of the "noid" from my pd file. But the error is same. Is there another reason for the error?
I was trying to analyse a breast cancer dataset GSE212370. I have made a pd file for that in the prescribed format of ChAMP document which contains column headers as follows (showing only first 3 rows of pd file):
Sample_Name Sample_Plate Sample_Group Pool_ID Project Sample_Well Array Slide Basename Filename
NT1 NA NormalTissue NA NA NA R03C01 201247470004 201247470004_R03C01 201247470004_R03C01
NT2 NA NormalTissue NA NA NA R08C01 200861300050 200861300050_R08C01 200861300050_R08C01
NT3 NA NormalTissue NA NA NA R03C01 200959030050 200959030050_R03C01 200959030050_R03C01
But when I run the following code in R studio,
myload<-champ.load("C://Users//Monalisa//Downloads//GSE212370")
it gave me following error,
[<<<< ChAMP.IMPORT START >>>>>]
-----------------------------
[ Section 1: Read PD Files Start ]
CSV Directory: C://Users//Monalisa//Downloads//GSE212370/GSE212370_pd_edited_new.csv
Find CSV Success
Reading CSV File
Your pd file contains NO Array(Sentrix_Position) information.
Your pd file contains NO Slide(Sentrix_ID) information.
Error in champ.import(directory, arraytype = arraytype) :
Error Match between pd file and Green Channel IDAT file.
Please tell me how to resolve this.
1 answer
The issue is that the IDAT files are not properly named for champ.load function. Indeed, for instance they contain "_noid" in the filename. So a solution is to rename all the files removing the "_noid" pattern in the file names :
folder = "C://Users//Monalisa//Downloads//GSE212370"
files <- list.files(folder,pattern = "_noid",full.names = T)
sapply(files,FUN=function(eachPath){
file.rename(from=eachPath,to= sub(pattern="_noid", paste0(""),eachPath))
})
I tried to download the three samples you provided and it works on my machine. How did you create the pd file ? Maybe there are some files names not matching
Log in to answer this question.