Hello All,
I am trying to test Minfi on my test IDAT files, these are not from the minfidata. I am stuck at the step of creating the RGChannelSet. The code reads both the green and red IDAT's correctly, the basename generated are also correct but before exiting the read.metharray function the execution is halted with the following error. Could you please help me by letting me know if I am doing something wrong?
My code:
library(minfi)
baseDir <-"/home/hal9/methylation/test_idats"
targets=read.metharray.sheet(baseDir)
print (targets$Basename)
RGSet <- read.metharray(targets$Basename,verbose=TRUE)
print(RGSet)
Output:
[read.metharray.sheet] Found the following CSV files:
[1] "/home/hal9/methylation/test_idats/test.csv"
[1] "/home/hal9/methylation/test_idats/200517420015_R03C01"
[2] "/home/hal9/methylation/test_idats/200517420015_R03C01"
[3] "/home/hal9/methylation/test_idats/200517420102_R06C01"
[4] "/home/hal9/methylation/test_idats/200517420102_R06C01"
[read.metharray] Reading200517420015_R03C01_Grn.idat
[read.metharray] Reading200517420015_R03C01_Grn.idat
[read.metharray] Reading200517420102_R06C01_Grn.idat
[read.metharray] Reading200517420102_R06C01_Grn.idat
[read.metharray] Reading200517420015_R03C01_Red.idat
[read.metharray] Reading200517420015_R03C01_Red.idat
[read.metharray] Reading200517420102_R06C01_Red.idat
[read.metharray] Reading200517420102_R06C01_Red.idat
[read.metharray] Read idat files in 11.44seconds
[read.metharray] Creating data matrices ...
done in6.185seconds
[read.metharray] Instantiating final object ...
Error in data.frame(numeric(n), row.names = nms) :
duplicate row.names: 200517420015_R03C01, 200517420102_R06C01
Calls: read.metharray ... annotatedDataFrameFrom -> annotatedDataFrameFrom -> data.frame
Execution halted
ls -l of my test_idat directory:
[hal9@mango test_idats]$ ls -l
total 70014
-rw-rw-r-- 1 hal9 hal9 8095249 Nov 9 11:21 200517420015_R03C01_Grn.idat
-rw-rw-r-- 1 hal9 hal9 8095249 Nov 9 11:21 200517420015_R03C01_Red.idat
-rw-rw-r-- 1 hal9 hal9 8095249 Nov 9 11:21 200517420085_R06C02_Grn.idat
-rw-rw-r-- 1 hal9 hal9 8095249 Nov 9 11:21 200517420085_R06C02_Red.idat
-rw-rw-r-- 1 hal9 hal9 8095278 Nov 9 11:21 200517420102_R06C01_Grn.idat
-rw-rw-r-- 1 hal9 hal9 8095278 Nov 9 11:21 200517420102_R06C01_Red.idat
-rw-rw-r-- 1 hal9 hal9 530 Nov 10 13:53 test.csv
Output for the targets:
[1] "/home/hal9/methylation/test_idats/test.csv"
Sample_Name Sample_Well Sample_Plate Sample_Group Pool_ID person age
1 4.640959e+18 <NA> <NA> Good <NA> 4.640959e+18 54.6
2 4.640959e+18 <NA> <NA> Good <NA> 4.640959e+18 54.6
3 6.658291e+18 <NA> <NA> Good <NA> 6.658291e+18 26.1
4 6.658291e+18 <NA> <NA> Good <NA> 6.658291e+18 26.1
sex status Array Slide
1 FALSE Good R03C01 200517420015
2 FALSE Good R03C01 200517420015
3 FALSE Good R06C01 200517420102
4 FALSE Good R06C01 200517420102
Basename
1 /home/hal9/methylation/test_idats/200517420015_R03C01
2 /home/hal9/methylation/test_idats/200517420015_R03C01
3 /home/hal9/methylation/test_idats/200517420102_R06C01
4 /home/hal9/methylation/test_idats/200517420102_R06C01
Added the targets output
Got it. It works now. Thank you Sir. :)