error in ChAMP loading file
1
0
Entering edit mode
Giulia • 0
@fbbebaac
Last seen 12 days ago
Italy

Hello everybody, I have problems in loading files with ChAMP. In particular I hve proble with the pd file (samplesheet), I get back this in R:

[ Section 1: Read PD Files Start ] CSV Directory: C:/Users/utente/methylation_CLL1/Samplesheet_2022-282-ILL_Epic_N=34 (2).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. There is NO Pool_ID in your pd file. There is NO Sample_Plate in your pd file. There is NO Sample_Well in your pd file. Error in champ.import(directory, arraytype = arraytype) : Error Match between pd file and Green Channel IDAT file.

It says that there is no Sentirx_ID and Sentrix_Position, but actually they are present in my csv file (as all the other info requested. And the I do not understand why there is no match between pd file and IDAT file.

Can you help me please?

Thanks,

Giulia

ChAMP • 313 views
ADD COMMENT
0
Entering edit mode

Could you show an example of your pd file ? That would help. For instance with str(your_pd_file) or str(head(your_pd_file)) if it is too long

ADD REPLY
0
Entering edit mode

Yes of course:

'data.frame': 19 obs. of 9 variables: $ Sample_Name : chr "N1" "N2" "N3" "N4" ... $ Sample_Plate: logi NA NA NA NA NA NA ... $ Sample_Group: chr "N" "N" "N" "N" ... $ Pool_ID : logi NA NA NA NA NA NA ... $ Project : chr "2022-282-ILL" "2022-282-ILL" "2022-282-ILL" "2022-282-ILL" ... $ Sample_Well : chr "B10" "C10" "D10" "E10" ... $ Array : chr "R02C01" "R03C01" "R04C01" "R05C01" ... $ Slide : num 2.06e+11 2.06e+11 2.06e+11 2.06e+11 2.06e+11 ... $ Basename : chr "/Users/utente/methylation_CLL1" "/Users/utente/methylation_CLL1" "/Users/utente/methylation_CLL1" "/Users/utente/methylation_CLL1" ...

With this function I can't see the entire Slide number, while if I make View(pdfile) there are the original slide numbers (as 206054060066)

ADD REPLY
0
Entering edit mode

Seems fine for that part but maybe the files names are not matching. What is the code you ran and what is the output of list.files("C:/Users/utente/methylation_CLL1") ?

ADD REPLY
0
Entering edit mode

This is the code: library("ChAMP") myLoad <- champ.load(directory = "C:/Users/utente/methylation_CLL1", arraytype= "EPIC")

pdfile<-read.table(file="C:/Users/utente/methylation_CLL1/Samplesheet_171122 - Copia.csv", sep= ";", header= TRUE) str(pdfile) list.files("C:/Users/utente/methylation_CLL1")

This is the output of list.files function:

[1] "206054060066_R02C01_Grn.idat" "206054060066_R02C01_Red.idat" "206054060066_R03C01_Grn.idat"
[4] "206054060066_R03C01_Red.idat" "206054060066_R04C01_Grn.idat" "206054060066_R04C01_Red.idat"
[7] "206054060066_R05C01_Grn.idat" "206054060066_R05C01_Red.idat" "206054060066_R06C01_Grn.idat"
[10] "206054060066_R06C01_Red.idat" "206054060066_R07C01_Grn.idat" "206054060066_R07C01_Red.idat"
[13] "206054060066_R08C01_Grn.idat" "206054060066_R08C01_Red.idat" "206054060073_R01C01_Grn.idat"
[16] "206054060073_R01C01_Red.idat" "206054060073_R02C01_Grn.idat" "206054060073_R02C01_Red.idat"
[19] "206054060073_R03C01_Grn.idat" "206054060073_R03C01_Red.idat" "206054060073_R04C01_Grn.idat"
[22] "206054060073_R04C01_Red.idat" "206054060073_R05C01_Grn.idat" "206054060073_R05C01_Red.idat"
[25] "206054060073_R06C01_Grn.idat" "206054060073_R06C01_Red.idat" "206054060073_R07C01_Grn.idat"
[28] "206054060073_R07C01_Red.idat" "206054060073_R08C01_Grn.idat" "206054060073_R08C01_Red.idat"
[31] "206054060096_R01C01_Grn.idat" "206054060096_R01C01_Red.idat" "206054060096_R02C01_Grn.idat"
[34] "206054060096_R02C01_Red.idat" "206054060096_R03C01_Grn.idat" "206054060096_R03C01_Red.idat"
[37] "206054060096_R04C01_Grn.idat" "206054060096_R04C01_Red.idat" "Samplesheet_171122 - Copia.csv"

ADD REPLY
0
Entering edit mode

Is it normal that in the error you have "Samplesheet_2022-282-ILL_Epic_N=34 (2).csv" and here you only have "Samplesheet_171122 - Copia.csv", did you change the file ?

ADD REPLY
0
Entering edit mode

Yes, but the error still occurs also with Samplesheet_171122 - Copia.csv that I showed you.

ADD REPLY
0
Entering edit mode

What is the output of

GrnPath <- unlist(sapply(paste(pdfile$Slide,pdfile$Array,"Grn.idat",sep="_"), 
                         function(x) grep(x,list.files( "C:/Users/utente/methylation_CLL1",recursive=T,full.names=TRUE), value = TRUE)))
GrnPath

?

ADD REPLY
0
Entering edit mode
@james-w-macdonald-5106
Last seen 19 hours ago
United States

In the code that you used to read in your csv file, you have

pdfile<-read.table(file="C:/Users/utente/methylation_CLL1/Samplesheet_171122 - Copia.csv", sep= ";", header= TRUE)

Whereas ChAMP will use read.csv. If your separators are actually semi-colons (and how else would your code work if not), then ChAMP will end up with a single column data.frame that doesn't have any of the headers that are expected to be there. You could simply do

write.table(pd, file="C:/Users/utente/methylation_CLL1/Samplesheet_171122 - Copia.csv", sep = ",", quote = FALSE, row.names = FALSE)

And then it should work for you.

Also, when you are posting, right below where you type is another box that shows how your post will be formatted. You should spend the time to look at that box and ensure that your post is clear and easy to read, which so far has not been true. Nobody likes trying to read things like

pdfile<-read.table(file="C:/Users/utente/methylation_CLL1/Samplesheet_171122 - Copia.csv", sep= ";", header= TRUE) str(pdfile) list.files("C:/Users/utente/methylation_CLL1")

When in fact it should look like

pdfile<-read.table(file="C:/Users/utente/methylation_CLL1/Samplesheet_171122 - Copia.csv", sep= ";", header= TRUE) 
str(pdfile)
list.files("C:/Users/utente/methylation_CLL1")

Making it easier on people who might want to help you is in your best interest.

0
Entering edit mode

Thank you very much to all of you, I solved the problem: excel saved csv file with ; and not with , Thank you again!

ADD REPLY

Login before adding your answer.

Traffic: 243 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