Hi,
I am reading EPIC samples using minfi's read.metharray.exp() function as follows:
library(minfi)
library(knitr)
library(limma)
library(minfi)
library(IlluminaHumanMethylation450kanno.ilmn12.hg19)
library(IlluminaHumanMethylation450kmanifest)
library(RColorBrewer)
library(Gviz)
library(stringr)
setwd("C:\\Users\\Sarah Vasavan\\Documents\\DNA methylation project")
baseDir <- getwd()
targets <- read.metharray.sheet(baseDir)
rgSet <- read.metharray.exp(targets=targets, force=TRUE)
My R output is as follows:
> setwd("C:\\Users\\Sarah Vasavan\\Documents\\DNA methylation project")
> baseDir <- getwd()
> targets <- read.metharray.sheet(baseDir)
[read.metharray.sheet] Found the following CSV files:
[1] "C:/Users/Sarah Vasavan/Documents/DNA methylation project/DeLuca BAN11196 Methylation450 Dec 2013.csv"
> rgSet <- read.metharray.exp(targets=targets, force=TRUE)
Error in read.metharray(basenames = files, extended = extended, verbose = verbose, :
!anyDuplicated(basenames) is not TRUE
Can you please tell me what I am doing wrong? I've checked and made sure that all my idat files match the samples in the samplesheet.
My idat files are as follows:
"C:\Users\Sarah Vasavan\Documents\DNA methylation project\R01C01_Grn.idat" "C:\Users\Sarah Vasavan\Documents\DNA methylation project\R01C01_Red.idat" "C:\Users\Sarah Vasavan\Documents\DNA methylation project\R01C02_Grn.idat" "C:\Users\Sarah Vasavan\Documents\DNA methylation project\R01C02_Red.idat" ... "C:\Users\Sarah Vasavan\Documents\DNA methylation project\R06C02_Grn.idat" "C:\Users\Sarah Vasavan\Documents\DNA methylation project\R06C02_Red.idat"
this is my output on R when I do that:
Right. And what is in the Basename column?
character(0) for all of them
And since that's supposed to point to the directory that contains the files, it probably won't work. This is where your skills as a detective have to come into play.
Thank you! so my updated sample sheet contains this column:
however, I still get an error:
That's not what it should look like. The Basename doesn't include the idat file names. The help page for
read.metharray.sheet
has an example you can run to see what it should look like.