error in ChAMP loading file
3
0
Entering edit mode
Giulia • 0
@fbbebaac
Last seen 11 months 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 • 3.0k 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
1
Entering edit mode
@james-w-macdonald-5106
Last seen 15 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.

ADD COMMENT
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
0
Entering edit mode

Hello,

I'm facing the same type of problem and I've tried to follow your advice to solve the problem but I still get the same error message when I try to use the champ.load function to import my pd file. Here are the lines of code used with the data structure obtained and the resulting error message :

>     pdfile<-read.table(file="/Users/Desktop/IDAT/Sample_Sheet.csv", sep= ";", header= TRUE)
>     str(pdfile)

'data.frame':   16 obs. of  10 variables:
 $ Sample_Name     : chr  "NF01053" "NF00471" "NF01470" "NF01064" ...
 $ Sample_Well     : chr  "A01" "B01" "C01" "D01" ...
 $ Sample_Plate    : chr  "wg7064210-msa4" "wg7064210-msa4" "wg7064210-msa4" "wg7064210-msa4" ...
 $ Sample_Group    : chr  "C" "T" "C" "T" ...
 $ Sentrix_ID      : num  2.07e+11 2.07e+11 2.07e+11 2.07e+11 2.07e+11 ...
 $ Sentrix_Position: chr  "R01C01" "R02C01" "R03C01" "R04C01" ...
 $ Basename        : chr  "207221060012_R01C01_Grn.idat" "207221060012_R02C01_Grn.idat" "207221060012_R03C01_Grn.idat" "207221060012_R04C01_Grn.idat" ...
 $ Age             : int  62 60 7 7 24 27 29 27 35 35 ...
 $ Sex             : chr  "F" "F" "F" "F" ...
 $ Sample_ID       : chr  "207221060012_R01C01" "207221060012_R02C01" "207221060012_R03C01" "207221060012_R04C01" ..

    list.files("/Users/Desktop/IDAT/")

[1] "207221060012_R01C01_Grn.idat" "207221060012_R01C01_Red.idat" "207221060012_R02C01_Grn.idat" "207221060012_R02C01_Red.idat"
 [5] "207221060012_R03C01_Grn.idat" "207221060012_R03C01_Red.idat" "207221060012_R04C01_Grn.idat" "207221060012_R04C01_Red.idat"
 [9] "207221060012_R05C01_Grn.idat" "207221060012_R05C01_Red.idat" "207221060012_R06C01_Grn.idat" "207221060012_R06C01_Red.idat"
[13] "207221060012_R07C01_Grn.idat" "207221060012_R07C01_Red.idat" "207221060012_R08C01_Grn.idat" "207221060012_R08C01_Red.idat"
[17] "207221060032_R01C01_Grn.idat" "207221060032_R01C01_Red.idat" "207221060032_R02C01_Grn.idat" "207221060032_R02C01_Red.idat"
[21] "207221060032_R03C01_Grn.idat" "207221060032_R03C01_Red.idat" "207221060032_R04C01_Grn.idat" "207221060032_R04C01_Red.idat"
[25] "207221060032_R05C01_Grn.idat" "207221060032_R05C01_Red.idat" "207221060032_R06C01_Grn.idat" "207221060032_R06C01_Red.idat"
[29] "207221060032_R07C01_Grn.idat" "207221060032_R07C01_Red.idat" "207221060032_R08C01_Grn.idat" "207221060032_R08C01_Red.idat"
[33] "EPIC-8v2-0_A1.bpm"            "Sample_Sheet.csv"          

    write.table(pdfile, file="/Users/Desktop/IDAT/Sample_Sheet", sep = ",", quote = FALSE, row.names = FALSE)

    myLoad <- champ.load(/Users/Desktop/IDAT, arraytype = "EPICv2")

Error message : 
[ Section 1: Read PD Files Start ]
  CSV Directory: /Users/Desktop/IDAT//Sample_Sheet.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.
In addition: Warning message:
In readLines(csvfile) :
  incomplete final line found on '/Users/Desktop/IDAT//Sample_Sheet.csv'

Thank you in advance for your help !

Hortense

ADD REPLY
0
Entering edit mode

You have saved your pd object as 'SampleSheet', which is not what champ.load is reading in (it's finding the semi-colon separated file called 'SampleSheet.csv` that you did not overwrite),

ADD REPLY
0
Entering edit mode

Thanks for your help !

Hortense

ADD REPLY
0
Entering edit mode
Wolfe • 0
@072a14b0
Last seen 15 months ago
Vietnam

This p-value, which I assume indicates the importance of the fold change, should it not be scale-independent? Also, if the threshold is set to 1, shouldn't all of the results be displayed? error in ChAMP loading filebackrooms game

ADD COMMENT
0
Entering edit mode

Shouldn't this p-value, which I presume shows the significance of the fold change, be scale-independent? Additionally, shouldn't all of the results be shown if the threshold is set to 1? heardle

ADD REPLY
0
Entering edit mode

I appreciate your input, but I find myself in dissent with your argument because it fails to consider the broader implications and potential consequences. retro bowl college

ADD REPLY
0
Entering edit mode
@07292320
Last seen 9 months ago
USA

Confirm that the IDAT files are in the correct directory and follow the required naming convention. Make sure the IDAT files are compatible with the specified array type in ChAMP. Consider updating to the latest version of ChAMP and reaching out to the ChAMP community or developers for further assistance.

ADD COMMENT

Login before adding your answer.

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