Question: Help with Minfi for methylation analysis.
gravatar for halo22
3.9 years ago by
Indianapolis, IN
halo22180 wrote:

Hello All,

I am trying to analyze some methylation data using the minfi package. I have raw idat files for all my patient samples, right now I am stuck at the very first step. As the tutorial suggest, I have created a sample targets file that includes the samples information and also location of the idat files. I have pasted few lines of my sample target file below and also the output that I get from printing read.metharray.sheet. For some reason in the input I see character(0) as Basename. But I see correct output from list.files. Would really appreciate your input on this one:

This is my code:

baseDir <-"/home/idats"
targets <- read.metharray.sheet(baseDir)
print (head(targets))

Input targets file:



read.metharray.sheet] Found the following CSV files:

      Sample_Name Sample_Well Sample_Plate Sample_Group Pool_ID person  age sex
1     908224        <NA>         <NA>       Cancer    <NA> 908224 62.9   F
2     908224        <NA>         <NA>       Cancer    <NA> 908224 62.9   F
3      836160        <NA>         <NA>       Normal    <NA> 836160 50.1   M
4      836160        <NA>         <NA>       Normal    <NA> 836160 50.1   M
       status   Array  Slide     Basename
1    Cancer  420015 R01C01 character(0)
2    Cancer  420015 R01C01 character(0)
3    Normal 7420015 R05C01 character(0)
4    Normal 7420015 R05C01 character(0)


sequencing snp methylation 450k • 2.6k views
ADD COMMENTlink modified 3.9 years ago by igor11k • written 3.9 years ago by halo22180

I also met such problem before. Something it is caused by the format of samplesheet. Something I will debug it by download the code of these function, such as read.metharray.exp(). More convenient way should be provided so that other's can help you. I prefer github to keep you data and script, so that other can easily check the pipeline with git clone.

ADD REPLYlink modified 3.9 years ago • written 3.9 years ago by Shicheng Guo8.3k

I saw your post over here, can you please specify what samplesheet format is applicable? Posted above is the only code that I have written for this analysis. Thanks

ADD REPLYlink written 3.9 years ago by halo22180
gravatar for igor
3.9 years ago by
United States
igor11k wrote:

Try using read.metharray.exp() (formerly read.450k.exp()) instead.

ADD COMMENTlink written 3.9 years ago by igor11k

I tried using read.metharray.exp in two different forms: 1) RGset <- read.metharray.exp(base=baseDir) This creates the "RGChannel" datastructures but fails ti capture the sample info or it doesn't read the test.csv file

2) RGset <- read.metharray.exp(base=baseDir,targets="/home/idats/test.csv") Here I try to specify the path to the test.csv separately but I get the following error: Error in read.metharray.exp(base = baseDir, targets = "/homedats/test.csv") : Need 'Basename' amongst the column names of 'targets'

ADD REPLYlink written 3.9 years ago by halo22180

You should import your CSV first. Something like:

targets = read.csv("test.csv", strip.white = TRUE, stringsAsFactors = FALSE)
raw_set = read.metharray.exp(targets = targets, recursive = TRUE, verbose = TRUE)
ADD REPLYlink written 3.9 years ago by igor11k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1258 users visited in the last hour